- FAQ, Answers to the most common questions.
The recommended way to set up a developer environment is with the provided VirtualBox VMs using Vagrant. This lets you create a sandboxed environment that's known to work.
The box is based off Ubuntu Lucid32 with all of the packages pre-installed to be up and running. We followed the installation guide for Ubuntu with Apache with some modifications to make it suitable for development.
Refer to the Vagrant documentation for details.
Download the appropriate binary.
Once downloaded you'll need to install the program. We'll be running Virtualbox headless so this is the last time you'll directly interface with Virtualbox.
You can find a complete list of downloads for 4.1.20 here.
You can download the appropiate binary from Vagrant 1.3.0 download page. Once downloaded you will need to install the program.
There's a complete list of downloads for Vagrant here.
Using the base box provided by us run the vagrant box add
command. This is a 600MB file so it may take some time.
vagrant box add photo http://photo-developer.s3.amazonaws.com/vagrant-photo-developer-1.0.box
Next you'll need to decide which directory you want to set up your files in. We'll assume it's %HOME%/dev
. Open a terminal and cd
into that directory and copy the contents of our Vagrantfile into it.
curl -s https://raw.github.com/photo/developer/master/vagrant/Vagrantfile > Vagrantfile
Now you can boot your VM and add a host entry pointing to itself.
vagrant up
# test that it is working by ssh'ing
vagrant ssh
# add the host entry
sudo sh -c 'echo "33.33.33.33 local.photo" >> /etc/hosts'
# return to your host
exit
That's all. Let's get your local host set up to talk to your VM.
In order for your local environment to communicate with the virtual environment we're creating you will need to set up an alias in your hosts file.
- Windows
%SystemRoot%\system32\drivers\etc\hosts
- OSX
/etc/hosts
- Linux
/etc/hosts
- All others
Append the following to your hosts
file.
33.33.33.33 local.photo
What this says is that the VM's IP address is 33.33.33.33 and your local host can access it using the DNS name local.photo.
Now that everything is set up you should be able to load a browser and go to http://local.photo.
To use MySql you can enter the following information.
- Host - localhost
- Username - root
- Password - (empty)
- Database - photo
If you have problems, please open an issue and we will aggregate common errors here.