| 1 | = 1. Installation & Configuration = |
| 2 | == 1.1 Python == |
| 3 | This project runs on Python, so let's install that first. |
| 4 | {{{ |
| 5 | $ sudo apt-get install python |
| 6 | }}} |
| 7 | Make sure you get Python 2.6 due to compatibility with used plugins. |
| 8 | |
| 9 | == 1.2 MySQL & MySQLdb == |
| 10 | Set up a MySQL server to your liking. Make sure you get as minimal version 3.23-5.1 due to the MySQLdb support. Then create a database for django_gheat. |
| 11 | {{{ |
| 12 | $ sudo apt-get install mysql-server |
| 13 | $ sudo mysqladmin password password |
| 14 | $ echo "CREATE DATABASE project_heatmap;" | mysql -uroot -ppassword |
| 15 | }}} |
| 16 | |
| 17 | Now get the latest MySQLdb, make sure it's higher than 1.2.1p2. |
| 18 | {{{ |
| 19 | $ sudo apt-get install python-mysqldb |
| 20 | }}} |
| 21 | |
| 22 | == 1.3 Django == |
| 23 | Get Django 1.3 from [http://www.djangoproject.com/download/1.3/tarball/ here] or check for a newer version [http://www.djangoproject.com/download/ here], then: |
| 24 | {{{ |
| 25 | $ tar xzvf Django-1.3.tar.gz |
| 26 | $ cd Django-1.3 |
| 27 | $ sudo python setup.py install |
| 28 | }}} |
| 29 | |
| 30 | == 1.4 Django_gheat == |
| 31 | Get the latest django_gheat from the [http://svn.wirelessleiden.nl/svn/projects/Heatmap/src/ repository] |
| 32 | {{{ |
| 33 | # cd to where you want 'django_gheat' to be located |
| 34 | $ svn co http://svn.wirelessleiden.nl/svn/projects/Heatmap/src/django_gheat/ |
| 35 | $ cd django_gheat/ |
| 36 | }}} |
| 37 | |
| 38 | Open {{{./settings.py}}}, look for the 'DATABASES' section and edit the following lines: |
| 39 | {{{ |
| 40 | # If you are using MySQL with MySQLdb, don't edit this line. |
| 41 | # If you are using a different database, replace 'mysql' with 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. |
| 42 | 'ENGINE': 'django.db.backends.mysql', |
| 43 | # The name of your database, or the path to your database file if you are using sqlite3. |
| 44 | 'NAME': ' ', |
| 45 | # Connection settings for your database. Not used with sqlite3 |
| 46 | 'USER': ' ', |
| 47 | 'PASSWORD': ' ', |
| 48 | 'HOST': ' ', |
| 49 | 'PORT': ' ', |
| 50 | }}} |
| 51 | |
| 52 | Continue to [wiki:model_data Models & Data import] |