Expand All

Windows

These instructions should work for all versions of Windows from XP to Windows 8.

You may need to login as Administrator, or give the Administrator password when installing some programs, depending on your Windows version and user settings.

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 Windows

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

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

Download VirtualBox for Windows

Step 2: Install VirtualBox

Once you have the installer, Double Click to run.

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 Windows

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

You want the file called: Windows Universal (32 and 64-bit)

Download Vagrant for Windows

Step 4: Install Vagrant

Once you have the installer, Double Click to run.

Walk through the installation wizard and keep all the default options.

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

Git for Windows: msysgit

To allow Vagrant to easily access our virtual machines, we're going to install msysgit.

msysgit is the Windows version of git, a version control system. You'll learn more about git later.

You can learn more about msysgit at http://msysgit.github.io

Step 5: Download Git (msysgit) for Windows

Download the latest installer from http://msysgit.github.io.

Simply click the big "Download" button:

Download msysgit for Windows

Step 6: Install Git (msysgit) for Windows

Once you have the installer, Double Click to run.

As you go through the installer, follow the settings below (otherwise leave the defaults):

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 7: Download Sublime Text 3

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

You want to file for Windows or Windows 64 bit.

How many bits?[

If you're not sure, you're probably 32-bit, so grab the "Windows" file.

Step 8: Install Sublime Text 3

Once you have the installer, Double Click to run.

As you go through the installer, follow the settings below (otherwise leave the defaults):

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 9: 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 10: Open up a terminal

The Terminal is also called the Command Prompt, Command Line, DOS Prompt, or DOS Window.

If you are using Windows Vista, it does not normally come with Powershell by default. Unless you have installed it yourself, you probably don't have it.

Option 10.1: For Windows Vista (with Powershell), Windows 7, and Windows 8

Open up Powershell by going to the Start Menu, and searching for Powershell. Click to open it.

Option 10.2: For Windows Vista (without Powershell)

Open up the Command Prompt by going to the Start Menu, and searching for Command Prompt. Click to open it.

Option 10.3: For Windows XP

Open up the Command Prompt by pressing the Windows Key + R, or going to the Start Menu and clicking Run.

Type in cmd, and hit Enter.

Step 11: Run the Virtual Machine

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

Option 11.1: For Windows Vista, 7 and 8

Type this in the terminal:
cd C:\Users\<username>\phpbridge\project

Option 11.2: For Windows XP

Type this in the terminal:
cd C:\Documents and Settings\<username>\phpbridge\project

If you are using Command Prompt (Windows Vista, or XP), anytime you see the vagrant command, you may need to substitute it for vagrant.exe.

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.