Skip to content

Commit be0d5fe

Browse files
authored
Add docs on how to compile on Debian 12 (#309)
* Copy the Ubuntu 20.04 docs to Debian 12 * Update debian docs to refer to proper location of example map * update debian docs to match what mapnik installs * Update debian docs to match the installed URL * Link to debian docs in README
1 parent 07c8ad1 commit be0d5fe

2 files changed

Lines changed: 69 additions & 0 deletions

File tree

README.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ distributions:
6161
* `CentOS 7 <docs/build/building_on_centos_7.md>`__
6262
* `Fedora 34 </docs/build/building_on_fedora_34.md>`__
6363
* `Ubuntu 20.04 </docs/build/building_on_ubuntu_20_04.md>`__ (this should work as well for Debian 10)
64+
* `Debian 12 </docs/build/building_on_debian_12.md>`__
6465

6566
Configuration
6667
-------------
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# Building on Debian 12
2+
3+
This documents step by step on how to compile and put into use the software `mod_tile` and `renderd`.
4+
Please see our [Continuous Integration script](../../.github/workflows/build-and-test.yml) for more detail.
5+
6+
```shell
7+
#!/usr/bin/env bash
8+
9+
# Update installed packages
10+
sudo apt update && sudo apt upgrade --yes
11+
12+
# Install build dependencies
13+
# (the last two are optional)
14+
sudo apt install build-essential \
15+
autoconf \
16+
apache2-dev \
17+
libcairo2-dev \
18+
libcurl4-gnutls-dev \
19+
libglib2.0-dev \
20+
libiniparser-dev \
21+
libmapnik-dev \
22+
libmemcached-dev \
23+
librados-dev
24+
25+
# Download, build & install
26+
git clone https://github.com/openstreetmap/mod_tile.git /usr/local/src/mod_tile
27+
cd /usr/local/src/mod_tile
28+
./autogen.sh
29+
./configure
30+
make
31+
32+
# Create tiles directory
33+
sudo mkdir --parents /run/renderd /var/cache/renderd/tiles
34+
35+
# Move files of example map
36+
sudo mkdir --parents /usr/share/renderd/
37+
sudo cp -r "utils/example-map" /usr/share/renderd/example-map
38+
39+
# Link leaflet library
40+
sudo ln --symbolic \
41+
/usr/share/javascript/leaflet \
42+
/usr/share/renderd/example-map/leaflet
43+
44+
# Add configuration
45+
sudo cp "etc/renderd/renderd.conf.examples" /etc/renderd.conf
46+
sudo cp "etc/apache2/renderd.conf" /etc/apach2/conf.d/renderd.conf
47+
sudo cp "etc/apache2/renderd-example-map.conf" \
48+
/etc/apache2/conf-enabled/renderd-example-map.conf
49+
50+
# Apply Debian specific changes to configuration files
51+
sudo sed --in-place \
52+
"s#/usr/lib/mapnik/3.0/input#/usr/lib/mapnik/3.1/input#g" \
53+
/etc/renderd.conf
54+
55+
# Add and activate mod_tile for Apache
56+
echo "LoadModule tile_module /usr/lib/apache2/modules/mod_tile.so" \
57+
| sudo tee --append /etc/apache2/mods-enabled/mod_tile.load
58+
59+
# Install software
60+
sudo make install
61+
sudo make install-mod_tile
62+
63+
# Start services
64+
sudo systemctl --now enable apache2
65+
sudo renderd -f
66+
```
67+
68+
Then you can visit: `http://localhost:8081/renderd-example-map`

0 commit comments

Comments
 (0)