root/Core/trunk/INSTALL

Revision 1181, 4.6 KB (checked in by wyatt, 3 years ago)

Updated for new repo structure and latest dependencies.

Line 
1byCycle Trip Planner - Installation
2+++++++++++++++++++++++++++++++++++
3
4Created 2006-01-23
5
6
7Packages
8========
9
10byCycle is developed on Ubuntu 9.04  and deployed to Fedora Core 9. This
11section includes the packages needed for both.
12
13Dev Tools
14---------
15All: subversion
16
17PostgreSQL 8.x
18--------------
19All: postgresql
20Ubuntu: libpq-dev postgresql-server-dev-8.3
21FC9: postgresql-server postgresql-devel
22
23GEOS 3
24------
25Ubuntu: libgeos-3.0.0 libgeos-dev
26FC9: geos geos-devel
27
28Proj 4.5.0
29----------
30All: proj
31FC9: proj-devel proj-epsg
32
33PostGIS
34-------
35All: postgis
36Ubuntu: postgresql-8.3-postgis
37
38Python 2.6 <http://www.python.org/>
39-------------------------------------
40Python development package is needed by psycopg2
41Ubuntu: python2.6-dev
42FC9: python-devel
43
44
45Python Packages
46===============
47
48# The current preferred way to install byCycle for development is to use
49# virtualenv <http://pypi.python.org/pypi/virtualenv>.
50sudo easy_install virtualenv
51cd <some project directory>
52virtualenv byCycle
53cd byCycle
54mkdir src
55source bin/activate
56
57# Most of the python packages required by byCycle are automatically installed
58# when byCycle is easy_installed, but PCL must be installed "manually" because
59# it isn't eggified or uploaded to PyPI.
60
61# Python Cartographic Library (PCL) - Core 0.11.0
62# Depends on Proj and GEOS for some operations
63# Depends on libgeos-dev
64# Depends on zope.interface
65# On FC9, depends on proj-epsg (will segfault without it)
66cd src
67wget http://gispython.org/downloads/gispy/PCL-0.11.0.tar.gz
68tar xvzf PCL-0.11.0.tar.gz
69cd PCL-0.11.0/PCL-Core
70python setup.py install
71
72
73Installation of byCycle Core
74============================
75
76# Check out the code in virtualenv code directory. Use guest:guest credentials
77# unless you've got an SVN login.
78svn co http://guest:guest@code.bycycle.org/byCycle/Core/trunk src/byCycle/Core
79
80Installation
81------------
82You'll need to create the file src/byCycle/Core/trunk/bycycle/core/model/.pw
83containing a single line with your PostgreSQL password. See Configuration
84section below for more info on setting up Postgres.
85
86Development
87~~~~~~~~~~~
88In src/byCycle/Core/trunk, run `python setup.py develop`
89
90Production
91~~~~~~~~~~
92See Development
93
94Testing
95-------
96In trunk, run `nosetests`
97
98
99Installation of Trip Planner Web App
100====================================
101
102TODO: This probably belongs in a different document--i.e., with the Pylons
103app. That doc should start out by saying, "First, install the byCycle core and
104its dependencies using the instructions at..."
105
106# Check out the trip planner Web app (in virtualenv repo directory).
107# Use guest:guest credentials unless you've got an SVN login.
108svn co http://code.bycycle.org/byCycle/TripPlanner/trunk src/byCycle/TripPlanner
109
110Installation
111------------
112
113Development
114~~~~~~~~~~
115In src/byCycle/TripPlanner/trunk, run `python setup.py develop`
116
117Production
118~~~~~~~~~
119See Development
120
121Testing
122-------
123# More unit tests needed
124cd src/byCycle/TripPlanner/trunk
125paster serve --reload development.ini
126firefox http://localhost:5000/
127
128Google Map
129----------
130If you want to view the Google Map, you will need a Google Maps API key.
131<http://www.google.com/apis/maps/>.
132
133
134Configuration
135=============
136
137PostgreSQL
138----------
139
140* Edit pg_hba.conf. On Ubuntu, this is at /etc/postgresql/8.3/main/pg_hba.conf.
141  On FC9, this in the Postgres data directory.
142
143  * Set local auth to trust (not the Database administrative login by UNIX
144    sockets; the one below that)
145
146  * Make sure IPv4 host auth is set to md5
147
148* Switch to postgres user ($USER refers to the OS username of the user you
149  will be running byCycle under)
150  * `createdb $USER`
151
152  * `createuser $USER` (n, n, n in response to prompts)
153
154  * `createlang plpgsql $USER`
155
156  * `psql -d $USER` then `ALTER ROLE $USER password 'sekret';`
157
158  * Insert lwpostgis.sql and spatial_ref_sys.sql into bycycle DB. These files
159    are in /usr/share/postgresql-8.3-postgis on Ubuntu.
160    * `psql -d $USER < lwpostgis.sql`
161    * `psql -d $USER < spatial_ref_sys.sql`
162
163  * Change owner of public schema and all tables to $USER
164    * `psql -d $USER`
165    * `ALTER DATABASE $USER OWNER TO $USER;`
166    * `ALTER SCHEMA public OWNER TO $USER;`
167    * `ALTER TABLE geometry_columns OWNER TO $USER;`
168    * `ALTER TABLE spatial_ref_sys OWNER TO $USER;`
169
170* Exit from postgres user
171
172* Run Core/trunk/bycycle/core/scripts/integrate.py for each region. The
173  following is an example for Portland, OR.
174  * `cd src/byCycle/Core/trunk/bycycle/core/scripts`
175  * `./integrate.py -r portlandor -d pirate -l str`
176
177Deployment
178==========
179
180Apache 2 <http://httpd.apache.org/>
181Paste server behind mod_proxy
182
183
184Issues
185======
186
187If you have any problems with any of this, please feel free to contact us.
188
189Email: wyatt@bycycle.org
190
Note: See TracBrowser for help on using the browser.