This is a basic guide to download and install pgRouting.
Additional notes can be found in Installation Notes
Also PostGIS provides some information about installation in this Install Guide
Binary packages are provided for the current version on the following platforms:
Winnie Bot Builds:
- Production builds are part of the Spatial Extensions/PostGIS Bundle available via Application StackBuilder
- Can also get PostGIS Bundle from http://download.osgeo.org/postgis/windows/
Ubuntu packages are available in postgreSQL repositories.
Using a terminal window:
# Create /etc/apt/sources.list.d/pgdg.list. The distributions are called codename-pgdg. sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list' # Import the repository key, update the package lists sudo apt-get install wget ca-certificates wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add - sudo apt-get update # Install pgrouting based on your postgres Installation: for this example is 9.3 sudo apt-get install postgresql-9.3-pgrouting
This will also install all required packages such as postgreSQL and postGIS if not installed yet.
Add repositories for dependencies:
wget http://repo.enetres.net/enetres.repo -O /etc/yum.repos.d/enetres.repo wget http://nextgis.ru/programs/centos/nextgis.repo -O /etc/yum.repos.d/nextgis.repo yum install epel-release
Install PostgreSQL and PostGIS according to this instructions.
yum install libCGAL10
yum install pgrouting_94
More info (and packages for CentOS) can be found here.
pgRouting can be installed via ports:
cd /usr/ports/databases/pgRouting make install clean
brew install pgrouting
You can find all the pgRouting Releases:
See Build Guide to build the binaries from the source.
Installing in the database¶
pgRouting is an extension.
CREATE EXTENSION postgis; CREATE EXTENSION pgrouting;
Upgrading the database¶
To upgrade pgRouting to version 2.x.y use the following command:
ALTER EXTENSION pgrouting UPDATE TO "2.x.y";
For example to upgrade to 2.2.3
ALTER EXTENSION pgrouting UPDATE TO "2.2.3";