This project provides a Vagrant configuration for developing with or for ReactPHP. It aims to provide a comprehensive set of tools and extensions for PHP development and could be used for general PHP development.
You will need to first ensure you have installed Vagrant and VirtualBox.
Simply clone this project into a directory one level below the root of your project. For example, if your project is located at ~/foo this project should be cloned into /foo/vagrant. This project uses submodules so you'll need to use the --recursive option when you clone it or init the submodules afterwards. Cd into the directory for the project (/foo/vagrant) and run 'vagrant up'. You will need to separately install Vagrant and VirtualBox.
The vagrant configuration will mount two directories in the VM. The directory where the Vagrantfile is located (/foo/vagrant in our example) will be mounted at /vagrant in the vm. The root directory of the project (/foo in the example) will be mounted at /project_data. If a composer.json file is present in the root directory of the project the final part of running 'vagrant up' will run 'composer install' in that directory.
The Vagrant configuration uses the 'precise64' base box available from http://files.vagrantup.com/precise64.box. If you do not have this box installed on your system Vagrant will automatically download it for you the first time you run 'vagrant up'. Vagrant will install the following software, packages and dependencies.
The following dependencies are installed using apt-get as they are required to install and build other modules:
- git-core
- libevent-dev
- libev-dev
- libzmq-dev
- pkg-config
- build-essential
- python-software-properties
- cURL
Apache2 is installed and a single VirtualHost is created that resolves to /vagrant/web in the VM. This directory contains a single 'index.php' file that outputs phpinfo(). Vagrant is configured to forward all traffic on port 8080 on the host OS to port 80 on the guest VM.
Both mysql-server and mysql-client are installed on the VM.
PHP 5.4 is installed using a custom PPA for Ubuntu. The following modules and extensions are installed:
- apc
- imagick
- mysql
- gd
- mcrypt
- memcache
- pspell
- snmp
- sqlite
- xmlrpc
- xsl
- curl
- XDebug
- Libevent
- ZeroMQ
- Libev (compiled and installed from https://github.com/m4rw3r/php-libev)
Composer is installed globally to /usr/local/bin in the VM. Puppet then runs 'composer install' in /project_data if it finds a composer.json file there.
This Vagrant config has been developed and tested on Ubuntu 12.04. It has also been tested on OSX.
- Further clean up puppet configuration
- Review the installed PHP extensions and add or remove ones as needed.