微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

PostGIS安装 pgis3.4.2 postgresql 10.1

  

https://yq.aliyun.com/articles/228258
http://download.osgeo.org/postgis/source/
http://blog.51cto.com/heyiyi/1873448

http://www.postgis.net/docs/

1.
tar -jxvf geos-3.6.0.tar.bz2
cd geos-3.6.0/
./configure --prefix=/opt/geos360
make
make install

2.
tar -zxvf proj-4.9.3.tar.gz
cd proj-4.9.3/
./configure --prefix=/opt/proj493
make
make install

3.
cd ~
vi .bash_profile
export LD_LIBRARY_PATH=/opt/pgsql101/lib
export PATH=/opt/pgsql101/bin:$PATH
export MANPATH=/opt/pgsql101/share/man:$MANPATH
source .bash_profile
tar -zxvf gdal-2.1.2.tar.gz
cd gdal-2.1.2/
./configure --prefix=/opt/gdal212
make
make install


4.
find / -name "xml2-config"
find / -name "geos-config"
find / -name "proj_api.h"

 

yum install -y libxml2-devel

cd ~
vi .bash_profile
export LD_LIBRARY_PATH=/opt/pgsql101/lib
export PATH=/opt/pgsql101/bin:$PATH
export MANPATH=/opt/pgsql101/share/man:$MANPATH
source .bash_profile

tar -zxvf postgis-2.4.3.tar.gz
cd postgis-2.4.3/
./configure --prefix=/opt/postgis243 --with-geosconfig=/opt/geos360/bin/geos-config --with-projdir=/opt/proj493/ --with-gdalconfig=/opt/geos360/bin/geos-config --with-gdalconfig=/opt/gdal212/bin/gdal-config
make
make install

 


su - root
cp /opt/geos360/lib/libgeos_c.so.1 /opt/pgsql101/lib
cp /opt/proj493/lib/libproj.so.12 /opt/pgsql101/lib
cp /opt/gdal212/lib/libgdal.so.20 /opt/pgsql101/lib

psql
CREATE EXTENSION fuzzystrmatch;
create extension postgis;
CREATE EXTENSION postgis_topology;
CREATE EXTENSION postgis_tiger_geocoder;
CREATE EXTENSION address_standardizer;

\dx

ldd用于打印程序或者库文件所依赖的共享库列表。

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