Tirex/Building and Installing

From OpenStreetMap Wiki
Jump to: navigation, search
Available languages — Tirex/Building and Installing
· Afrikaans · Alemannisch · aragonés · asturianu · Aymar aru · azərbaycanca · Bahasa Indonesia · Bahasa Melayu · bamanankan · Bân-lâm-gú · Basa Jawa · Basa Sunda · Baso Minangkabau · bosanski · brezhoneg · català · čeština · corsu · dansk · Deutsch · eesti · English · español · Esperanto · estremeñu · euskara · français · Frysk · Gaeilge · Gàidhlig · galego · Hausa · hrvatski · Igbo · interlingua · Interlingue · isiXhosa · isiZulu · íslenska · italiano · Kiswahili · Kreyòl ayisyen · kréyòl gwadloupéyen · kurdî · Latina · latviešu · Lëtzebuergesch · lietuvių · Limburgs · magyar · Malagasy · Malti · Nederlands · Nedersaksies · norsk · norsk nynorsk · occitan · Oromoo · oʻzbekcha/ўзбекча · Plattdüütsch · polski · português · română · shqip · slovenčina · slovenščina · Soomaaliga · suomi · svenska · Tagalog · Tiếng Việt · Türkçe · Türkmençe · Vahcuengh · vèneto · walon · Wolof · Yorùbá · Zazaki · isiZulu · српски / srpski · авар · Аҧсшәа · башҡортса · беларуская · български · қазақша · Кыргызча · македонски · монгол · русский · тоҷикӣ · українська · Ελληνικά · Հայերեն · ქართული · नेपाली · भोजपुरी · मराठी · संस्कृतम् · हिन्दी · অসমীয়া · বাংলা · ਪੰਜਾਬੀ · ગુજરાતી · ଓଡ଼ିଆ · தமிழ் · తెలుగు · ಕನ್ನಡ · മലയാളം · සිංහල · བོད་ཡིག · ไทย · မြန်မာဘာသာ · ລາວ · ភាសាខ្មែរ · ⵜⴰⵎⴰⵣⵉⵖⵜ · አማርኛ · 한국어 · 日本語 · 中文(简体)‎ · 中文(繁體)‎ · 吴语 · 粵語 · ייִדיש · עברית · اردو · العربية · پښتو · سنڌي · فارسی · ދިވެހިބަސް

Download

Tirex is available from the Github repository at https://github.com/geofabrik/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 Fedora package
IPC::ShareLite libipc-sharelite-perl perl-IPC-ShareLite
JSON libjson-perl perl-JSON
GD libgd-gd2-perl perl-GD
LWP libwww-perl perl-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

If you want to create Debian/Ubuntu packages and install them, jump to #Debian/Ubuntu. Otherwise for normal installation 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 some packages installed:

sudo apt install devscripts libjson-perl libipc-sharelite-perl libgd-perl

For creating the deb-packages, call:

 make deb

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

For installing the packages call

sudo dpkg -i tirex-core.deb

To clean the deb files after generation, call make deb-clean.

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.