Tech:Open Source/Setup/GIS Apps
From Cyclopath
Contents |
[edit] Compile GIS Apps
[edit] GEOS
FIXME Explain what GEOS is for
If you want, you can copy this from something else, provided their architecture is similar. Otherwise, build it
cd /export/scratch/checkout wget http://download.osgeo.org/geos/geos-3.2.0.tar.bz2 tar xvf geos-3.2.0.tar.bz2 cd geos-3.2.0 ./configure --prefix=/export/scratch/reid/geos make make check make install
Next, edit ld.so.conf
sudo gvim /etc/ld.so.conf
It should have just one line. Add the location of the GEOS lib
include /etc/ld.so.conf.d/*.conf /export/scratch/reid/geos/lib
Reload ld.so.conf
sudo ldconfig
Finally, fix the permissions on the geos directory
chmod 2755 /export/scratch/reid/geos fixperms --public /export/scratch/reid/geos
[edit] PostGIS
FIXME Briefly describe what this is
[edit] PostGIS 1.3.6
Core developers can copy PostGIS from a machine with a similar architecture using
cp -R /scratch/ugly/reid/postgis-1.3 /export/scratch/
Open Source developers should Download PostGIS. Or wget it
wget http://postgis.refractions.net/download/postgis-1.3.6.tar.gz tar xvf postgis-1.3.6.tar.gz cd postgis-1.3.6
Configure the source to install locally, to use geos, and to use Psql, and then build and install it.
./configure --prefix=/export/scratch/reid/postgis-1.3 \
--with-geos=/export/scratch/reid/geos/bin/geos-config \
--with-pgsql=/usr/lib/postgresql/8.3/bin/pg_config
make
make install
Fix the permissions of the installation
chmod 2775 /export/scratch/reid/postgis-1.3 fixperms --public /export/scratch/reid/postgis-1.3
[edit] PostGIS 1.1.6
The step applies to core developers who need to use db_clone.
For db_clone to work, you have to install PostGIS 1.1.6.
I couldn't get this to compile from source against geos, but copying over an existing build did the trick. (The build complained, "lwgeom_geos_c.c:84: warning: implicit declaration of function `VARATT_SIZEP".)
Fortunately, only core developers need postgis-1.1.6, and it works on both x32 and x64, so just grab it from someone else, i.e.,
cp -R /scratch/ugly/reid/postgis-1.1.6 /export/scratch/reid
Cleanup with a fixperms
fixperms --public /export/scratch/reid/postgis-1.1.6
[edit] Python 2.5.2
Ubuntu 9.04's package manager installs 2.6.2, and Cyclopath currently runs on Python 2.5.2, so grab it and install it locally. (And you can't apt-get python2.5 'cause that gets the latest 2.5, i.e., 2.5.4.)
Open Source developers can choose to skip this step, as Cyclopath is known to run on Python 2.6, but there's no guarantee everything will work perfectly. Core developers should stick with 2.5.2 to eliminate chanches of things not working.
Download the Python 2.5.2 source and compile it.
cd /export/scratch/checkout wget http://www.python.org/ftp/python/2.5.2/Python-2.5.2.tar.bz2 tar xvf Python-2.5.2.tar.bz2 cd Python-2.5.2 ./configure --prefix=/export/scratch/opt/python/python2.5 make make install
FIXME Document changing routed and mod_python to use 2.5.2
[edit] Tile Generation and Cache
[edit] Mapnik
Open Source developers should download tiles from Source_Code.
Core developers should ignore this step and instead copy tiles from another developer. Mapnik is also being replaced by MapServer in a future version of Cyclopath.
[edit] MapServer
FIXME These are pre-mature instructions. The MapServer code is currently under review and not in the trunk yet.
Do not do this.
sudo apt-get install libgdal-dev rm -rf /export/scratch/reid/mapserver /export/scratch/reid/tilecache/ cd scripts/tiles rm -rf mapserver-5.4.2* tilecache ./setup.sh > setup.log
[edit] TileServer
FIXME Document
