Isolated development environment for “Learn ZF2”

You Asked – We Listened. We have created an isolated development environment for “Learn ZF2” using vagrant and virtualbox.

One of our readers Paulius Mačernis has asked us for instructions how to build isolated development environment for the “Learn ZF2” book. Since yesterday we have Vagrant build file that can help you have your very own isolated development environment. You can apply these instructions for Windows, Linux and Mac OS X.

First you will need to install the latest version of Vagrant and Virtualbox. If you are using Ubuntu 14 you can check the instructions on that external page.

Then you need to clone the learnzf2-box repository using the following command:

git clone https://github.com/slaff/learnzf2-box.git

And when the repository is cloned you have to start the virtual machine using

cd learnzf2-box
vagrant up

After some minutes you will have brand new isolated development environment with Ubuntu 14, apache web server, php 5.5 with mcrypt and sqlite modules and the latest version of the “Learn ZF2” source code from github.

In order to ssh to the virtual machine you can type

vagrant ssh

And in order to access the web server from outside you can type in your browser http://localhost:8080

The source code is in a shared folder named dev and can be accessed and modified both from inside the virtual machine and from your physical machine.

3 thoughts on “Isolated development environment for “Learn ZF2”

  1. I always obtain this error:

    The box ‘chef/ubuntu-14.04’ could not be found or
    could not be accessed in the remote catalog. If this is a private
    box on HashiCorp’s Atlas, please verify you’re logged in via
    `vagrant login`. Also, please double-check the name. The expanded
    URL and error message are shown below:

    1. The box ‘chef/ubuntu-14.04′ could not be found

      The error message is correct. What you can do is to modify the Vagrantfile and change the line:

      config.vm.box = “chef/ubuntu-14.04”

      to something like

      config.vm.box = “ubuntu/trusty64”

      Give it a try and tell me if it works for you.

Leave a Reply

Your email address will not be published. Required fields are marked *

Captcha check * Time limit is exhausted. Please reload CAPTCHA.