VMWare Image

Hi out there,

Is there a ready to go VMWare Image with a complete OSM Server available?
I found a few helpfull “how tos” to set up my own OSM Server, but I wasn’t able to finish it.
Alterantivly does anybody have a step by step tutorial which ends with a working server?
Any help is very welcome!
Is there a developer/company out there, that sells services regarding OSM?


PS: I was looking for a equvivalent topic but I couldn’t find it. So please don’t be angry if there is already a thread dealing with that issue!

Cloudmade and several other companies just like them sell custom map tile services.

As for how to set it up, it’s a major pain in the butt, also what distro are you trying to set it up on?

Thanks for your reply!

I was playing around with an ubunto server. But I really don’t care about the Distribution. Are you maybe interessted in earning some money and setting up such a vmware image? For me it will also be OK to provide the Image to the community afterwards. Or do you maybe know somebody willing to help me?

I managed to calculate the tiles. Does somebody know a tutorial of how to deliver the tiles to clients?


I’m willing to help you to get it running if you create a doco on how to get it running.

I’m using debian which is close enough to ubuntu to not matter for the most part.

The software used for this is generally not mature enough to use from ubuntu debs, it’s best to check them out of SVN and compile them yourself.

You will need to install pgsql and postgis, I can’t find the details I followed to set this up, but it was pretty straight forward.

You then need to download an extract to import, that is unless you want the whole world, in which case you pull down a copy of the planet file.

For extracts have a look here: http://download.geofabrik.de/osm/

from there you need to grab osm2pgsql from svn

cd /usr/src/
svn co http://svn.openstreetmap.org/applications/utils/export/osm2pgsql/

You then need to build the code, apt-get install build-essential should install most utils you need then I think you just do this:

cd osm2pgsql

Once that builds you can make install or just copy the osm2pgsql into /usr/bin or somewhere in your paths already.

then you can do this:

osm2pgsql -s 'filename.osm.bz2'

You can apply updates from change files by doing this:

osm2pgsql -a -s 'filename.osc.gz'

I assume from previous messages you are already up to about here.

Next you will need to:

apt-get install apache2 apache2-mpm-prefork apache2-prefork-dev apache2-utils apache2.2-common

Then you need to get mapnik and a few other things from SVN:

cd /usr/src
svn co http://svn.openstreetmap.org/applications/rendering/mapnik/
svn co http://svn.openstreetmap.org/applications/utils/mod_tile/

I can’t exactly remember how I built mapnik but it was pretty straight forward.

in mod_tile again I can’t remember the details but was pretty straight forward, you then just copy the apache2 module into /usr/lib/apache2/modules/

mod_tile also comes with rendered, you will probably need to compile this seperate to mod_tile, it’s a bg daemon that mod_tile talks to.

Then it’s just a bunch of config stuff.

you need to load the mod_tile module in apache, and config a virtual host using the default config mod_tile comes with, you also need to copy the default config for rendered into /etc

I forget how I got my config setup for my system, there was a util that did it, but I copied the resulting osm.xml into /var/lib/mod_tile and updated the apache config and rendered.conf to use this file.

I can try and figure out what I’ve done in more detail, but hopefully this points you in the right direction and you can fill in my blanks.


OK! Deal. I will start tomorrow morning!



OK, I think I installed and configured everything. I’m able to generate tiles and images. I also installed mod_tile + renderd and was abel to start apache with those settings.
BUt I’m still stuck. Now I was expecting that if I browse to something like http://localhost/XXX that I then see the maps. What steps did I forget? WHat do I have to do next? How can I include my generated tiles to my /var/www/ directory?
Here my documentation up to now:

Get and install Subversion:
sudo apt-get install subversion unzip

Download of the map file:
wget http://ftp.heanet.ie/mirrors/openstreetmap.org/planet-latest.osm.bz2

Download and install Postgres:
sudo apt-get install postgresql-8.3-postgis postgresql-contrib-8.3

