Tirex/Quick Start

From OpenStreetMap Wiki
Jump to: navigation, search

To quickly get Tirex running follow these steps:

  • Build Debian packages for Tirex according to this.
  • Install the tirex-core package.
  • The tirex-master and tirex-backend-manager should be running.
  • Check by running tirex-status --once --extended, this should show you the config and current status of the master.
  • Find the log files, probably /var/log/messages, with the startup messages from the master and backend-manager. You'll probably need those logfiles later.
  • The default configuration comes with a test map. Render your first metatile with tirex-batch --prio=1 map=test z=0 x=0 y=0. This should create a file called /var/lib/tirex/tiles/test/0/0/0/0/0/0.meta.
  • Configure mod_tile using at least these options:
   ModTileRenderdSocketName /var/lib/tirex/modtile.sock
   ModTileTileDir           /var/lib/mod_tile
   AddTileConfig            /tiles/test/ test

Create a soft link from /var/lib/mod_tile to /var/lib/tirex/tiles:

 ln -s /var/lib/tirex/tiles /var/lib/mod_tile

(The link is needed because there currently is a bug in mod_tile that makes it only work with /var/lib/mod_tile as tile directory, see here).

This gives you access to the test tiles under http://hostname/tiles/test, configure your OpenLayers map accordingly. The test tiles show a checkerboard pattern with red borders around metatiles.

Once the test backend works, you can go on with installing Mapnik and the mapnik backend:

  • Install the tirex-backend-mapnik and tirex-example-map packages.
  • In addition to the test map you now have a map called example that uses Mapnik to create a simple map showing the continents. Add AddTileConfig /tiles/example/ example to your Apache/mod_tile config and add it to OpenLayers. You should be able to see the map.