Setup Vagrant, Linux, PHP, XDebug

list file: ls -al /etc
de biet path hien tai: pwd
apache:
sudo yum install httpd
sudo systemctl start httpd.service
start apache khi boot system: sudo systemctl enable httpd.service
sudo systemctl restart httpd.service
MySQL:
sudo yum install mariadb-server mariadb
start service: sudo systemctl start mariadb
remove mot vai caidat default: sudo mysql_secure_installation
PHP:
sudo yum install php php-mysql
List module va extension: yum search php-
yum info package_name : xem thong tin package
yum info php-fpm : mo ta chi tiet package
sudo yum install php-fpm: cai package php-fpm
sudo yum install package1 package2 … : install nhieu package
sudo vi /var/www/html/info.php : tao file
:$ => di den cuoi file
😡 (quit and save)
:w
and
:q => exit without save
i => insert mode
esc: thoat insert mode
sudo rm /var/www/html/info.php =>delete file

$ vagrant reload
Neu loi: /sbin/mount.vboxsf: mounting failed with the error: No such device => :
sudo yum update -y
sudo yum install kernel-devel-$(uname -r) kernel-headers-$(uname -r) dkms -y
vagrant plugin install vagrant-vbguest

vagrant file:
config.vm.network “private_network”, ip: “192.168.33.10”
config.vm.network “private_network”, ip: “192.168.33.10”
config.vm.synced_folder “./shared/www”, “/var/www/html/”, :mount_options => [“dmode=777”, “fmode=777”]
config.vm.synced_folder “./shared/logs”, “/logs”, :mount_options => [“dmode=777”, “fmode=777”]

link tham khao:

https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/3/html/Step_by_Step_Guide/s1-navigating-pwd.html

https://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mysql-php-lamp-stack-on-centos-7

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