Original CentOS7 Deployment PostGIS

Source: Internet
Author: User
Tags postgis postgres database

Reprint please indicate original author (think8848) and provenance (http://think8848.cnblogs.com)

This article references the installation instructions for the "an almost Idiot's Guide to installation PostgreSQL 9.5, PostGIS 2.2 and pgrouting 2.1.0 with Yum" and the official PostGIS website.

1. Install PostgreSQL First

See "Installing and simply setting up PostgreSQL notes" under CentOS7

2. First install a few later on the use of the kit, so as not to use the time and no
sudo yum  install wget net-tools epel-release-y
3. Installing PostGIS
sudo yum install postgis2_95 postgis2_95-client-y

Postgis2_95-client contains the PostGIS of the naming line tools, such as: Shp2pgsql,pgsql2shp,raster2pgsql, and so on, see the name also probably know what meaning.

4. Installing OGRFDW

The full name of OGRFDW is ogr Foreign Data Wrapper

sudo yum install ogr_fdw95-y

For more OGR_FDW information, please see here

5. Installing pgrouting
sudo yum install pgrouting_95-y
6. Create a PostgreSQL database and install the PostGIS extension
# switch to the Postgres user first, and then connect to the Postgres database su postgrespsql # Create a new database, specifying that the database owner is think8848 CREATE DATABASE chinaosmgisdb OWNER think8848 # View the list of databases \l # switch to the CHINAOSMGISDB database \c Chinaosmgisdb

Installing the PostGIS Extension

CREATE EXTENSION PostGIS; CREATE EXTENSION postgis_topology; CREATE EXTENSION OGR_FDW;

Extended List of PostGIS

--Enable PostGIS (includes raster)CREATEEXTENSION PostGIS;--Enable TopologyCREATEEXTENSION postgis_topology;--Enable PostGIS Advanced 3D--and other geoprocessing algorithms--Sfcgal not available with all distributionsCREATEEXTENSION Postgis_sfcgal;--fuzzy matching needed for TigerCREATEEXTENSION Fuzzystrmatch;--rule based StandardizerCREATEEXTENSION Address_standardizer;--example rule data setCREATEEXTENSION Address_standardizer_data_us;--Enable US Tiger GeocoderCREATEEXTENSION Postgis_tiger_geocoder;

7. Verifying the installation results
SELECT postgis_full_version ();

If the version information can be displayed successfully, the PostGIS is successfully installed.

Original CentOS7 Deployment PostGIS

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.