# RapidSMS Developers Guide/Installation

The following describes how to install RapidSMS in a Virtual Machine (VM) while working on a Windows machine. This setup is suitable for both production and development.
For Linux users, simply follow inside-VM instructions or follow the regular instructions with Virtual Box.

## System Requirements

| Type | Software | Version |
| Operating System | Ubuntu (linux) | 9.10 server i386 |
| Virtual Machine | Virtualbox | 3.1.4-57640-Win |
| SSH Client | Putty | 0.60 |
| Web Browser | Firefox | 3.6 |
| Editor | Scite | 2.03 |
| Web Framework | Django | 1.1.1 |

## Virtual Machine, Setup & Configuration

Once all above softwares are ready, launch Virtualbox follow the Wizard:
* Press NEW to create a new virtual machine.
* Press NEXT on Welcome screen.
* Enter a name for your virtual machine (Ex. RapidSMS), choose Linux as an operating system type and Ubuntu as its version.
* Press NEXT, Choose the amount of memory you want the virtualbox to use (256M is fine).
* Press NEXT, Leave the Boot Hard Disk (Primary Master) checked.
* Press NEXT, New wizard will appear.
** Leave the storage type (Dynamically expanding storage )
** Choose the size of Storage that VirtualBox will use (8G is fine).
* Press Next, then Finish.
Now choose the Virtual machine you created from the above steps (RapidSMS), right-click on it and choose settings.
* Go Storage tab. On Storage Tree, Select the non-hard disk drive.
** On attribute pane, select CD/DVD Device and add the Ubuntu Server ISO you downloaded.
* On Network Tab:
** Adapter1: Check Enable Network Adapter Box.
** On field attached to, choose Host-only Adapter.
** Adapter2: check Enable Network Adapter Box
** On field attached to , choose Bridged Adapter
** On field Name, Choose the Network card on which you have internet.
* Close and save the settings for the VM.
* Now, click on File -> Preferences from the main Virtual Box Menu
** On Network tab, set your Adapter and ip address (ex. 192.168.10.1) and network mask (Ex. 255.255.255.0).
** On DHCP sub-tab, Disable DHCP Server.
Now start you virtual machine that you configured by clicking on START.
After Starting your Virtual machine, your operating system (in our case Ubuntu) will starts.
We'll need to install some software inside Ubuntu to configure our RapidSMS and run it properly.

## Network Cards Configuration

The above configuration set up two Network Interfaces in the VM:
* The Host-Only one, which we'll use to access the VM at all time.
* The bridged one, which we'll use to access Internet from the VM and expose the RapidSMS server on the network.
To configure the network in the VM, we need to edit the interfaces file:
Inside this file write the following
Save the file (:x) and restart the network service:

## Python Packages

RapidSMS requires several softwares. The following command will download and install required softwares (~40MB).
The following command will install some additional librairies (~100MB). Optional.
The following will install PEP8, a tool to ensure Python Coding Standards are met.
The following generates locales files in the VM. Add all the locale you might want to use for translation (you can do this after). Following are for French, English (USA) and Arabic (Jordan) in order.

## Samba Installation & Configuration

Installing and configuring Samba will provide us a way to directly write inside-VM files from within Windows, using regular Windows Text Editors.
Add the following at the end of the file
Close file and restart Samba:
On Windows, you can now access your home folder (/home/<username>) at the following URL: \\192.168.10.20\rsms.
You can map this folder to a Drive Letter on Windows to access it easily (works only when the VM is started).

## RapidSMS Dependencies

Following Code Structure, we will now create a sources folder to store all third-parties dependencies.

### Django Web Framework

After extracting the Django 1.1.1 archive (see download link under System Requirements), copy Django-1.1.1 folder to sources.
Then, change to that directory and install it

### RapidSMS Core Library

RapidSMS main fork (core) is located at github.com/rapidsms/rapidsms.
Clone the code and install it:
Now, RapidSMS is installed.

### Other Third Party Applications

Numerous RapidSMS applications are not located into the core. There are available from their developers's repositories.
In case you want to use some, clone those repositories in sources folder then link the applications as explained in Personal Repository
← Code Structure · Personal Repository →