一、安装环境
银河麒麟V10
1、PostGIS简介
PostGIS是对象关系型数据库系统PostgreSQL的一个扩展,PostGIS提供如下空间信息服务功能: 空间对象、空间索引、空间操作函数和空间操作符。同时,PostGIS遵循OpenGIS的规范。
二、使用make安装PostGIS
此时发现postgis在麒麟系统环境内并没有提供相关yum安装包,那么则进行所需运行环境程序的编译安装即可。
1、安装编译时环境
设置安装相应编译文件后也需要对相应的文件进行用户的授权,否则运行时会显示该用户无权限,或者文件不存在。运行 create extension *会出现错误
1.1、proj4安装
[root@localhost home]# wget http://download.osgeo.org/proj/proj-4.9.3.tar.gz # 下载文件

[root@localhost ~]# cd /home # 如果已经下载好了,直接复制粘贴到该目录下
[root@localhost home]# tar -zxvf proj-4.9.3.tar.gz # 解压
[root@localhost home]# cd proj-4.9.3

[root@localhost proj-4.9.3]# ./configure --prefix=/data-postgis/pgsql/plugin/proj
[root@localhost proj-4.9.3]# ./configure --prefix=/data-postgis/pgsql/plugin/proj
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for style of include used by make... GNU
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking dependency style of gcc... gcc3
checking C_WFLAGS for maximum warnings... -Wall -Wdeclaration-after-statement
checking for gcc... (cached) gcc
checking wh

本文介绍了在银河麒麟V10操作系统中,由于缺乏yum安装包,如何手动编译安装PostGIS及其依赖库proj4、geos和gdal的详细步骤。安装过程包括下载源码、配置、编译和安装,并且在安装完成后,创建新的数据库并安装PostGIS扩展。
最低0.47元/天 解锁文章
2446

被折叠的 条评论
为什么被折叠?



