This repository has been archived by the owner on Dec 19, 2019. It is now read-only.
/
INSTALL.txt
83 lines (60 loc) · 2.96 KB
/
INSTALL.txt
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
How to install:
First, get yourself a Linux or Mac machine. Windows is going to be
too hard. If you are using Windows, install Ubuntu using VMWare,
VirtualBox, or something like that.
Next, there are some prerequesites. These are listed here:
http://code.djangoproject.com/wiki/GeoDjangoInstall (don't worry about
installing GeoDjango itself, just these prerequesites). We are using
PostgreSQL with PostGIS for this project. Note if using Ubuntu that
there are some problems using PostGIS with PostgreSQL 8.4, it's
better to use 8.3 (the package postgresql-8.3-postgis). 8.3 runs on
port 5433 instead of the standard 5432, so you'll have to edit
~/.silverlining.conf and set [devel] postgis.port = 5433
Once you have PostGIS installed you still don't have a PostGIS-enabled
table. Typically you'll do something like this:
$ createdb template_postgis
$ createlang --dbname=template_postgis plpgsql
$ psql template_postgis < path/to/postgis-files/lwpostgis.sql
$ psql template_postgis < path/to/postgis-files/spatial_ref_sys.sql
Then when you need to create a new PostGIS-enabled database, you'll
do:
$ createdb my_new_db -T template_postgis
Also make sure you have git installed.
Everything from here on out should be run as the user you will be
developing as. Nothing has to be run as root (except installing
PostgreSQL). Also nothing from here on out will write to any location
except the directories you provide. If something goes wrong you can
delete these directories and start over from scratch.
Now that you have that installed, you can install the software itself.
Grab the boot.sh file; don't check this repository out, just grab that
one file, from:
http://github.com/ianb/neighborly/raw/master/boot.sh
First we'll use it to install Silver Lining (http://cloudsilverlining.org):
$ chmod +x boot.sh
$ ./boot.sh setup-silver ~/src/silverlining
... stuff happens...
You'll need ~/src/silverlining/bin on your $PATH, or you can do:
$ alias silver="$HOME/src/silverlining/bin/silver"
Silver Lining likes to be configured when it is first started, so just
run "silver" and answer its questions. The questions primarily relate
to setting up new production environments, and you can just ignore
them (it writes these settings in ~/.silverlining.conf so you can edit
them later).
Next, run boot.sh again:
$ ./boot.sh ~/src/neighborly-app/
This check out all the libraries for the application. Now you'll be
able to run the server like:
$ cd ~/src/neighborly-app/
$ ./bin/django-admin.py syncdb
... stuff happens ...
$ silver serve .
Note that if you run ~/src/neighborly-app/bin/python that it will
start a Python environment with everything configured, allowing you to
access models and run tests.
If you need to change your database settings, edit
~/.silverlining.conf, adding something like:
[devel]
postgis.dbname = test_neighborly
postgis.user = postgres
postgis.password = s3cr3t
postgis.host = localhost:5433