This project sets up a CentOS 7.1 (64bit) virtual machine to run your PHP project in. It mounts your PHP project directory so that you can use your favorite editors to work.
Host OS | VirtualBox | Vagrant |
---|---|---|
Mac OS X 10.10.5 | 5.0.10 | 1.7.4 |
Ubuntu 14.04 | 4.3.28 | 1.6.5 |
project/ ... your project directory
public/ ... web document root
vagrant-centos7-php/ ... this repository
If your web document root is not public
folder, but the project folder, try to run the following commands:
$ cd /path/to/project/
$ ln -s . public
$ cd /path/to/project/
$ git clone https://github.com/kenjis/vagrant-centos7-php.git
$ cd vagrant-centos7-php/
$ vagrant up
root
)Here are common commands:
command | description |
---|---|
vagrant up |
starts the virtual machine and provisions it |
vagrant provision |
provisions the vagrant machine |
vagrant suspend |
will save the current running state of the machine and stop it |
vagrant halt |
attempts a graceful shutdown of the machine |
vagrant ssh |
gives you SSH access to the virtual machine |
vagrant destroy |
will destroy the machine |
vagrant status |
shows status of the machine |
vagrant global-status |
shows status of all virtual machines |
If you look for CentOS6: