Tirex/Building and Installing

From OpenStreetMap Wiki
Jump to: navigation, search

Contents

Download

Tirex is available from the OSM Subversion repository at /applications/utils/tirex.

Currently you have to install from source or build your own Debian/Ubuntu packages as there are no ready-made packages available.

Prerequisites

You'll need the following Perl modules to run Tirex:

Perl module Debian/Ubuntu package
IPC::ShareLite libipc-sharelite-perl
JSON libjson-perl
GD libgd-gd2-perl
LWP libwww-perl

You'll need a C++ compiler and build tools to compile the Mapnik backend.

Building

To build Tirex run

 make

in the main directory. This will compile the mapnik backend and create the man pages for the Perl modules.

Call make clean to cleanup after a make.

Installing

To install Tirex call

 make install

as root user. This will install the main parts of Tirex including the tirex-master, tirex-backend-manager and the Mapnik backend.

This will not install the example map, or the munin or nagios plugins. To install those, call

 make install-example-map
 make install-munin
 make install-nagios

respectively. You can also install everything with

 make install-all

Debian/Ubuntu

To create Debian/Ubuntu packages you need the package devscripts installed. Call

 make deb

to create the packages. The following packages will be created in the parent directory:

Package name Description
tirex-core Core of the Tirex system including master, backend-manager, several tools, Perl libraries, example config, and test rendering backend
tirex-backend-mapnik The Mapnik rendering backend
tirex-backend-wms The WMS rendering backend
tirex-example-map Example map data and config for the Mapnik rendering backend
tirex-munin-plugin Munin plugins
tirex-nagios-plugin Nagios plugins
tirex-syncd Program to sync newly rendered tiles to another host

Call make deb-clean to cleanup after a make deb.

Tirex User and Group

All parts of the Tirex system expect to be run under a normal user ID, not root. You should create a tirex user and group on your system for this. The Debian/Ubuntu packages will do it for you. This user needs write access to the tile, statistics, and log directories as well as the pid files (typically under /var/lib/tirex, /var/log/tirex, and /var/run/tirex).

Tests

Call prove in the main directory to run Perl unit tests. You need Test::More (Debian/Ubuntu: libtest-simple-perl) and Test::Harness (Debian/Ubuntu: libtest-harness-perl) installed.

There are some other tests in the test directory. See the description at the beginning of the scripts for information on how to use them.

Personal tools
Namespaces
Variants
Actions
site
Toolbox