Month: June 2016

FTP vagrant

Make sure your vagrant vm is running. Then:

vagrant ssh
sudo apt-get install vsftpd

Edit the ftp config file to enable authenticated users to ftp:

sudo nano /etc/vsftpd.conf

Then uncomment the following lines:


Save the file. (Control-x, y, return) Restart ftp with:

sudo /etc/init.d/vsftpd restart

After this, you should be able to install modules from the modules page. Login with “vagrant” for the username and password if/when asked.

Obviously, it’d be best if we didn’t have to do this.


Neu ko tao file dc thì:

If you don’t want to go further with your SELinux do not change it, so you will see as default /etc/selinux/config


then just run the commands as root or with sudo:

sudo setsebool -P ftpd_anon_write 1
sudo setsebool -P ftpd_full_access 1

Ghi chú install vagrant debug php
package box:
setup virtual host:
run update
yum update kernel*

sudo umount -f -a -t vboxsf: unmount all share
mount | grep vbox
mount.vboxsf html /var/www/html/ : mount folder

Neu ko co quyer: chinh sua file http.conf :
<Directory />
#Options FollowSymLinks
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Require all granted

—Access web tu ben ngoai vao:
sudo firewall-cmd –permanent –zone=public –add-service=http
sudo firewall-cmd –permanent –zone=public –add-service=https
sudo firewall-cmd –reload

cai driver
sudo yum install php-pdo
yum install php-pdo_pgsql

yum install php-mbstring (dùng cho hàm mb_strimwidth trongUtil::getProgramId)

yum install -y –enablerepo=remi,remi-php56 install php-mssql

setup driver sqlserver:

CentOS 6.x and Microsoft SQL Server ODBC Linux driver

ln -s /etc/httpd/sites-available/ /etc/httpd/sites-enabled/
cp /var/www/ /var/www/ : copy file

Change language

sudo chown -R apache:apache /var/www/
sudo chmod a+x /path/to/dir : thay doi quyen cho folder
shutdown -h now
reboot -h now

sudo vi /etc/httpd/conf/httpd.conf
sudo vi /etc/httpd/conf.d/brostools.conf
sudo vi /etc/hosts
sudo vi /home/release/main/index.html
sudo /etc/init.d/httpd restart
sudo vi /var/log/httpd/error_log

them 3 lines vao file : /etc/rc.d/init.d/httpd
export BT_SYSTEM_RUN_TYPE=VietnamDev

sudo wget

Neu apache ko co quyen access folder vagrant thi:
/etc/sysconfig/selinux => chuyen sang disabled

sudo chown -R apache:apache /var/www/bros/web/bros_tools/app/htdocs
sudo chown -R apache:apache /var/www/bros/api/bros_rest_api/htdocs
chcon -R -h -t httpd_sys_content_t /var/www/bros/web/bros_tools/app/htdocs
Yum erase php php-pear php-mysql php-cli php-common php-pdo php-mysql
install php 5.4 on centos6

mount -t vboxsf -o uid=’id -u apache’,gid=’id -g apache’,dmode=755,fmode=644 /var/www/bros/web/bros_tools/app/htdocs /var/www/bros/web/bros_tools/app/htdocs

# rpm -Uvh
yum install php54w.x86_64 php54w-cli.x86_64 php54w-common.x86_64 php54w-gd.x86_64 php54w-ldap.x86_64 php54w-mbstring.x86_64 php54w-mcrypt.x86_64 php54w-mysql.x86_64 php54w-pdo.x86_64

khi copy box sang may khac bi loi, ko mount duoc:
1. rm -rf /etc/udev/rules.d/70-persistent-net.rules
2. rm -rf /etc/sysconfig/network-scripts/ifcfg-eth1
3. rm -rf /etc/sysconfig/network-scripts/ifcfg-eth2
4. vim /etc/sysconfig/network-scripts/ifcfg-eth1