Vagrant 16.04 LTS Ubuntu php web development

We will install :

Install

git clone https://github.com/filipefernandes007/vagrant-lamp-env
cd vagrant-lamp
vagrant up

App folder

Your applications live in /vagrant/www/

Access your virtual machine and app folder

Your projects/apps must be under /vagrant/www/ folder.

vagrant ssh
cd www

Choose what to install

At config/config.yml you can decide what to be installed in your virtual machine. Choose true for the dependencies you like to be installed.

MYSQL Credentials and Client Access via SSH

For mysql access you can use this credentials : root:root

For mysql access client via ssh :

  • SSH Host : 192.168.33.185
  • SSH User : vagrant
  • SSH Password : vagrant

How to use:

After setup is finished, go to 192.168.33.185 in your browser. You should see the phpinfo() page. phpMyAdmin is accessible at http://192.168.33.185/phpmyadmin/ Username is 'root', password 'root'

With Symfony

If you are going to use Symfony server command, do this:

php bin/console server:run 0.0.0.0:8000

Enjoy!