Important: In order to install PgRouting, you must first install
To install PgRouting on a database, you have two options:
1. Use the Extension installer.
2. Use the command line.
We will review both options below.
1. Install PgRouting via command line:
To install via command line:
1. Connect to PostgreSQL
root@geohelm:~# su - postgres postgres@geohelm:~$ psql psql (9.6.3) Type "help" for help. postgres=#
2. If you have not created a database, create one now.
postgres=# create database geohelm; CREATE DATABASE postgres=#
3. Connect to your database.
postgres=# \c geohelm You are now connected to database "geohelm" as user "postgres". geohelm=#
4. Install the PostGIS extension.
geohelm=# create extension postgis; CREATE EXTENSION geohelm=#
4. Install the PgRouting extension.
geohelm=# create extension pgrouting; CREATE EXTENSION geohelm=#
Note: GeoHelm also includes
fuzzy_match_string, tiger, postgis_topology.
3. Verify the installation via command line or the PostgreSQL Management Page:
geohelm=# \d List of relations Schema | Name | Type | Owner --------+-------------------+-------+---------- public | geography_columns | view | postgres public | geometry_columns | view | postgres public | raster_columns | view | postgres public | raster_overviews | view | postgres public | spatial_ref_sys | table | postgres (5 rows)
To install using the PgRouting Extension installer, click on the Extensions button.
Select the target database from the drop-down as shown below:
You must FIRST install PostGIS prior to installing any other of the listed extensions.
Tick the PostGIS select button and then click the Save button as show below:
Once PostGIS has been installed on a target database, you can then return to install PgRouting extensions:
You can also un-install Extensions using above.
Next: read the
manual or jump to component pages below.
Important Be sure to also view the sections below: