Skip to content

Vagrant setup for CentOS 6.3 LAMP stack (Linux, Apache, MySQL and PHP).

Notifications You must be signed in to change notification settings

Brammm-forks/vagrant-lamp-centos63

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Installation

  1. Install VirtualBox

    Download from https://www.virtualbox.org/wiki/Downloads. Remember to download the VirtualBox Extension Pack.

  2. Install Vagrant

    Download from http://downloads.vagrantup.com.

  3. Clone this repo into a local folder

$ git clone [email protected]:jmather/vagrant-lamp-centos63.git phpdev $ git submodule init $ git submodule update


4. Start Vagrant

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

	```bash
$ vagrant up

Usage

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

192.168.56.60 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.

Attribution

Based on the excellent work from Patrick Daether.

About

Vagrant setup for CentOS 6.3 LAMP stack (Linux, Apache, MySQL and PHP).

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published