mirror of
https://github.com/openstreetmap/mod_tile.git
synced 2025-07-25 15:04:30 +00:00
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
This commit is contained in:
68
docs/build/building_on_debian_12.md
vendored
Normal file
68
docs/build/building_on_debian_12.md
vendored
Normal file
@ -0,0 +1,68 @@
|
||||
# Building on Debian 12
|
||||
|
||||
This documents step by step on how to compile and put into use the software `mod_tile` and `renderd`.
|
||||
Please see our [Continuous Integration script](../../.github/workflows/build-and-test.yml) for more detail.
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Update installed packages
|
||||
sudo apt update && sudo apt upgrade --yes
|
||||
|
||||
# Install build dependencies
|
||||
# (the last two are optional)
|
||||
sudo apt install build-essential \
|
||||
autoconf \
|
||||
apache2-dev \
|
||||
libcairo2-dev \
|
||||
libcurl4-gnutls-dev \
|
||||
libglib2.0-dev \
|
||||
libiniparser-dev \
|
||||
libmapnik-dev \
|
||||
libmemcached-dev \
|
||||
librados-dev
|
||||
|
||||
# Download, build & install
|
||||
git clone https://github.com/openstreetmap/mod_tile.git /usr/local/src/mod_tile
|
||||
cd /usr/local/src/mod_tile
|
||||
./autogen.sh
|
||||
./configure
|
||||
make
|
||||
|
||||
# Create tiles directory
|
||||
sudo mkdir --parents /run/renderd /var/cache/renderd/tiles
|
||||
|
||||
# Move files of example map
|
||||
sudo mkdir --parents /usr/share/renderd/
|
||||
sudo cp -r "utils/example-map" /usr/share/renderd/example-map
|
||||
|
||||
# Link leaflet library
|
||||
sudo ln --symbolic \
|
||||
/usr/share/javascript/leaflet \
|
||||
/usr/share/renderd/example-map/leaflet
|
||||
|
||||
# Add configuration
|
||||
sudo cp "etc/renderd/renderd.conf.examples" /etc/renderd.conf
|
||||
sudo cp "etc/apache2/renderd.conf" /etc/apach2/conf.d/renderd.conf
|
||||
sudo cp "etc/apache2/renderd-example-map.conf" \
|
||||
/etc/apache2/conf-enabled/renderd-example-map.conf
|
||||
|
||||
# Apply Debian specific changes to configuration files
|
||||
sudo sed --in-place \
|
||||
"s#/usr/lib/mapnik/3.0/input#/usr/lib/mapnik/3.1/input#g" \
|
||||
/etc/renderd.conf
|
||||
|
||||
# Add and activate mod_tile for Apache
|
||||
echo "LoadModule tile_module /usr/lib/apache2/modules/mod_tile.so" \
|
||||
| sudo tee --append /etc/apache2/mods-enabled/mod_tile.load
|
||||
|
||||
# Install software
|
||||
sudo make install
|
||||
sudo make install-mod_tile
|
||||
|
||||
# Start services
|
||||
sudo systemctl --now enable apache2
|
||||
sudo renderd -f
|
||||
```
|
||||
|
||||
Then you can visit: `http://localhost:8081/renderd-example-map`
|
Reference in New Issue
Block a user