Before installing OSRM, ensure that the following dependencies are installed on your system:
- build-essential
- git
- cmake
- pkg-config
- libbz2-dev
- libxml2-dev
- libzip-dev
- libboost-all-dev
- lua5.2
- liblua5.2-dev
You can install these dependencies on Debian-based systems using:
sudo apt install build-essential git cmake pkg-config \\
libbz2-dev libxml2-dev libzip-dev libboost-all-dev \\
lua5.2 liblua5.2-dev libtbb-dev
- Clone the OSRM backend repository:
git clone https://github.com/Project-OSRM/osrm-backend.git
- Navigate to the repository directory:
cd osrm-backend
- Download the OSM data for Goa, India:
wget https://download.geofabrik.de/asia/india/goa-latest.osm.pbf
- Create build directory:
mkdir -p build
cd build
- Generate build files:
cmake ..
- Build binaries:
cmake --build .
- Install OSRM:
sudo cmake --build . --target install
- Extract Goa data:
osrm-extract goa.osm.pbf -p profiles/car.lua
- Partition:
osrm-partition goa.osrm
- Customize:
osrm-customize goa.osrm
- Contract:
osrm-contract goa.osrm
npm install
npm start