Read this in other language: Русский
- Install VMware Workstation Pro or VirtualBox
- Download the pre-configured virtual machine osm-tile-server-vm.zip
- Extract it to a drive with sufficient capacity, preferably an SSD
- Launch VMware/VirtualBox, open the extracted virtual machine and power it on
- After boot completes, log in as root with password alpine
- Import a small test region (Europe, Luxembourg) using command
osm import europe/luxembourg - After import completes, start the server:
osm upand wait a few seconds - Open your browser at
http://<your-vm-ip-address>/#10/49.8163/6.1331 - Verify that the map displays properly
- Import your desired region:
osm import <your-region-name>
Notes:
- If you're using VirtualBox, before starting the virtual machine for the first time, you need to add two hard drives in the following order: first
system.vmdk, thendata.vmdk. Also, make sure the network settings are correct - You can find the machine's IP address with command
ifconfig eth0 - The first time you import a region, approximately 2 GB of data will be downloaded from the internet, including the region's latest .osm.pbf file, the Docker image and external data containing country and sea boundaries. Subsequent imports will only download the region file. When running the import command without specifying a region name (
osm import), cached data will be imported without an initial download. If you do not need the country and sea boundaries, change thecachefolder in the/osm/docker-compose.ymlfile from/mnt/data/cacheto/mnt/data/cache-empty– this will save several minutes during import. - Regions are downloaded from geofabrik.de. You can find the exact region name from the URL of your desired region
- Only one region can be imported; each subsequent import removes results of the previous one
- If you need to import two or more regions, they must be merged into one. Use the osmium utility for this (Windows 64-bit version here). The merged file should be copied to
/mnt/data/region.osm.pbf(theregion.polyfile with region boundaries is optional) - To access the virtual machine via SSH, use PuTTY, for FTP and SFTP use WinSCP. A portable "all-in-one" package can be found here.
Repository structure:
image- scripts and Docker file for building the docker image. The ready image is available at DockerHubtools- scripts that facilitate interaction with the OSM server. Available commands are described in tools/readme.mdvm- script and instructions for setting up a virtual machine "from scratch"docker-compose.yml- configuration for creating and running the docker container