Linux postgis升级(卸载)

Posted ejqiu-123

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Linux postgis升级(卸载)相关的知识,希望对你有一定的参考价值。

注:postgis卸载或升级都可以按照底下思路执行
 
postgresql安装在:/usr/local/pgsql
postgis也安装在:/usr/local/pgsql
 
 
总:
a.由于postgresql和postgis都是源码安装,按理源码安装的软件直接删除安装目录即可
 
b.但是postgis是安装到了postgresql底下的,所以直接删除目录就不行了
 
c.可以用make uninstall方法解决
 
cd /usr/resource/pg/plugin/postgis-2.5.0
 
#卸载
make uninstall
 
 
d.升级(或者重装)
 
#删除之前的文件
cd ../
rm -f -r postgis-2.5.0
 
#重新解压安装
tar -zxvf postgis-2.5.0.tar.gz
cd postgis-2.5.0
./configure --prefix=/usr/local/pgsql --with-gdalconfig=/usr/local/gdal-2.1.2/bin/gdal-config --with-pgconfig=/usr/local/pgsql/bin/pg_config --with-geosconfig=/usr/local/geos-3.7.1/bin/geos-config --with-projdir=/usr/local/proj-4.9.3 --with-xml2config=/usr/local/libxml2-2.9.7/bin/xml2-config --with-jsondir=/usr/local/json-c-0.13.1
make
make install

以上是关于Linux postgis升级(卸载)的主要内容,如果未能解决你的问题,请参考以下文章

postgis版本升级

postgis版本升级

PostGIS 版本阻止了 Amazon RDS 上的 PostgreSQL 升级

如何使用 PostGIS 升级 PostgreSQL?

Linux 安装 postgis

PostGIS 安装教程(Linux)