This step only ever needs to be done once. Once the precise64 box is installed on a system the remaining steps refer to that same box regardless of the project.
Download and install Xcode from the Apple App Store.
Download VirtualBox from http://www.virtualbox.org/wiki/Downloads, install dmg.
Download Vagrant 2 or higher from http://downloads.vagrantup.com/, install dmg.
Launch a Terminal window, check that it installed:
(host) $ which vagrant
Add a Vagrant box (we'll be using Ubuntu Precise Pangolin (12.04 LTS) 64-bit):
(host) $ vagrant box add precise64 http://files.vagrantup.com/precise64.box
Make a directory for the project and change to it, replacing <path_to>
with the path to the project and <project_name>
with the name of the project.
(host) $ mkdir <path_to>/<project_name> && cd $_
For example, to create a project called 'website' in your home directory:
(host) $ mkdir ~/website && cd $_
When you're all done, this directory will match up with /vagrant/
in the virtual envirionment. Virtualbox keeps the two directories in sync so changes to one will be made in the other.
Copy in the Vagrantfile.
(host) $ curl https://gist.github.com/jbergantine/8964657/raw/Vagrantfile > Vagrantfile
Copy in the provisioning files.
(host) $ curl https://gist.github.com/jbergantine/8964657/raw/bootstrap.sh > bootstrap.sh
(host) $ curl https://gist.github.com/jbergantine/8964657/raw/default > default
(host) $ curl https://gist.github.com/jbergantine/8964657/raw/dir.conf > dir.conf
Startup Vagrant and provision the Virtual Machine:
(host) $ vagrant up
SSH in to the virtualbox:
(host) $ vagrant ssh
Open a Web browser and navigate to http://localhost:8080. You should see an HTML page with a timestamp.