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