-
Notifications
You must be signed in to change notification settings - Fork 5
Software installation
Tutorial for installation of all third party software components needed to run MTB Map project. Following steps should work on fresh Ubuntu 12.04 LTS installation.
sudo apt-get install git-core wget tar unzip bzip2 build-essential python-pip g++ gcc libxml2-dev libbz2-dev automake
sudo apt-get install postgresql-9.1 postgresql-contrib-9.1 postgresql-server-dev-9.1 postgresql-client-9.1
Projection library can be installed from packages. GDAL and GEOS are installed from source. We need current versions.
Projection library
sudo apt-get install proj libproj-dev
GEOS
Download and unpack source files. More up-to-date information can be found at http://trac.osgeo.org/geos/wiki/BuildingOnUnixWithAutotools
wget http://download.osgeo.org/geos/geos-3.3.9.tar.bz2
tar xvjf geos-3.3.9.tar.bz2
Build it in GEOS directory:
./configure
make
sudo make install
GDAL
Download and unpack source files. More up-to-date information can be found at http://trac.osgeo.org/gdal/wiki/BuildingOnUnix
wget http://download.osgeo.org/gdal/1.10.1/gdal-1.10.1.tar.gz
tar xvfz gdal-1.10.1.tar.gz
Change directory and build:
./configure
make
sudo make install
Install version >= 2.1.0, more info here: http://postgis.net/docs/manual-2.1/postgis_installation.html
wget http://download.osgeo.org/postgis/source/postgis-2.1.0.tar.gz
tar xvfz postgis-2.1.0.tar.gz
cd postgis-2.1.0
./configure
make
sudo make install
Download current GIT version, see http://wiki.openstreetmap.org/wiki/Osm2pgsql for more info. Installation is not necessary. You may want to read PBF files. Install following libraries:
sudo apt-get install libprotobuf-c0-dev protobuf-c-compiler
Now it is possible to compile Osm2pgsql from source:
git clone https://github.com/openstreetmap/osm2pgsql.git
cd osm2pgsql
./autogen.sh
./configure
sed -i 's/-g -O2/-O2 -march=native -fomit-frame-pointer/' Makefile
make
Use latest stable version of mapnik, see https://github.com/mapnik/mapnik/wiki/UbuntuInstallation for current info. Install dependencies:
sudo apt-get install libicu-dev python-dev libfreetype6 libfreetype6-dev libjpeg-dev libltdl7 libltdl-dev libpng-dev libtiff-dev libcairo2 libcairo2-dev python-cairo python-cairo-dev libcairomm-1.0-1 libcairomm-1.0-dev ttf-unifont ttf-dejavu ttf-dejavu-core ttf-dejavu-extra python-nose clang libpq-dev
sudo apt-get install libboost-filesystem1.48-dev libboost-program-options1.48-dev libboost-python1.48-dev libboost-regex1.48-dev libboost-system1.48-dev libboost-thread1.48-dev
Download and install from source:
git clone https://github.com/mapnik/mapnik
cd mapnik
git checkout v2.2.0
./configure
make
sudo make install
sudo ldconfig
Try to import mapnik library in python console. No output means success:
python
>>> import mapnik
>>>
We use web server Apache with mod_wsgi:
sudo apt-get install apache2 apache2-prefork-dev apache2-utils
sudo pip install "Django>=1.6,<1.7" django-transmeta South
sudo apt-get install python-psycopg2
sudo pip install Pillow numpy cairosvg
Basic software needed to start development locally is installed. You can set up MTB map project now. If you want to enable routing, follow Routing-Installation instructions. To set up tile serving functionality, see Tile-Server-Setup