RapidSMS Ubuntu installation instructions

Note: If you are using Jaunty please see “Updated Instructions for Ubuntu 9.10 Jaunty

*RapidSMS requires python version 2.5 or later. Python comes with Ubuntu, but checking its version now may save a headache later.

==========================

Install necessary packages

==========================

/——

sudo apt-get install python-mysqldb

——

install git for ease of upgrading (optional)

/——

sudo apt-get install git-core

——

install mysql (optional – rapidsms uses sqlite3 by default) See MySql?‘s website for more information.

Download and install Django

*Note: We are currently supporting RapidSMS only with django version 1.0*

/——-

mkdir ~/src

cd ~/src

wget http://www.djangoproject.com/download/1.0/tarball/

tar xzvf Django-1.0.tar.gz

cd Django-1.0

sudo python setup.py install

——

Download and install RapidSMS

/——-

cd ~/src

wget http://github.com/rapidsms/rapidsms/tarball/master

tar xzvf unicefinnovation-rapidsms-3345f44ad08f99c604307aca3b7212ee59e40088.tar.gz

cd unicefinnovation-rapidsms-3345f44ad08f99c604307aca3b7212ee59e40088

sudo python setup.py install

——

**OR**

clone RapidSMS if you are using git *Note: if you are planning to contribute code, we recommend that you fork unicefinnovation/rapidsms on github, push your code to your fork, and submit pull requests. Otherwise, check with the core developers via irc or mailing list for information about submitting patch files (see rapidsms.org for details).

/——-

git clone git://github.com/rapidsms/rapidsms.git

——

Start a project!

/——-

mkdir ~/projects

cd ~/projects

rapidsms startproject myprojectname

cd myprojectname

cp rapidsms.ini local.ini

——-

edit your local.ini file to add whichever apps and backends you desire and then generate the necessary database tables

/——-

./rapidsms syncdb

——-

and run RapidSMS!

/——-

./rapidsms route

——-

then open another window (or use screen! google ‘gnu screen’ for more info)

/——-

cd ~/projects/myprojectname

./rapidsms runserver

——-

and visit http://localhost:8000 in your browser

============================================

for GSM modem support via RubyGSM (optional)

============================================

*Note: on Windows and maybe other systems, you may need to download and install drivers for USB –> serial converter

Install necessary packages

/——

sudo apt-get install ruby ruby1.8-dev rdoc irb

——

Install ruby serial port bindings *Note: we have had better luck with toholio-serialport on ubuntu and mac osx, but your mileage may vary.

either via

/——

sudo apt-get install libserialport-ruby

——

or

/——

sudo gem install toholio-serialport (via gems.github.com — you may need to run $gem sources -a http://gems.github.com)

——

Download and install rubygems

*Note: the rubygems deb package (the one you would get via apt-get install rubygems) doesn’t work on Ubuntu, so we recommend building the latest version from source*

/——

mkdir ~/src

cd ~/src

http://rubyforge.org/frs/download.php/45905/rubygems-1.3.1.tgz

tar xzvf rubygems-1.3.1.tgz

cd rubygems-1.3.1

sudo ruby setup.rb

sudo ln -s /usr/bin/gem1.8 /usr/bin/gem

sudo gem update –system

——

Install the rubygems we need

*Note: on Windows, when installing Mongrel, choose windows-32 instead of ruby

/——

sudo gem install uuid rack mongrel

——

Clone or download rubygsm, rubysms, spomskyd from:

http://github.com/rapidsms/rubygsm (also available as a ruby gem via gems.github.com — you may need to run $gem sources -a http://gems.github.com)

http://github.com/rapidsms/rubysms

http://github.com/rapidsms/spomskyd

========================================================

for GSM modem support via Kannel and pyKannel (optional)

========================================================

Download, install, and configure Kannel. Visit Kannel’s website for more details.

Clone or download pyKannel from:

http://github.com/adammck/pykannel

==========================================================

for GSM handset support via Gnokii and pyGnokii (optional)

==========================================================

Download, install, and configure Gnokii. Visit Gnokii’s website for more details.

Clone or download pyGnokii from:

http://github.com/adammck/pygnokii

==========================================================

Seth’s install notes for Debian Lenny (5.0)

these are a rough guide for Debian Lenny. I will do further

testing with built-in packages and post follow-up notes.

==========================================================

sudo apt-get install python-mysqldb mysql-server

sudo apt-get install git-core

cd /usr/src

wget http://www.djangoproject.com/download/1.0/tarball/

tar -zxvf Django-1.0.tar.gz

cd Django-1.0

sudo python setup.py install

cd /usr/src

wget http://github.com/rapidsms/rapidsms/tarball/master

tar -zxvf unicefinnovation-rapidsms-19bdbb393417a9f5ee5a56b20983c21272ad700b.tar.gz

cd unicefinnovation-rapidsms-19bdbb393417a9f5ee5a56b20983c21272ad700b

sudo python setup.py install

sudo apt-get install ruby ruby1.8-dev rdoc irb build-essential bison debian-keyring flex

wget http://rubyforge.org/frs/download.php/45905/rubygems-1.3.1.tgz

tar -zxvf rubygems-1.3.1.tgz

cd rubygems-1.3.1

sudo ruby setup.rb

sudo ln -s /usr/bin/gem1.8 /usr/bin/gem

sudo gem update –system

sudo gem sources -a http://gems.github.com/

sudo gem update –system

sudo gem install toholio-serialport

sudo gem install uuid rack mongrel

mkdir /usr/local/projects

cd /usr/local/projects

rapidsms startproject myprojectname

cd myprojectname

cp rapidsms.ini local.ini

sudo ln -s /usr/local/projects/myprojectname/apps /usr/lib/python2.5/site-packages/apps

cp -apr cp -apr /usr/src/unicefinnovation-rapidsms-19bdbb393417a9f5ee5a56b20983c21272ad700b/apps/* /usr/projects/myprojectname/apps/

rapidsms syncdb

rapidsms route

rapidsms runserver