Vagrant LAMP : How to

I've had hard times setting up a LAMP Vagrant box. There are tons of "tutorials", but none gave me the right direction to have a fully functional LAMP stack running as localhost.

So, hey, since I'm a nice guy, I'll spare you some headaches and tell you how you can do it easily.

We'll use this box : https://github.com/TomJaeger/vagrant-puppet-lamp, which has Apache, PHP and MySQL.

  1. Obviously, you'll need Vagrant and VirtualBox. Go get them, and install both.
  2. Clone the repo : git clone https://github.com/TomJaeger/vagrant-puppet-lamp.git
  3. Go to the box folder : cd vagrant-puppet-lamp
  4. Run the VM: vagrant up
  5. Connect to the VM via SSH: vagrant ssh
  6. The tricky part: Run postinstall.sh as a sudoer: sudo ./postinstall.sh
  7. It works ! Visit http://localhost:8080. You can access MySQL at localhost:8889 with user "root" and password "root".