CentOS 6.9/7通过yum安装指定版本的PostgreSQL扩展PostGIS
一、安装PostGIS扩展插件(24_10)
// 安装EPEL源
# rpm -ivh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
// 安装PostGIS
# yum install -y postgis24_10
备注:提示依赖错误需要安装EPEL的源,对应的每个系统不一样,如下所示:
# CentOS , RHEL -bit:
# rpm -ivh http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm
# CentOS , RHEL -bit:(这里根据自已的系统版本作选择)
# rpm -ivh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
提示:还有一些系统的,可以在上级目录找到(http://dl.fedoraproject.org/pub/epel/)。
二、开启PostgreSQL的PostGIS扩展并验证
// 开启插件
# su postgres
# psql
// 开启pgsql的插件
postgres=# create extension postgis;
postgres=# create extension postgis_topology;
postgres=# create extension fuzzystrmatch;
postgres=# create extension address_standardizer;
postgres=# create extension address_standardizer_data_us;
postgres=# create extension postgis_tiger_geocoder;
// 测试验证
-- 创建表
postgres=# create table mytable (
id serial primary key,
geom geometry(point, 26910),
name varchar(128)
);
-- 添加索引
postgres=# create index mytable_gix
on mytable
using gist (geom);
-- 添加一条数据
postgres=# insert into mytable (geom) values (
st_geomfromtext('point(0 0)', 26910)
);
-- 测试查询,正常能查出一条数据
postgres=# select id, name
from mytable
where st_dwithin(
geom,
st_geomfromtext('point(0 0)', 26910),
1000
);
参考:
http://postgis.net/install/(官网)
http://live.osgeo.org/zh/quickstart/postgis_quickstart.html
https://blog.csdn.net/ljg124034929/article/details/70142119
https://www.cnblogs.com/ilifeilong/p/6979288.html
https://blog.csdn.net/zeroneqin/article/details/51204202
http://www.xuebuyuan.com/2139871.html
https://download.postgresql.org/pub/repos/yum/10/redhat/rhel-6-x86_64/pgdg-centos10-10-2.noarch.rpm
CentOS 6.9/7通过yum安装指定版本的PostgreSQL扩展PostGIS的更多相关文章
- CentOS 6.9/7通过yum安装指定版本的PostgreSQL
PostgreSQL(10+) 一.安装PostgreSQL // 安装EPEL源 # wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel- ...
- CentOS 6.9/7通过yum安装指定版本的JDK/Maven
说明:通过yum好处其实很多,环境变量不用配置,配置文件放在大家都熟悉的地方,通过rpm -ql xxx可以知道全部文件的地方等等. 一.安装JDK(Oracle JDK 1.8) # wget -- ...
- CentOS 6.9/7通过yum安装指定版本的Node.js
说明:通过yum好处其实很多,环境变量不用配置,配置文件放在大家都熟悉的地方,通过rpm -ql xxx可以知道全部文件的地方等等. Node.js(8.x) 一.安装和配置 1.安装Node.js ...
- CentOS 6.9/7通过yum安装指定版本的MySQL
一.安装CENTOS 6 # wget http://repo.mysql.com/mysql57-community-release-el6.rpm && rpm -ivh mysq ...
- CentOS 6.9/7通过yum安装指定版本的Redis
一.安装 // 安装依赖 # wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm && ...
- CentOS 6.9/7通过yum安装指定版本的Nginx
说明:通过yum好处其实很多,环境变量不用配置,配置文件放在大家都熟悉的地方,通过rpm -ql nginx可以知道全部文件的地方等等. Nginx(1.12.2) 一.安装和配置 1.安装 # rp ...
- CentOS 6.9/7通过yum安装指定版本的Tomcat
说明:通过yum好处其实很多,环境变量不用配置,配置文件放在大家都熟悉的地方,通过rpm -ql xxx可以知道全部文件的地方等等. 一.安装Tomcat(8+) // 下载脚本 # git clon ...
- 【Linuc-CentOS 】通过yum安装 指定版本的nodejs
原 [Linuc-CentOS ]通过yum安装 指定版本的nodejs 2018年06月21日 06:56:32 黑夜的风 阅读数:884 版权声明:本文为博主原创文章,未经博主允许不得转载. ...
- 在CentOS系统中使用yum安装指定版本软件的方法
yum默认都是安装最新版的软件,这样可能会出一些问题,或者我们希望yum安装指定(特定)版本(旧版本)软件包.所以,就顺带分享yum安装指定(特定)版本(旧版本)软件包的方法. 过程如下: 假设这里是 ...
随机推荐
- MySQL指定使用某个索引查询语句
查询语句查询emp_no,所以先查询emp_no的索引使用primary select emp_no,salary from salaries use index(s_f_t) where emp_n ...
- Serv-U设置允许用户更改密码【转】
最近,公司上了一套Serv-U10.5.0.6的ftp软件,应该是目前最新的版本了.上的第一天就遇到了一个问题,有领导发话了,他需要自己更改密码.找了N久才找到,分享一下. 点击管理界面的用户. 进入 ...
- tyvj P1050 最长公共子序列
题目链接:http://tyvj.cn/p/1050 题解: 裸题,只是为了测试LCS模板写对没有…… #include<cstdio> #include<cstring> # ...
- Docker practice
Docker 实践 目标 创建一个基于最新版Ubuntu的镜像,在该镜像中更新apt包源并安装NTP package,最后将该新镜像提交到本地私有的registry中. 本地创建私有Registry ...
- selenium启动chrome模拟器模拟手机
一.如果chrome选项里边有这个模拟设备(比如iPhone 6 Plus): 1.先启动Selenium Grid, 比如命令:java -jar selenium-server-standalon ...
- Producer Flow Control 和 vmQueueCursor
ActiveMQ可以开启或关闭生产者流量控制Producer Flow Control ,基本原理是producer 发送一条消息会收到broker返回的ack响应,当磁盘或内存快满的时候broker ...
- systemd基础
systemd 起源 systemd这一名字源于Unix中的一个惯例:在Unix中常以“d”作为系统守护进程(英语:daemon,亦称后台进程)的后缀标识.除此以外,systemd亦是借代英文术语D体 ...
- vs2013设置语言
设置语言格式 [工具]-[选项]-[国际化]
- [实战]MVC5+EF6+MySql企业网盘实战(23)——文档列表
写在前面 上篇文章实现了图片列表,这篇文章实现文档列表将轻车熟路,因为逻辑基本相似,只是查询条件的不同.这里将txt,doc,docx,ppt,pptx,xls,xlsx的文件都归为文档列表中. 系列 ...
- [hdu4667]Building Fence 计算几何 瞎瘠薄搞
大致题意: 给出n个圆和m个三角形,求最小的的,能将所有图形覆盖的图形的周长. 正解为求所有三角形顶点与圆的切点以及圆和圆的切点构造凸包,再求路径. 因为要求结果误差<=1e-3 所以 我们可以 ...