Expand All

Macintosh

These instructions should work for all versions of Mac OS X from 10.7 (Lion) to 10.9 (Mavericks)

You may need to login as an admin account, or give the Administrator password when installing some programs.

If you are participating in a live workshop, these files were probably provided on a USB drive

VirtualBox

VirtualBox is a tool that allows you to create virtual computers running their own operating system, and that you can safely play around in without worrying about breaking your actual computer.

VirtualBox is free (as in beer) and open source, you can find more information at https://www.virtualbox.org.

Step 1: Download VirtualBox for Mac OS X

Download the latest installer from https://www.virtualbox.org/wiki/Downloads.

You want the file called: VirtualBox <version> for OS X hosts x86/amd64

Download VirtualBox for Mac OS X

Step 2: Install VirtualBox

Once you have the disk image (.dmg file), if it has not automatically opened, double click to open.

Next, double click on the VirtualBox.pkg to start the installer. Walk through the installation wizard and keep all the default options.

You may be prompted to accept the installation of multiple drivers, or security prompts. Make sure to accept them all.

When complete, you may be prompted to restart. Do so.

Vagrant

Vagrant is a tool for managing VirtualBox virtual machines. It allows you to easily build, share, and use other peoples virtual machines. It's kindof awesome actually.

Like VirtualBox, Vagrant is free and open source. You can find more information at http://www.vagrantup.com.

Step 3: Download Vagrant for Mac OS X

Download the latest installer from http://www.vagrantup.com/downloads.html.

You want the file called: Mac OS X Universal (32 and 64-bit)

Download Vagrant for Mac OS X

Step 4: Install Vagrant

Once you have the disk image (.dmg file), if it has not automatically opened, double click to open.

Next, double click on the VirtualBox.pkg to start the installer. Walk through the installation wizard and keep all the default options.

You may be prompted to accept the installation of multiple drivers, or security prompts. Make sure to accept them all.

When complete, you may be prompted to restart. Do so.

Sublime Text 3

Sublime Text is a versatile text editor. It is great for editing all kinds of text files, including HTML, PHP, CSS, JavaScript and other source code files.

It provides lots of great features including syntax highlighting, and has many many more features available via plugins

It is also super configurable, so you can make it what you want!

It isn't free, but it has a trial that is perfect for our purposes. The trial never runs out, but if you like, we highly recommend that you buy it!

You can find more information at http://www.sublimetext.com

Step 5: Download Sublime Text 3

Download the latest installer from http://www.sublimetext.com/3

You want to file for OS X

Step 6: Install Sublime Text 3

Once you have the disk image (.dmg file), if it has not automatically opened, double click to open.

Next, simply drag the Sublime Text application to the Applications folder

Setting up the PHPBridge Virtual Machine

Now that we have everything installed, we can setup the PHPBridge virtual machine!

This virtual machine is a partially pre-configured environment that will let you get to work immediately to create something cool!

Step 7: Copy the neccessary files

You will be provided with a copy of the virtual machine ("the box") on a USB thumb drive.

Create a new folder on your computer called phpbridge in your user folder.

Inside this folder, copy the project and vm directories.

Step 8: Run the Virtual Machine

The Terminal application can be found under Applications > Utilities, or type Terminal into Spotlight.

First, in your terminal, browse to the new phpbridge folder you created earlier.

Type this in the terminal:
cd ~/phpbridge/project

Then use vagrant to bring up our new virtual machine:

Type this in the terminal:
vagrant up
Approximate expected result:
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Clearing any previously set forwarded ports...
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
    default: Adapter 1: nat
==> default: Forwarding ports...
    default: 8080 => 8080 (adapter 1)
    default: 22 => 2222 (adapter 1)
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
    default: SSH address: 127.0.0.1:2222
    default: SSH username: vagrant
    default: SSH auth method: private key
    default: Error: Connection timeout. Retrying...
==> default: Machine booted and ready!
The result you get may differ and is not important.

Verify Your Installation

Once your virtual machine has booted and is ready to go, we can connect to it to begin working!

Type this in the terminal:
vagrant ssh
Approximate expected result:
Welcome to Ubuntu 12.04 LTS (GNU/Linux 3.2.0-23-generic x86_64)

 * Documentation:  https://help.ubuntu.com/
Welcome to your Vagrant-built virtual machine.
Last login: Sun Apr 20 22:03:49 2014 from 10.0.2.2
[email protected]:~$
The result you get may differ and is not important.

Explanation

You now have a fully functional Ubuntu Linux Virtual Machine on which to complete the PHPBridge curriculum, congrats!

Additionally, you have the Sublime Text editor in which to write your code.

You will perform the majority of the curriculum either inside Sublime Text, or inside the Virtual Machine in a terminal.