In this tutorial, we will guide you through the installation of Open Source Routing Machine (OSRM), which is a high-performance routing engine for OpenStreetMap data.
Before we start with the installation, there are a few prerequisites that you need to have on your Fedora Server:
To install the dependencies mentioned above, you can use the following command:
sudo dnf install -y git cmake gcc gcc-c++ boost-devel boost-static luajit-devel zlib-devel
Once you have installed the dependencies, you can clone the OSRM repository using the following command:
git clone https://github.com/Telenav/osrm-backend.git
Once the cloning process is completed, you can navigate to the cloned directory with the following command:
cd osrm-backend
To build the OSRM backend server, you need to use the following commands:
mkdir build
cd build
cmake ..
make
Please note that the make
command may take a few minutes to complete.
To use OSRM, you need to download map data from OpenStreetMap. You can use the wget
command to download the data for your desired location.
For example, to download data for New York City, use the following command:
wget http://download.geofabrik.de/north-america/us/new-york-latest.osm.pbf
Once you have downloaded the map data, you need to preprocess it to make it compatible with the OSRM backend server. You can use the following command to preprocess the data:
./osrm-extract new-york-latest.osm.pbf
./osrm-partition new-york-latest.osrm
./osrm-customize new-york-latest.osrm
Please note that this step may take a while to complete, depending on the size of the map data.
Once the preprocessing is completed, you can start the OSRM server with the following command:
./osrm-routed new-york-latest.osrm
The server will be accessible at http://localhost:5000/
.
Congratulations! You have successfully installed Open Source Routing Machine (OSRM) on your Fedora Server. You can now use the OSRM server to provide high-performance routing for OpenStreetMap data.
If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!
Alternatively, for the best virtual desktop, try Shells!