Vagrant is a great tool to automate creating and configuring lightweight, reproducible, and portable development environments. If you are new to Vagrant you might want to take a look at official documentation to get a basic gist who is it for and why to use it.
- Vagrant depends on Oracle's VirtualBox to create all of its virtual environments.
- Download and install Vagrant
- Make sure you've installed prerequisites
- Open terminal,
cd
to working directory and clone the projectgit clone git://github.com/borivojevic/cakephp-vagrant.git
- Place application source code into cakephp-vagrant/webroot folder
- On the host machine, add a new line to your
hosts
file pointing to vagrant box'33.33.33.10 dev.mirkoborivojevic.localhost
- Run
vagrant up
to provision machine - Run web browser and go to
http://dev.mirkoborivojevic.localhost
- To log in to vagrant box execute
ssh [email protected] -p 2222
- To turn off virtual machine execute
vagrant down
- To clean up execute
vagrant destroy
Virtual machine IP: 33.33.33.10
System user: vagrant
System password: vagrant
MySQL user: root
MySQL password: root
Apache Virtual Host: dev.mirkoborivojevic.localhost
- apache2
- php5 (5.5)
- php5-cli
- php5-mysql
- php5-dev
- php-pear
- PHPUnit
- PHP_CodeSniffer
- CakePHP_CodeSniffer
- mysql-server
- phpMyAdmin
- git-core
- vim
- curl
- composer
- Additional libraries
- cakephp
- xdebug
- Support multiple projects and mountpoints in Vagrantfile (see http://goo.gl/TDACB)
VirtualBox sometimes hangs on "Waiting for VM to boot. This can take a few minutes". To fix this enable GUI mode in Vagrant configuration, login in VirtualBox and run "sudo dhclient".