![]() Then create a database named openstreetmap and at the same time make osm as the owner of the database. psql -c "ALTER USER osm WITH PASSWORD ' secret_password' " The password should not contain any special characters, or it might prevent OSM tools to access PostgreSQL database. Now you can create a PostgreSQL database user osm. ![]() By default, this user has no password and there’s no need to set one because you can use sudo to switch to the postgres user and log into PostgreSQL server. The postgres user is the super user for PostgreSQL database server. PostgreSQL database server automatically starts and listens on 127.0.0.1:5432. Step 3: Create PostgreSQL Database For OpenStreetMap The extension will be installed under /usr/share/postgresql/15/extension/. Sudo apt install devscripts equivs python3 python3-pip -y Install OSM Localization Extension (osml10n) cd ~ Sudo apt install build-essential zlib1g-dev postgresql-server-dev-all pkg-config sudo apt install postgis postgresql-15-postgis-3 Install PostgreSQL GZIP extension. Then install PostGIS, which is a geospatial extension to PostgreSQL. Sudo apt install -y postgresql postgresql-contrib postgresql-15 postgresql-client-15 Wget -quiet -O - | sudo tee /etc/apt/keyrings/postgresql.asc echo "deb $(lsb_release -cs)-pgdg main" | sudo tee /etc/apt//pgdg.list Run the following commands to install the latest version of PostgreSQL. The PostgreSQL team always strives to make performance improvements with every new version. We will use PostgreSQL to store map data. sudo apt update sudo apt upgrade -y Step 2: Install PostgreSQL Database Server and Some Extensions Log into your server via SSH and run the following command. It’s always a good practice to update server software before doing any major work on your server. If you are going to host the entire world map, I recommend you buy the extra-large VPS from Contabo, which has Your server should have a powerful CPU and fast SSD. It takes a long time to import large map data to the PostgreSQL database and generate. OpenMapTiles uses the Mapbox vector tile format. There are several formats for vector tiles. With raster tiles, you can only have integer zoom levels such as 8, 9, 10.
0 Comments
Leave a Reply. |