forked from gravitystorm/openstreetmap-carto
-
Notifications
You must be signed in to change notification settings - Fork 2
Install Streaming (Ubuntu 16.04)
Jonathan Beliën edited this page Nov 9, 2018
·
5 revisions
The purpose to this server is to stream pre-rendered tiles.
The tiles for https://tile.osm.be/ are rendered on another server.
- Server with at least 4Go RAM
- Ubuntu 16.04 (obviously)
Just to be sure everything is up to date :
sudo apt-get update
sudo apt-get dist-upgrade
And restart your server :
sudo reboot
For https://tile.osm.be/ case, I use external drives to host the tiles. You can probably skip this step !
-
List devices :
sudo fdisk -l /dev/sd*
-
Create new partition :
sudo parted /dev/sdb
And run following commands :
mktable gpt mkpart primary ext4 512 100% quit
-
Create ext4 filesystem :
sudo mkfs.ext4 /dev/sdb1
-
Mount new drive :
sudo mkdir /mnt/osmbe sudo mount /dev/sdb1 /mnt/osmbe/
-
Check if everything is good :
sudo fdisk -l /dev/sd*
-
Get drive UUID :
sudo blkid
-
Add the new drive to
/etc/fstab
by adding following line :UUID=##### /mnt/osmbe ext4 nofail 0 0
-
Reboot :
sudo reboot
sudo apt-get install git build-essential autoconf \
apache2 apache2-dev \
libtool libmapnik-dev \
munin
sudo mkdir /var/lib/mod_tile
sudo chown $USER /var/lib/mod_tile
git clone git://github.com/SomeoneElseOSM/mod_tile.git
cd mod_tile
./autogen.sh
./configure
make
sudo make install
sudo make install-mod_tile
sudo ldconfig
Create /etc/apache2/mods-available/tile.load
file :
LoadModule tile_module /usr/lib/apache2/modules/mod_tile.so
Create /etc/apache2/mods-available/tile.conf
file :
<IfModule tile_module> LoadTileConfigFile /usr/local/etc/renderd.conf ModTileRenderdSocketName /var/run/renderd/renderd.sock # Timeout before giving up for a tile to be rendered ModTileRequestTimeout 0 # Timeout before giving up for a tile to be rendered that is otherwise missing ModTileMissingRequestTimeout 30 </IfModule>
Add following to file /usr/local/etc/renderd.conf
:
[osmbe] URI=/osmbe/ TILEDIR=/var/lib/mod_tile XML=/home/ubuntu/src/openstreetmap-carto-be/mapnik.xml HOST=localhost TILESIZE=256 MAXZOOM=20 CORS=* [osmbe-fr] URI=/osmbe-fr/ TILEDIR=/var/lib/mod_tile XML=/home/ubuntu/src/openstreetmap-carto-be/mapnik-fr.xml HOST=localhost TILESIZE=256 MAXZOOM=20 CORS=* [osmbe-nl] URI=/osmbe-nl/ TILEDIR=/var/lib/mod_tile XML=/home/ubuntu/src/openstreetmap-carto-be/mapnik-nl.xml HOST=localhost TILESIZE=256 MAXZOOM=20 CORS=*
sudo a2enmod tile
sudo service apache2 restart