All Projects → sgphpug → vagrant-lamp-centos64

sgphpug / vagrant-lamp-centos64

Licence: other
LAMP Stack on CentOS 6.4 Build with Vagrant/Puppet

Programming Languages

Puppet
460 projects
PHP
23972 projects - #3 most used programming language

#LAMP Stack on CentOS 6.4 Built 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.4 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.4) 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 project folder and add a new vhost. If you are lazy, just throw your PHP files into the project/webroot folder.

Pre-Requisite Software

##Installation Instructions##

  1. Install Puppet & Librarian-Puppet

$ sudo gem install puppet $ sudo gem install librarian-puppet


2. Clone this Git Repository

	```bash
$ git clone [email protected]:sgphpug/vagrant-lamp-centos64.git
$ cd vagrant-lamp-centos64
  1. Install Puppetfile dependencies

$ cd puppet $ librarian-puppet install

4. Start Vagrant

	```bash
$ cd ..
$ vagrant up --provision
  1. Once startup in complete, point your browser to http://localhost:8080 to make sure Apache is running.

Usage

  • Put your files in project/webroot to make it appear in the Apache document root. The ./project folder is mapped to /data in the VM.

  • The MySQL username is root and the root password is media1.

  • To login into the VM type

$ vagrant ssh


* To stop the VM:

	```bash
$ vagrant suspend
  • To halt the VM:

$ vagrant halt


* To destroy the VM:

	```bash
$ vagrant destroy
  • To run Puppet again:

$ vagrant provision


* Whenever you make any changes to `Vagrantfile`, run:

	```bash
$ vagrant reload --provision

Customization

All the configuration are in Vagrantfile and in the puppet/manifests/hieradata/common.yaml. Feel free to explore and tweak the settings to your liking.

Disclaimer

This configuration was successfully tested on Mac OSX Mavericks.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].