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安装指定(特定)版本(旧版本)软件包的方法. 过程如下: 假设这里是 ...
随机推荐
- 移动端测试===adb shell top命令解释
adb shell top top命令提供了实时的对系统处理器的状态监视.它将显示系统中CPU最“敏感”的任务列表.该命令可以按CPU使用.内存使用和执行时间对任务进行排序. top 用法 >a ...
- USB基础介绍
(转)USB (Universal Serial Bus) 全文地址:http://vlewang.blog.163.com/blog/static/105878151201032804347546/ ...
- 64_t6
texlive-recipebook-svn37026.0-33.fc26.2.noarch.rpm 24-May-2017 15:44 37946 texlive-recipecard-doc-sv ...
- Swift中的指针类型
Swift编程语言为了能与Objective-C与C语言兼容,而引入了指针类型.尽管官方不建议频繁使用指针类型,但很多时候,使用指针能完成更多.更灵活的任务.比如,我们要实现一个交换两个整数值的函数的 ...
- 设计模式(一)工厂模式Factory(创建型)(转)
原文链接:http://blog.csdn.net/hguisu/article/details/7505909 设计模式一 工厂模式Factory 在面向对象编程中, 最通常的方法是一个new操作符 ...
- Java-悲观锁和乐观锁
Java中的乐观锁与悲观锁: 1. Java中典型的synchronized就是一种悲观锁,也就是独占锁,不过JDK1.6之后对synchronized已经做了许多优化,也不能说是完全的悲观锁了: 2 ...
- 防范SQL注入
使用占位符的方式写查询语句hibernate
- int各种数据类型的表示范围
计算方法:1.正数部分数部分:2^(字节数*8-1)-1 2.负数部分:-(2^(字节数*8-1)+1) unsign int:正数部分*2+1
- IDEA 部署项目的时候出错:Jar not loaded错误
2011-10-18 17:03:52 org.apache.catalina.loader.WebappClassLoader validateJarFile 信息: validateJarFile ...
- Django Rest Framework(版本、解析器、序列化、数据验证)
一.版本 程序也来越大时,可能通过版本不同做不同的处理 没用rest_framework之前,我们可以通过以下这样的方式去获取. class UserView(APIView): def get(se ...