Vagrant setup for CentOS 6.3 LAMP stack (Linux, Apache, MySQL and PHP).
Puppet PHP Ruby Shell
Switch branches/tags
Nothing to show
Clone or download
Pull request Compare This branch is 21 commits ahead, 7 commits behind miccheng:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

LAMP stack setup based on CentOS 6.3 with Vagrant / Puppet

For anyone wanting to try out Vagrant, here's some sample code to help you setup your own LAMP dev sandbox quickly. It runs on CentOS 6.3 and the internal setup is done with Puppet.

Do note that the first run might take a while. Depending on your speed, 10 minutes to download the base VM (CentOS 6.3) and 5 minutes to startup and provision the VM. But subsequent startup should be quite fast.

You can spin up new boxes very easily. Just put your PHP scripts in the projects folder and add a new vhost. If you are lazy, just throw your PHP files into the projects/webroot folder.

This installs:

  • Apache
  • MySQL
  • PHP
  • phpMyAdmin


  1. Install VirtualBox

    Download from Remember to download the VirtualBox Extension Pack.

  2. Install Vagrant

    Download from

  3. Clone this repo into a local folder

$ git clone phpdev $ git submodule init $ git submodule update

4. Start Vagrant

	`cd` into the checked out folder to start the VM:

$ vagrant up


Update your host operating system's /etc/hosts file with the following entry: phpdev.local

Now, you can reach the webroot with http://phpdev.local or http://localhost:8080.

To login into the VM type

$ vagrant ssh

To stop the VM:

$ vagrant suspend

To halt the VM:

$ vagrant halt

To destroy the VM:

$ vagrant destroy

The phpMyAdmin URL: http://phpdev.local/phpmyadmin or http://localhost:8080/phpmyadmin.

Note: The MySQL username is root and the root password is blank. To change the default, edit manifests/db.pp.


Based on the excellent work from Patrick Daether.