Configure Postgres (edit /etc/postgresql/8.3/main/postgresql.conf):
shared_buffers = 128MB # 16384 for 8.1 and earlier
checkpoint_segments = 20
maintenance_work_mem = 256MB # 256000 for 8.1 and earlier
autovacuum = off

System settings (edit /etc/sysctl.conf):

Restart Postgres:
sudo /etc/init.d/postgresql-8.3 restart

Create the Postgreas DB:
sudo -u postgres -i
createuser username # answer yes for superuser
createdb -E UTF8 -O username gis
createlang plpgsql gis

Set up PostGIS:
psql -d gis -f /usr/share/postgresql-8.3-postgis/lwpostgis.sql
echo “ALTER TABLE geometry_columns OWNER TO YOURUSERNAME***; ALTER TABLE spatial_ref_sys OWNER TO YOURUSERNAME***;” | psql -d gis
psql gis < /usr/share/postgresql/8.3/contrib/_int.sql

Get and Install Mapnik + Dependencies:
sudo apt-get install libltdl3-dev libpng12-dev libtiff4-dev libicu-dev
sudo apt-get install libboost-regex-dev libboost-iostreams-dev
sudo apt-get install libboost-filesystem-dev libboost-thread-dev
sudo apt-get install libfreetype6-dev libcairo2-dev libcairomm-1.0-dev
sudo apt-get install libboost-program-options-dev python-cairo-dev
sudo apt-get install libboost-serialization-dev
sudo apt-get install imagemagick

mkdir src
cd src
svn co http://svn.mapnik.org/trunk/ mapnik
cd mapnik

python scons/scons.py
sudo python scons/scons.py install
sudo ldconfig

Install osm2pgsql:
sudo apt-get install build-essential libxml2-dev libgeos-dev libpq-dev libbz2-dev proj
svn co http://svn.openstreetmap.org/applications/utils/export/osm2pgsql/
cd osm2pgsql
cd ~
svn co http://svn.openstreetmap.org/applications/rendering/mapnik/
cd mapnik
wget http://tile.openstreetmap.org/world_boundaries-spherical.tgz
tar zxvf world_boundaries-spherical.tgz
wget http://hypercube.telascience.org/~kleptog/processed_p.zip
unzip processed_p.zip
mv coastlines/* world_boundaries/
rmdir coastlines
cd world_boundaries
wget http://tile.openstreetmap.org/shoreline_300.tar.bz2
tar xvjf shoreline_300.tar.bz

Get and install Java:
sudo apt-get install sun-java6-jdk

Get latest osmosis and install it:
wget http://gweb.bretth.com/osmosis-latest.tar.gz
tar xvfz osmosis-latest.tar.gz

configure Osmosis:
cd osmosis-XXX
./bin/osmosis --read-xml /home/username/planet-090311.osm.gz --bounding-box left=-94 bottom=38 right=-71.5 top=50 --write-xml /home/username/GreatLakes.osm.gz
time ./osm2pgsql --slim -d gis GreatLakes.osm.gz

Edit time ./osm2pgsql --slim -d gis GreatLakes.osm.gz:

This is the name of the database where the OSM data is stored.

export MAPNIK_DBNAME=‘osm’

Get and install Apache:
apt-get install apache2 apache2-mpm-prefork apache2-prefork-dev apache2-utils apache2.2-common

Get and install mod_tile:
cd ~
svn co http://svn.openstreetmap.org/applications/utils/mod_tile/
cd mod_tile
make install

edit and install renderd:
cp renderd.conf /etc/

You don’t want to do that, renderd + mod_tile look for them in /var/lib/mod_tile by default you also need to config up a seperate IP/hostname to have for the tile rendering config in apache, then mod_tile just does it’s thing and hands off the request to renderd if the tile isn’t found.


I finaly got it up and running.
I had problems to start the renderd demon.
First of all it couldn’t create the /var/run/renderd folder.
Then I also had to set the permissions of that folder to be writable and to start renderd as normal (non root) user.

I will have to update the documentation and make further configuration.