标签:images on() sed html client not .post example ams
转载请注明原作者(think8848)和出处(http://think8848.cnblogs.com)
本文参考了《An almost idiot‘s guide to install PostgreSQL 9.5, PostGIS 2.2 and pgRouting 2.1.0 with Yum 》和PostGis官方网站的安装说明
请参见《CentOS7下安装并简单设置PostgreSQL笔记》
sudo yum install wget net-tools epel-release -y
sudo yum install postgis2_95 postgis2_95-client -y
postgis2_95-client中包含了PostGis的命名行工具,如:shp2pgsql,pgsql2shp,raster2pgsql等,看名字也大概知道是什么意思了。
ogrfdw的全称是OGR Foreign Data Wrapper
sudo yum install ogr_fdw95 -y
更多ogr_fdw信息,请参见这里
sudo yum install pgrouting_95 -y
#先切换到postgres用户,然后连接到postgres数据库 su postgres psql #创建一个新的数据库,指定数据库所有者为think8848 CREATE DATABASE chinaosmgisdb OWNER think8848 #查看数据库列表 \l #切换到chinaosmgisdb数据库 \c chinaosmgisdb
安装PostGis扩展
CREATE EXTENSION postgis;
CREATE EXTENSION postgis_topology;
CREATE EXTENSION ogr_fdw;
PostGis的扩展列表
-- Enable PostGIS (includes raster) CREATE EXTENSION postgis; -- Enable Topology CREATE EXTENSION postgis_topology; -- Enable PostGIS Advanced 3D -- and other geoprocessing algorithms -- sfcgal not available with all distributions CREATE EXTENSION postgis_sfcgal; -- fuzzy matching needed for Tiger CREATE EXTENSION fuzzystrmatch; -- rule based standardizer CREATE EXTENSION address_standardizer; -- example rule data set CREATE EXTENSION address_standardizer_data_us; -- Enable US Tiger Geocoder CREATE EXTENSION postgis_tiger_geocoder;
SELECT postgis_full_version();
如果能成功显示版本信息,说明PostGis成功安装好了。
标签:images on() sed html client not .post example ams
原文地址:http://www.cnblogs.com/think8848/p/6010695.html