银河麒麟V10使用编译安装PostSQL+PostGIS

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

一、安装环境


银河麒麟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
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值