Installation
Prerequisites
-
Linux-based system (Ubuntu 20.04+ recommended)
-
Docker and Docker Compose
-
Minimum 4GB RAM, 2 CPU cores
-
50GB+ available disk space
-
Network access to tile data sources
Installation Steps
- Environment Setup bash
# Update system packages
sudo apt update && sudo apt upgrade -y
# Install Docker
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
sudo usermod -aG docker $USER
# Install Docker Compose
sudo curl -L "https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
- Download and Extract bash
# Download Tile Server 5.3.1
wget https://releases.tileserver.com/v5.3.1/tileserver-5.3.1.tar.gz
tar -xzf tileserver-5.3.1.tar.gz
cd tileserver-5.3.1
- Configuration Setup bash
# Copy example configuration
cp config/config.example.yml config/config.yml
cp docker-compose.example.yml docker-compose.yml
# Edit configuration files
nano config/config.yml
nano docker-compose.yml
- Database Initialization bash
# Initialize PostgreSQL with PostGIS
docker-compose up -d postgres
docker-compose exec postgres psql -U postgres -c "CREATE EXTENSION postgis;"
# Import initial data (if available)
docker-compose exec postgres psql -U postgres -d tileserver < data/init.sql
- Service Deployment bash
# Start all services
docker-compose up -d
# Verify deployment
docker-compose ps
docker-compose logs -f tileserver
Verification
bash
# Test API endpoint
curl -I http://localhost:8080/health
# Test tile serving
curl -I http://localhost:8080/tiles/1/0/0.png