Skip to content

Install personal dev environment

Stefan Midjich edited this page Mar 7, 2018 · 10 revisions

Installing a personal dev environment

Here is a much shorter document, than this, showing how to quickly get siptrack up and running in a small personal environment for testing or development.

This guide was last tested on CentOS 7 with Python 2.7.5.

Install dependencies with yum

$ sudo yum install openssl-devel gcc libffi-devel openldap-devel mariadb-devel python-virtualenv git pwgen

Create virtualenv

$ mkdir venv
$ virtualenv venv/siptrack
$ . venv/siptrack/bin/activate

Clone repos

$ git clone
$ git clone
$ git clone

Install siptrack client lib

$ cd siptrack
$ python install
$ cd ..

Install and run siptrackd API server

$ cd siptrackd
$ pip install -r requirements.txt
$ python install

Run siptrackd

First you can test it in the foreground like this.

$ ./siptrackd -l - -b stsqlite -s storage.cfg --searcher=whoosh \

Then run it as a daemon like this.

$ ./siptrackd -l siptrackd.log -d -b stsqlite -s storage.cfg \
    --searcher=whoosh --searcher-args=/tmp/whoosh-index

Example of storage.cfg:

password=secret password.


Run siptrackd with MySQL

Assuming you have a sql server on localhost, a user named siptrack with access to a database called siptrack_dev.

Copy storage.cfg to storage_dev.cfg and add your DB info to it like this.

password=secret password.

Run siptrackd like this from the siptrackd directory.

$ ./siptrackd -l - -b stmysql -s storage_dev.cfg --searcher=whoosh \

Install and run siptrackweb

$ cd siptrackweb
$ pip install -r requirements.txt
$ python install
$ django-admin startproject stweb
$ cd stweb

Edit the following in the file stweb/

SIPTRACK_SERVER = 'localhost'
DATABASE_NAME = 'siptrackweb'
TIME_ZONE = 'Europe/Copenhagen'

# Application definition


Also remove the line about CSRF middleware from MIDDLEWARE_CLASSES.


Then edit stweb/ so it contains the following.

from django.conf.urls import url, include
from django.contrib import admin

urlpatterns = [
    url(r'', include('siptrackweb.urls')),

Now create the database, and run the dev-server.

$ python migrate
$ python runserver

Now go to http://localhost:8000/ and login as user admin, password admin.