1.前提条件:
postgresql 9.6.1 已经通过源码方式安装完成并可成功运行。
2. other OS packets
OS: CentOS 6.4 X64
X64: libxml2-devel
3.geos-3.6.0
http://download.osgeo.org/geos/geos-3.6.0.tar.bz2
# tar xjvf geos-3.6.0.tar.bz2
./configure
......
......
......
config.status: executing libtool commands
Swig: false
Python bindings: false
Ruby bindings: false
# make
......
......
make[3]: Leaving directory `/home/soft/geos-3.6.0/tests/geostest‘
Making all in thread
make[3]: Entering directory `1118.www.qixoo.qixoo.com/home/soft/geos-3.6.0/tests/thread‘
make[3]: Nothing to be done for `all‘.
make[3]: Leaving directory `/home/soft/geos-3.6.0/tests/thread‘
make[3]: Entering directory `qkxue.net/home/soft/geos-3.6.0/tests‘
make[3]: Nothing to be done for `all-am‘.
make[3]: Leaving directory `/home/soft/geos-3.6.0/tests‘
make[2]: Leaving directory `/home/soft/geos-3.6.0/tests‘
Making all in tools
make[2]: Entering directory `/home/soft/geos-3.6.0/tools‘
make[2]: Nothing to be done for `all‘.
make[2]: Leaving directory `/home/soft/geos-3.6.0/tools‘
make[2]: Entering directory `/home/soft/geos-3.6.0‘
make[2]: Nothing to be done for `all-am‘.
make[2]: Leaving directory `/home/soft/geos-3.6.0‘
make[1]: Leaving directory `/home/soft/geos-3.6.0‘
# make install
......
......
Making install in tools
make[2]: Entering directory `/home/soft/geos-3.6.0/tools‘
make[3]: Entering directory `/home/soft/geos-3.6.0/tools‘
/bin/mkdir -p ‘/usr/local/bin‘
/usr/bin/install -c geos-config ‘/usr/local/bin‘
make[3]: Nothing to be done for `install-data-am‘.
make[3]: Leaving directory `/home/soft/geos-3.6.0/tools‘
make[2]: Leaving directory `/home/soft/geos-3.6.0/tools‘
make[2]: Entering directory `/home/soft/geos-3.6.0‘
make[3]: Entering directory `/home/soft/geos-3.6.0‘
make[3]: Nothing to be done for `install-exec-am‘.
make[3]: Nothing to be done for `install-data-am‘.
make[3]: Leaving directory `/home/soft/geos-3.6.0‘
make[2]: Leaving directory `/home/soft/geos-3.6.0‘
make[1]: Leaving directory `/home/soft/geos-3.6.0‘
#
4.proj4
http://download.osgeo.org/proj/proj-4.9.3.tar.gz
# tar zxvf proj-4.9.3.tar.gz
# cd proj-4.9.3
# ./configure
# make
......
......
make[2]: Leaving directory `/home/soft/proj-4.9.3/jniwrap‘
make[1]: Leaving directory `/home/soft/proj-4.9.3/jniwrap‘
Making all in cmake
make[1]: Entering directory `/home/soft/proj-4.9.3/cmake‘
make[1]: Nothing to be done for `all‘.
make[1]: Leaving directory `/home/soft/proj-4.9.3/cmake‘
make[1]: Entering directory `/home/soft/proj-4.9.3‘
make[1]: Nothing to be done for `all-am‘.
make[1]: Leaving directory `/home/soft/proj-4.9.3‘
#
# make install
......
......
make[2]: Nothing to be done for `install-exec-am‘.
/bin/mkdir -p ‘/usr/local/lib/pkgconfig‘
/usr/bin/install -c -m 644 proj.pc ‘/usr/local/lib/pkgconfig‘
make[2]: Leaving directory `/home/soft/proj-4.9.3‘
make[1]: Leaving directory `/home/soft/proj-4.9.3‘
#
5.gdal
http://download.osgeo.org/gdal/2.1.2/gdal-2.1.2.tar.gz
export LD_LIBRARY_PATH=/opt/pgsql/9.6.1/lib
export PATH=/opt/pgsql/9.6.1/bin:$PATH
export MANPATH=/opt/pgsql/9.6.1/share/man:$MANPATH
# ./configure
......
......
GDAL is now configured for x86_64-pc-linux-gnu
Installation directory: /usr/local
C compiler: gcc -g -O2
C++ compiler: g++ -g -O2
LIBTOOL support: yes
LIBZ support: external
LIBLZMA support: no
cryptopp support: no
GRASS support: no
CFITSIO support: no
PCRaster support: internal
LIBPNG support: internal
DDS support: no
GTA support: no
LIBTIFF support: internal (BigTIFF=yes)
LIBGEOTIFF support: internal
LIBJPEG support: internal
12 bit JPEG: yes
12 bit JPEG-in-TIFF: yes
LIBGIF support: internal
OGDI support: no
HDF4 support: no
HDF5 support: no
Kea support: no
NetCDF support: no
Kakadu support: no
JasPer support: no
OpenJPEG support: no
ECW support: no
MrSID support: no
MrSID/MG4 Lidar support: no
MSG support: no
GRIB support: yes
EPSILON support: no
WebP support: no
cURL support (wms/wcs/...):no
PostgreSQL support: yes
MRF support: yes
MySQL support: no
Ingres support: no
Xerces-C support: no
NAS support: no
Expat support: no
libxml2 support: yes
Google libkml support: no
ODBC support: no
PGeo support: no
FGDB support: no
MDB support: no
PCIDSK support: internal
OCI support: no
GEORASTER support: no
SDE support: no
Rasdaman support: no
DODS support: no
SQLite support: no
PCRE support: yes
SpatiaLite support: no
DWGdirect support no
INFORMIX DataBlade support:no
GEOS support: yes
QHull support: internal
Poppler support: no
Podofo support: no
PDFium support: no
OpenCL support: no
Armadillo support: no
FreeXL support: no
SOSI support: no
MongoDB support: no
SWIG Bindings: no
Statically link PROJ.4: no
enable GNM building: no
enable pthread support: yes
enable POSIX iconv support:yes
hide internal symbols: no
# make
......
......
.so -lpq -lpthread -lrt -ldl -lpcre -lxml2 -lz -Wl,-rpath -Wl,/usr/local/lib
make[1]: Leaving directory `/home/soft/gdal-2.1.2/apps‘
rm -f gdal.pc
echo ‘CONFIG_VERSION=‘`cat ./VERSION`‘‘ >> gdal.pc
echo ‘CONFIG_INST_PREFIX=/usr/local‘ >> gdal.pc
echo ‘CONFIG_INST_LIBS=-L/usr/local/lib -lgdal‘ >> gdal.pc
echo ‘CONFIG_INST_CFLAGS=-I/usr/local/include‘ >> gdal.pc
echo ‘CONFIG_INST_DATA=/usr/local/share/gdal/data‘ >> gdal.pc
cat gdal.pc.in >> gdal.pc
# make install
......
......
make[1]: Leaving directory `/home/soft/gdal-2.1.2/scripts‘
for f in LICENSE.TXT data/*.* ; do /home/soft/gdal-2.1.2/install-sh -c -m 0644 $f /usr/local/share/gdal ; done
/bin/sh /home/soft/gdal-2.1.2/libtool --mode=finish --silent /usr/local/lib
/home/soft/gdal-2.1.2/install-sh -d /usr/local/lib/pkgconfig
/home/soft/gdal-2.1.2/install-sh -c -m 0644 gdal.pc /usr/local/lib/pkgconfig/gdal.pc
#
6.postgis
export LD_LIBRARY_PATH=/opt/pgsql/9.6.1/lib
export PATH=/opt/pgsql/9.6.1/bin:$PATH
export MANPATH=/opt/pgsql/9.6.1/share/man:$MANPATH
# tar zxvf postgis-2.3.0.tar.gz
# cd postgis-2.3.0
# ./configure
......
......
config.status: executing po-directories commands
PostGIS is now configured for x86_64-pc-linux-gnu
-------------- Compiler Info -------------
C compiler: gcc -g -O2
SQL preprocessor: /usr/bin/cpp -traditional-cpp -w -P
-------------- Dependencies --------------
GEOS config: /usr/local/bin/geos-config
GEOS version: 3.6.0
GDAL config: /usr/local/bin/gdal-config
GDAL version: 2.1.2
PostgreSQL config: /opt/pgsql/9.6.1/bin/pg_config
PostgreSQL version: PostgreSQL 9.6.1
PROJ4 version: 49
Libxml2 config: /usr/bin/xml2-config
Libxml2 version: 2.7.6
JSON-C support: no
PCRE support: yes
PostGIS debug level: 0
Perl: /usr/bin/perl
--------------- Extensions ---------------
PostGIS Raster: enabled
PostGIS Topology: enabled
SFCGAL support: disabled
Address Standardizer support: enabled
-------- Documentation Generation --------
xsltproc:
xsl style sheets:
dblatex:
convert:
mathml2.dtd: http://www.w3.org/Math/DTD/mathml2/mathml2.dtd
# make
......
......
mkdir -p sql
cat us_lex.sql us_gaz.sql us_rules.sql sql_bits/address_standardizer_data_us_mark_editable_objects.sql.in > sql/address_standardizer_data_us.sql
mkdir -p sql
cat us_lex.sql us_gaz.sql us_rules.sql sql_bits/address_standardizer_data_us_mark_editable_objects.sql.in > sql/address_standardizer_data_us--2.3.0.sql
cat sql/address_standardizer_data_us--2.3.0.sql > sql/address_standardizer_data_us--2.3.0--2.3.0next.sql
cat sql/address_standardizer_data_us--2.3.0.sql > sql/address_standardizer_data_us--2.3.0next--2.3.0.sql
mkdir -p sql
/usr/bin/cpp -traditional-cpp -w -P -I../libpgcommon test-init-extensions.sql.in | grep -v ‘^#‘ | \
/usr/bin/perl -lpe "s‘MODULE_PATHNAME‘\$libdir/address_standardizer-2.3‘g" > sql/test-init-extensions.sql
mkdir -p sql
/usr/bin/cpp -traditional-cpp -w -P -I../libpgcommon test-parseaddress.sql.in | grep -v ‘^#‘ | \
/usr/bin/perl -lpe "s‘MODULE_PATHNAME‘\$libdir/address_standardizer-2.3‘g" > sql/test-parseaddress.sql
mkdir -p sql
/usr/bin/cpp -traditional-cpp -w -P -I../libpgcommon test-standardize_address_1.sql.in | grep -v ‘^#‘ | \
/usr/bin/perl -lpe "s‘MODULE_PATHNAME‘\$libdir/address_standardizer-2.3‘g" > sql/test-standardize_address_1.sql
mkdir -p sql
/usr/bin/cpp -traditional-cpp -w -P -I../libpgcommon test-standardize_address_2.sql.in | grep -v ‘^#‘ | \
/usr/bin/perl -lpe "s‘MODULE_PATHNAME‘\$libdir/address_standardizer-2.3‘g" > sql/test-standardize_address_2.sql
make[2]: Leaving directory `/home/soft/postgis-2.3.0/extensions/address_standardizer‘
make[1]: Leaving directory `/home/soft/postgis-2.3.0/extensions‘
PostGIS was built successfully. Ready to install.
# make install
......
......
make[2]: Entering directory `/home/soft/postgis-2.3.0/extensions/address_standardizer‘
/bin/mkdir -p ‘/opt/pgsql/9.6.1/lib‘
/bin/mkdir -p ‘/opt/pgsql/9.6.1/share/extension‘
/bin/mkdir -p ‘/opt/pgsql/9.6.1/share/extension‘
/bin/mkdir -p ‘/opt/pgsql/9.6.1/share/doc/extension‘
/usr/bin/install -c -m 755 address_standardizer-2.3.so ‘/opt/pgsql/9.6.1/lib/address_standardizer-2.3.so‘
/usr/bin/install -c -m 644 .//address_standardizer.control ‘/opt/pgsql/9.6.1/share/extension/‘
/usr/bin/install -c -m 644 .//address_standardizer_data_us.control .//sql/address_standardizer.sql .//sql/address_standardizer_data_us.sql .//sql/address_standardizer--1.0--2.3.0.sql .//sql/address_standardizer--2.3.0--2.3.0next.sql .//sql/address_standardizer--2.3.0next--2.3.0.sql .//sql/address_standardizer--2.3.0.sql .//sql/address_standardizer_data_us--2.3.0--2.3.0next.sql .//sql/address_standardizer_data_us--2.3.0next--2.3.0.sql .//sql/address_standardizer_data_us--2.3.0.sql ‘/opt/pgsql/9.6.1/share/extension/‘
/usr/bin/install -c -m 644 .//README.address_standardizer ‘/opt/pgsql/9.6.1/share/doc/extension/‘
make[2]: Leaving directory `/home/soft/postgis-2.3.0/extensions/address_standardizer‘
make[1]: Leaving directory `/home/soft/postgis-2.3.0/extensions‘
#
7.创建扩展
1).进入数据库查询postgis可用扩展
postgres=# SELECT name, default_version,installed_version FROM pg_available_extensions WHERE name LIKE ‘postgis%‘ ;
name | default_version | installed_version
------------------------+-----------------+-------------------
postgis_tiger_geocoder | 2.3.0 |
postgis_topology | 2.3.0 |
postgis | 2.3.0 |
(3 rows)
postgres=#
2).添加postgres用户lib PATH
# su - postgres
$ vi .bash_profile
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
export LD_LIBRARY_PATH=/usr/local/lib:/opt/pgsql/9.6.1/lib
export PATH=/opt/pgsql/9.6.1/bin:$PATH
export MANPATH=/opt/pgsql/9.6.1/share/man:$MANPATH
$
3).reboot系统
创建扩展
postgres=# create database realstate;
postgres=# \c realstate ;
You are now connected to database "realstate" as user "postgres".
realstate=# create extension postgis;
CREATE EXTENSION
8.验证扩展
realstate=# \dx
List of installed extensions
Name | Version | Schema | Description
---------+---------+------------+---------------------------------------------------------------------
plpgsql | 1.0 | pg_catalog | PL/pgSQL procedural language
postgis | 2.3.0 | public | PostGIS geometry, geography, and raster spatial types and functions
(2 rows)
realstate=#
Linux 平台PostGIS安装的更多相关文章
-
Linux 平台静默安装 Oracle客户端
需求:Linux平台,安装完整版Oracle客户端 Tips:如果只是用到sqlldr,sqlplus功能,可以参考<Linux上oracle精简版客户端快速部署>快速部署精简版:如果需要 ...
-
【android开发】如何在Linux平台下安装JDK环境
原文:http://android.eoe.cn/topic/android_sdk Linux平台JDK安装 本文主要描述如何在Linux平台下安装JDK环境.进入网页:http://www.ora ...
-
Arduino可穿戴教程Linux平台下安装Arduino IDE
Arduino可穿戴教程Linux平台下安装Arduino IDE Linux平台下安装Arduino IDE Linux平台下的安装方式和Windows下的zip形式安装是类似的,只是Linux下的 ...
-
如何在Linux平台下安装JDK
原文链接:http://android.eoe.cn/topic/android_sdk 1.下载Java的开发包JDK: JDK有好几个类型版本,我们只需要选择Java SE类型的版本就行了. 进入 ...
-
(转载)Linux平台下安装 python 模块包
https://blog.csdn.net/aiwangtingyun/article/details/79121145 一.安装Python Windows平台下: 进入Python官网下载页面下载 ...
-
Linux平台下安装MySQL
1.下载RPM包 http://dev.mysql.com/downloads/mysql/5.5.html#downloads 选择[Red Hat & Oracle Enterprise ...
-
c语言编译器(linux平台下安装c语言环境)一
gcc : 语言的默认编译器 (ubuntu下输入gcc,可根据终端输出查看是否安装了gcc) g++ : c++的默认编译器 (ubuntu下输入g++,可根据终端输出查看是否安装了g+ ...
-
linux平台编译安装Poco C++
1.到官网下载poco-1.4.6p4-all.tar.gz,地址为http://pocoproject.org/download/index.html 2.同时下载说明文档 3.根据说明文档执行安装 ...
-
Docker 在 Linux 平台的安装 以及一些常见命令
1,添加,清理 yum 源,查看应用列表 1.1,yum install -y epel-release 1.2,yum clean all 1.3,yum list (可以不运行) 2,安装, 启 ...
随机推荐
-
Linux下百度云盘报 获取bdstoken失败
在用linux下百度云盘工具(bcloud),登录时,报获取bdstoken失败. 在网上搜了一下,解决办法如下. 找到auth.py文件 locate auth.py |grep bcloud 结果 ...
-
xib命名注意事项--防止被其他控制器意外地 当做默认的 view了
注意: 1.创建的xib如果不是想给指定的控制器做view的话,命名就要注意了! 2.最好是不要命名和控制器名字相关的xib. 如下举例说明一下: - (void)touchesBegan:(NSSe ...
-
MYSQL5.5和5.6参数的差异
performance_schema 在 MySQL 5.6 中默认是开启的,但相关的很多参数相比 MySQL 5.5 却是降低了,例如 performance_schema 自动调整到 445 个表 ...
-
屏幕录制:SCR Screen Recorder Pro v0.14.3汉化破解版
应用概览 <ignore_js_op> 软件名称:屏幕录制:SCR Screen Recorder Pro 软件版本:v0.14.3汉化破解版软件语言:中文软件大小:3.5M软件包名:co ...
-
微软Visual Studio二十周年:VS2017于3月7日发布
二十年前的今天,微软正式发布Visual Studio 97.如今二十年已经过去,微软宣布全新的Visual Studio 2017即将在美国当地时间3月7日正式发布. VS97是Visual Stu ...
-
更快实现Android多级树形选择列表
快速实现Android多级树形列表,这个库是在鸿洋多级树形列表demo中修改而来. 解决的问题: 1. 支持ID为int类型和String类型. 2. 支持多级复选框选中,使用只需一行代码. 3. 支 ...
-
Ubuntu16 Nginx的安装与基本配置
关于Nginx 它是一个轻量级.高性能.稳定性高.并发性好的HTTP和反向代理服务器,当我们搭建自己的应用时,通常用它作为反向代理服务器,图片服务器和负载均衡. 1.Ubuntu 16安装 Nginx ...
-
RN 数据持久化存储服务API
一些数据信息需要存储在手机内存中,比如用户的登录名密码 token啥的,所以这就需要了来存这些信息 在RN中 采用了AsyncStorage是一个简单的.异步的.持久化的Key-Value存储系统,它 ...
-
【Java安装】配置环境变量
添加环境变量: JAVA_HOME D:\Program Files\Java\jdk1.8.0_131 classpath: .;%JAVA_HOME%\lib;%JAVA_HOME%\lib\to ...
-
[z]一步步教你如何在 Visual Studio 2013 上使用 Github
[z]http://www.admin10000.com/document/4004.html 介绍 我承认越是能将事情变简单的工具我越会更多地使用它.尽管我已经知道了足够的命令来使用Github,但 ...