Skip to content
manuelnaranjo edited this page Apr 9, 2012 · 22 revisions

Installation

Preparation

No matter if you install the release or the devel version there's some initial setup that needs to be done:

sudo apt-get install python-dbus python-virtualenv

Release Version

virtualenv --system-site-packages OpenProximity-Release-VirtualEnv
virtualenv --relocatable OpenProximity-Release-VirtualEnv
cd OpenProximity-Release-VirtualEnv
./bin/pip install OpenProximity

Development Version

sudo apt-get install python-dev libxslt1-dev
virtualenv --system-site-packages OpenProximity-Devel-VirtualEnv
virtualenv --relocatable OpenProximity-Devel-VirtualEnv
cd OpenProximity-Devel-VirtualEnv
./bin/pip install -U -e git+http://github.com/OpenProximity/OpenProximity.git#egg=OpenProximity

During installation you may find missing dependencies. If this happens install these packages manually:

./bin/pip install pytz django-timezones-op poster django-restapi-op django-extensions django-mailer django-rosetta configglue CherryPy
sudo apt-get install python-dbus

Standalone Running

All this commands must be started from the folder you used for installation no matter if you took the devel or the official release.

  • Web Server: ./bin/OpenProximity-manage runcpserver
  • RPC Server: ./bin/OpenProximity-manage rpc
  • Client Scanner: ./bin/OpenProximity-manage rpcclient --rpc_client_client_mode=scanner
  • Client Uploader: ./bin/OpenProximity-manage rpcclient --rpc_client_client_mode=uploader

Running as Service

OpenProximity was desinged to run as a service. For that to happen we developed some simple scripts that allow it to start and run in the background without any user interaction.

This scripts need some modifications because they depend on the exact path where you installed OpenProximity (no matter if devel or release version). A helper script is provided that will do all the setup for you. It uses the upstart process management.

wget https://raw.github.com/OpenProximity/OpenProximity/master/upstart/install.sh
bash install.sh /home/aircable/OpenProximity-Devel-VirtualEnv
(or wherever the installation is)

Once the upstart config files are in place (/etc/init) you may start the services manually in the first place with:

sudo start openproximity-rpc
sudo start openproximity-web

When the system reboots it will start the 4 services automatically.

Problem solution

python dbus WIP could be broken!

On some Ubuntu releases we noticed that even though python dbus is supported the virtualenv can't see it. If this is your case then this will fail:

cd OpenProximity-Devel-VirtualEnv
bin/python -c "import dbus"

If this is your case then you will have to follow a few extra steps:

cd OpenProximity-Devel-VirtualEnv
CWD=$(pwd)
source bin/activate
wget http://dbus.freedesktop.org/releases/dbus-python/dbus-python-1.0.0.tar.gz
gunzip -c dbus-python-1.0.0.tar.gz | tar -xv
sudo apt-get install libdbus-1-dev libdbus-glib-1-dev
cd dbus-python-1.0.0
./configure --prefix=$CWD
make
make install
cd ..
wget http://ftp.gnome.org/pub/GNOME/sources/pygobject/3.2/pygobject-3.2.0.tar.xz
xz -dc pygobject-3.2.0.tar.xz  | tar -xv
sudo apt-get install gobject-introspection libgirepository1.0-dev
./configure --prefix=$CWD
make
make install
Clone this wiki locally