Blog

Kurzanleitung: OSM-Tileserver aufsetzen

Not for production use!

Eine Anleitung in Minimalform für Ubuntu, die vielleicht eines Tages sprechender wird.

apt-get install postgresql-9.1-postgis

edit /etc/postgresql/9.1/main/pg_hba.conf:

replace
local   all             all                                     peer
with
local   all             all                                     trust

and

host    all             all             127.0.0.1/32            md5
with
host    all             all             127.0.0.1/32            trust

/etc/init.d/postgresql reload

apt-get install osm2pgsql

psql gis gisuser

(tar -xzf /mnt/world_boundaries-spherical.tgz
tar xjf /mnt/shoreline_300.tar.bz2 -C world_boundaries
unzip /mnt/10m-populated-places.zip -d world_boundaries
unzip /mnt/110m-admin-0-boundary-lines.zip -d world_boundaries)

/osm/bin/mapnik/generate_xml.py --host localhost --port 5432 --user gisuser --dbname gis --symbols ./symbols/ --world_boundaries ./world_boundaries/ --accept-none

sudo -u prodeng osm2pgsql -a -d gis /mnt/baden-wuerttemberg.osm.bz2
sudo -u prodeng osm2pgsql -a -d gis /mnt/bayern.osm.bz2

cd /osm/bin/mapnik/
sudo -u prodeng ./generate_tiles_multiprocess.py (The script has to be customized to render the desired files, customization is done at the end of the file)