Using PuPHPet and Vagrant

I have a new job! And it looks like we’ll be using mainly ZF2!

However, in this new workplace there is no Linux box to use as a development server, and so I have been tasked with setting up my development environment. XAMPP was mentioned, but you have to be joking! The best way these days to set up a dev environment (which can be moved onto any machine!) is using Vagrant, and PuPHPet.

First up, install VirtualBox. If you are using Symantex Norton AV horribleness, VirtualBox just wont work in the current release, and so you should download a 4.3.15 build, which I’ll link to for you to save time:

Next up, install Vagrant.

Then, head over to, and go through the setup wizard, where you can choose what your server needs installed.

Finally open VirtualBox, and a command prompt, cd into the folder and type “vagrant up”. A lot of initialisation will scroll past, and hopefully you dont get any errors!

Now you have two options. You can either type ‘vagrant ssh’ to log in to your new machine, or follow the steps below:

Open up Putty Pageant, and import your generated key id_rsa.ppk, which can be found in the puphpet/files/dot/ssh folder.
Open the config.yaml file in the puphpet folder. Open Putty itself, and look for the private_network: key. This is the IP address you will connect to. Then click on the connection data tab and enter vagrant in as the user name. Finally go back into the session tab, give a name to the session and then hit save. Now you can connect up and have a fully working Linux Box which can be moved from machine to machine!

We dont even need to set up a Samba share! PuPHPet has set up a folder that syncs already, so have fun!

Last but not least, I had an issue setting up my SSH tunnel where I couldnt connect my HeidiSQL. Open sudo nano /etc/mysql/my.cnf and change the bind address from to, then restart using ‘sudo service mysql restart’. Job done, ready to rock!


2 thoughts on “Using PuPHPet and Vagrant

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s