Centos使用yum安装Postgresql11和PostGIS 3及pgrouting3.1.2

Centos使用yum安装Postgresql11和PostGIS 3及pgrouting3.1.2
一、三者版本必须对应。
Postgresql与PostGIS版本对应参考官网说明,地址如下:
1、https://trac.osgeo.org/postgis/wiki/UsersWikiPostgreSQLPostGIS
2、pgrouting与Postgresql版本对应参考官网说明,在各版本帮助文档中安装说明中地址如下:https://docs.pgrouting.org/2.5/en/pgRouting-installation.html#get-the-sources (中Dependencies)但yum安装命令为:yum install pgrouting_11(11是装的postgresql的版本),所以yum安装知道postgresql的版本就行。
具体安装详细见官网:https://github.com/pgRouting/pgrouting/wiki/Notes-on-Download%2C-Installation-and-building-pgRouting
二、添加PostgreSQL、PostGIS、pgrouting的官方源(对yum安装这步可以忽略)
1、PostgreSQL的官方源参考 https://download.postgresql.org/pub/repos/yum/
2、PostGIS的官方源参考  http://download.osgeo.org/postgis/source/
3、pgrouting官方源参考https://koji.fedoraproject.org/koji/packageinfo?packageID=11212
三、检查PostgreSQL、PostGIS、pgrouting可用的安装包
yum list PostgreSQL
yum list PostGIS
yum list pgrouting
如果没有检测到可用的安装包,则安装EPEL的repository 之后再试
yum install https://mirrors.aliyun.com/epel/epel-release-latest-7.noarch.rpm
如果还没有检测到可用的安装包,可添加PostgreSQL的官方源之后再试
rpm -Uvh https://yum.postgresql.org/11/redhat/rhel-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm
四、安装
1、安装Postgres 11数据库与客户端
yum install postgresql11-server postgresql11 -y
2、安装PostGIS
yum install postgis30_11
3、安装pgrouting
yum install pgrouting_11Centos使用yum安装Postgresql11和PostGIS 3及pgrouting3.1.2_第1张图片Centos使用yum安装Postgresql11和PostGIS 3及pgrouting3.1.2_第2张图片Centos使用yum安装Postgresql11和PostGIS 3及pgrouting3.1.2_第3张图片
五、创建数据库
1、初始化数据库
/usr/pgsql-11/bin/postgresql-11-setup initdb
2、启用数据库的服务
systemctl enable postgresql-11.service
systemctl start postgresql-11.service
六、配置、设置、连接数据库
在上述安装过程完成后,默认的数据库没有登陆密码,而且不允许远程用户登录。因此需要配置远程登录与设置Postgres用户的登陆密码。
具体参考以下文章:https://blog.csdn.net/cwr888/article/details/117771164

其它有用资源备注:
1、windowspostgresql+postgis+pgrouting安装步骤图解
https://www.cnblogs.com/ytwy/p/6817179.html
https://www.cnblogs.com/ejQiu-123/p/11353847.html
2、pgRouting 路径分析功能使用-pgrouting最优路径规划之一
https://blog.csdn.net/u014529917/article/details/72866436
https://zhuanlan.zhihu.com/p/150125156
https://docs.pgrouting.org/3.0/en/index.html
3、PostGIS postgresql12安装postgis/mysql_fdw/pgrouting
https://blog.csdn.net/guzicheng1990/article/details/104615409
4、postgresql+pgrouting 最短路线sql
https://www.giserdqy.com/database/postgresql/25955/
5、Linux(CentOS)下RPM包安装、yum 安装、源码包安装PostgreSQL数据库参考地址
https://blog.csdn.net/enweitech/article/details/49096029, RPM包查找地址https://pkgs.org/,Search the RPM repository on rpmfind.net,Build System Info | koji,centos7系统下postgresql12离线安装_uvwxyzhao的博客-CSDN博客
6、Linux(CentOS)下源码包安装PostgreSQL、PostGis、pgRouting数据库参考地址
https://zhuanlan.zhihu.com/p/81814954
https://zhuanlan.zhihu.com/p/82098919
https://zhuanlan.zhihu.com/p/82405507
7、安装后版本查看
show server_version
SELECT PostGIS_full_version();
select pgr_version();

你可能感兴趣的:(POSTGIS,centos,postgresql,数据库)