Development environment setup - uggla/opentracks GitHub Wiki

  1. Install Fedora or any recent GNU / Linux distribution Note : The following notes works on Fedora based distribution
  2. Install pip : yum install python-pip
  3. Install apache : yum install httpd
  4. Install mysql : yum install mysql-server mysql php-mysql MySQL-python
  5. Install phpMyAdmin to manage DB : yum install phpMyAdmin
  6. Install C/C++ compiler (note : may require more packages) : yum install gcc
  7. Install virtualenvwrapper to allow dedicated python environment : pip-python install virtualenvwrapper
  8. Create an opentracks virtual environment : mkvirtualenv opentracks
  9. Check virtual environment is available : lsvirtualenv
  10. Switch to the environment : workon opentracks
  11. Clone opentracks files from github : git clone git://github.com/uggla/opentracks.git
    or using http : git clone https://github.com/uggla/opentracks.git
    (note : if you need a proxy : export http_proxy=http://proxy_fqdn:port)
  12. Install python modules required by opentracks. Modules required are defined into file opentracks/python_pip_modules.txt : pip install django
    pip install MySQL-python note : this package may need more libraries to be built.
    ...
    or in one shot : for i in $(cat python_pip_modules.txt | awk -F'=' '{print $1}');do pip install "$i";done
    or newly found : pip install -r python_pip_modules.txt
  13. Create an opentracks database
  14. Set database settings into opentracks/opentracks/settings.py.
    Into DATABASES section, modify the following keys to :
    'ENGINE': 'django.db.backends.mysql'
    'NAME': 'db name' usually 'NAME': 'opentracks'
    'USER': 'app_user_name' usually 'USER': 'opentracks'
    'PASSWORD': 'app_user_name password'
  15. Synchronize the database : python manage.py syncdb