Ghi chú install vagrant debug php

http://www.hostedcgi.com/how-to-create-a-centos-7-0-vagrant-base-box/
package box: http://abhishek-tiwari.com/hacking/creating-a-new-vagrant-base-box-from-an-existing-vm
setup virtual host: https://www.digitalocean.com/community/tutorials/how-to-set-up-apache-virtual-hosts-on-centos-7
run update
yum update kernel*

alert(after+”-“+before);
currency-code-hidden-1
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
</Directory>

—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:
http://stackoverflow.com/questions/21315354/pdo-dblib-on-centos-6-x

CentOS 6.x and Microsoft SQL Server ODBC Linux driver

ln -s /etc/httpd/sites-available/example.com.conf /etc/httpd/sites-enabled/example.com.conf
cp /var/www/example.com/public_html/index.html /var/www/example2.com/public_html/index.html : copy file

Change language
/etc/sysconfig/i18n:
LANG=”en_US.UTF-8″
SYSFONT=”latarcyrheb-sun16″

sudo chown -R apache:apache /var/www/example.com/public_html
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 BROS_TOOLS_REST_API_SYSTEM_RUN_TYPE=VietnamDev
export BT_SYSTEM_RUN_TYPE=VietnamDev
export BRANTECT_RUN_TYPE=S

sudo wget http://www.example.org

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 http://mirror.webtatic.com/yum/el6/latest.rpm
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
DEVICE=eth1
ONBOOT=yes

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s