Après des heures à tenter de comprendre comment monter une box Vagrant avec LAMP, j'ai fini par avoir une box fonctionnelle.
Comme je suis sympa, je vous explique comment faire.
Nous utiliserons cette box : https://github.com/TomJaeger/vagrant-puppet-lamp, qui contient Apache, PHP et MySQL.
- Vous aurez évidemment besoin de Vagrant et VirtualBox. Installez les deux.
- Clonez le repo :
git clone https://github.com/TomJaeger/vagrant-puppet-lamp.git
- Allez dans le dossier:
cd vagrant-puppet-lamp
- Lancez la VM:
vagrant up
- Connectez-vous à la VM via SSH:
vagrant ssh
- La partie "tricky": Lancez postinstall.sh comme sudoer:
sudo ./postinstall.sh
- Ca fonctionne ! Visitez http://localhost:8080. Vous pouvez accéder à MySQL sur localhost:8889 avec l'utilisateur "root" et le mot de passe "root".