-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathINSTALL
More file actions
62 lines (38 loc) · 2.23 KB
/
Copy pathINSTALL
File metadata and controls
62 lines (38 loc) · 2.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
None of this should be run as root except apt-get.
~$ git clone git://github.com/torhve/Turan.git turansite
~$ sudo apt-get install python-sqlite python-dev python-virtualenv python-markdown python-bs4 python-simplejson python-pyproj python-beautifulsoup python-openpyxl
~$ virtualenv turan-env
~$ . turan-env/bin/activate
(turan-env) ~$ cd turansite
(turan-env) ~/turansite$ vim local_settings.py
Add database settings ex:
o DATABASE_ENGINE = 'sqlite3'
Change directory of storage ex:
o GPX_STORAGE = '/home/localuser/dev/turansite/site_media/turan'
(pinax-env) ~/turansite$ ./manage.py syncdb
(pinax-env) ~/turansite$ ./manage.py migrate
(pinax-env) ~/turansite$ mkdir site_media
(pinax-env) ~/turansite$ ./manage.py build_media -l --all
# User creation crashes on sqlite, probably because of INTEGER type, and quotes.
# Bypass this by creating the user manually:
# INSERT INTO "auth_user" ("username", "first_name", "last_name", "email", "password", "is_staff", "is_active", "is_superuser", "last_login", "date_joined") VALUES ('admin', '', '', 'admin@turan', '', 0, 1, 0, '2011-01-01 00:01:01.000000', '2011-01-01 00:01:01.000000');
# INSERT INTO "account_account" ("user_id", "timezone", "language") VALUES (1, 'Europe/Oslo', 'nn');
# Creating the schema on mysql crashes. Something about the decimal data-type
(pinax-env) ~/turansite$ ./manage.py shell
>>> from django.contrib.sites.models import Site
>>> Site.objects.create(pk=1, domain='mdev.5buckchuck.com', name='5buckchuck.com')
# Before you make the server be sure that both your database engine, and
# messageque is running.
# You also need gpsbabel.
# You also need to set up the default database, but that is magic-sauce!
INSERT INTO turan_exercisetype VALUES (null, '"Exercise"', '', 1, 1);
# Be sure to add the celery user to rabbitmq, if you are using that
# $ rabbitmqctl add_user turan tur4n
# $ rabbitmqctl add_vhost turan
# $ rabbitmqctl set_permissions -p turan turan ".*" ".*" ".*"
(pinax-env) ~/turansite$ ./manage.py runserver <ip>:8082
SUCCESS! Now go to http://<ip>:8082/
# Start celerydaemon to get the whole site working
(pinax-env) ~/turansite$ ./manage.py celeryd
Remember to activate the virualenv by sourcing ./pinax-env/bin/activate
before using manage.py.