Welcome, the workshop is hands-on where you will actually be coding while you learn. This setup will help you with the following:
- Install VirtualBox
- Install Vagrant
- Setup Vagrant with Ubuntu 16.04, Nginx and PHP 7 (using the ubuntu/xenial64 box)
You will need to install VirtualBox and Vagrant in order to run the virtual machine for the workshop environment.
- Install VirtualBox
- Get VirtualBox from this URL: https://www.virtualbox.org/wiki/Downloads
- Install Vagrant
- Get Vagrant from this URL: http://www.vagrantup.com/downloads.html
- Check your BIOS to ensure hardware virtualization is enabled (this is a 64-bit VM).
https://www.virtualbox.org/manual/ch10.html#hwvirt
After the installation of Vagrant you can clone the repository ezimuel/zend-expressive-workshop using the following command:
git clone https://github.com/ezimuel/zend-expressive-workshop
Move inside the zend-expressive-workshop
folder and execute composer
to install the vendor libraries for zend-expressive:
composer install
If you don't have composer, you can install from here.
After the execution of composer you can start up the Vagrant box with the following command:
vagrant up
If you don't have the ubuntu/xenial64 box installed in your Vagrant environment this operation will take some time.
After the setup, you will have a Ubuntu 16.04 VM with Nginx and PHP 7 running on
your localhost:8080. The web directory of the VM server
it's the public
local folder. You will have also the web server log mounted
on the log
local folder, to simplify the debug of the PHP application.
If you want to connect to the VM you can SSH into it, using the command:
vagrant ssh
If you want to close/stop the VM you can use the following command:
vagrant destroy