https://github.com/Project-OSRM/osrm-backend/wiki/Building-OSRM

General build instructions from source

OSRM source is available via git or source archives, and is built with CMake.

Git

To download from Git, run the following commands:

git clone https://github.com/Project-OSRM/osrm-backend.git
cd osrm-backend

If you would like to build a specific release (optional), you can list the release tags with git tag -l and then checkout a specific tag using git checkout tags/<tag_name>.

Source Release

OSRM can be built from the source archives available on the releases page. Example:

wget https://github.com/Project-OSRM/osrm-backend/archive/vX.Y.Z.tar.gz
tar -xzf vX.Y.Z.tar.gz
cd osrm-backend-X.Y.Z


CentOS 7.x

CentOS 7.x only ships with gcc 4.8.5 which is too old to build OSRM, so install a more recent gcc from the CentOS Software Collections:

yum install yum-utils centos-release-scl
yum-config-manager --enable rhel-server-rhscl-7-rpms
yum install devtoolset-6

Start a new shell with the gcc-6 environment:

scl enable devtoolset-6 bash

A few other dependencies are needed:

yum install git cmake3 zlib-devel

For all other dependencies make use of mason so that Boost and so on don’t have to be built manually as well:

git clone https://github.com/Project-OSRM/osrm-backend.git
cd osrm-backend
mkdir build
cd build
cmake3 .. -DENABLE_MASON=ON -DCMAKE_CXX_COMPILER=/opt/rh/devtoolset-6/root/usr/bin/g++
make
make install

Running
{please notice the absolute paths}
osrm-backend/build/osrm-extract nepal-latest.osm.pbf -p osrm-backend/profiles/car.lua
osrm-backend/build/osrm-contract nepal-latest.osrm
osrm-backend/build/osrm-routed nepal-latest.osrm

http://150.107.205.115:5000/route/v1/driving/27.388860,85.517037;27.385983,85.496891?steps=true

Use screen to run

To list all of the screen sessions for a user, run the following command as that user:

screen -ls

As mentioned above, GNU Screen is the way to go. It will allow you to have a ‘screen session’ on the remote box that you can run multiple commands in, via multiple ‘screen windows’. This will simply detach if your parent SSH connection dies, keeping all the subprocesses running within it alive and well.

man screen‘ is your friend as usual, and the OS package should be called ‘screen‘ if it is not installed by default.

Basics are:

  • Start a screen session (on your remote host):
    $ screen
    
  • Disconnect from your screen session: CTRL-A, d
  • Reconnect to your screen session after logging back in again:
    $ screen -d -r
    
  • Open another screen ‘window’: CTRL-A, c
  • Cycle through you open screen windows: CTRL-A, space

There is lots of cool stuff you can do with Screen. I’ve been using it for over 10 years, and still am finding out new features. It’s my favourite Unix utility




1. swapon –show

2. df -h

3. wget http://download.geofabrik.de/asia/nepal-latest.osm.pbf

https://askubuntu.com/questions/920595/fallocate-fallocate-failed-text-file-busy-in-ubuntu-os-17-04

 

Running OSRM CentOS

Leave a Reply

Your email address will not be published. Required fields are marked *