CentOS7 安装 PostGIS方法(适合国内网络
安装Postgresql 9.4
yum install http://yum.postgresql.org/9.4/redhat/rhel-6-x86_64/pgdg-redhat94-9.4-1.noarch.rpm
yum install postgresql94-server postgresql94-contrib
service postgresql-9.4 initdb
chkconfig postgresql-9.4 on
安装Postgis
yum install postgis2_94
如果提示缺少一大堆依赖库,则需要安装对应源,
#CentOS 7, RHEL 7 64-bit:
sudo http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm
# CentOS 6, RHEL 6 64-bit:
sudo rpm -ivh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
# CentOS 6, RHEL 6 32-bit:
sudo rpm -ivh http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
# CentOS 5, RHEL 5 64-bit:
sudo rpm -ivh http://dl.fedoraproject.org/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm
# CentOS 5, RHEL 5 32-bit:
sudo rpm -ivh http://dl.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm
这里网络被墙,不能导入,改用阿里云源(针对centos7
http://mirrors.aliyun.com/epel/7/x86_64/e/epel-release-7-6.noarch.rpm
安装pgRouting
yum install pgrouting_94
初始化数据库
CentOS 6.x 系统
service postgresql-9.4 initdb
CentOS 7 系统
/usr/pgsql-9.4/bin/postgresql94-setup initdb
启动服务并设置为开机启动
CentOS 6.x 系统
service postgresql-9.4 start
chkconfig postgresql-9.4 on
CentOS 7 系统
systemctl enable postgresql-9.4
systemctl start postgresql-9.4 Li
CentOS 6.x 系统
开放防火墙端口
vi /etc/sysconfig/iptables
-A INPUT -m state --state NEW -m tcp -p tcp --dport 5432 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
重启防火墙服务
service iptables restart
CentOS 7 系统
firewall-cmd --permanent --add-port=5432/tcp
firewall-cmd --permanent --add-port=80/tcp
firewall-cmd --reload
设置postgres用户密码
postgres=# \password postgres
CentOS7 安装 PostGIS方法(适合国内网络的更多相关文章
- CentOS7 安装 PostGIS方法(适合国内网络)
安装Postgresql 9.4 yum install http://yum.postgresql.org/9.4/redhat/rhel-6-x86_64/pgdg-redhat94-9.4-1. ...
- VMware下CentOS7安装后,还原虚拟网络后,敲ifconfig不显示局域网ip解决方法
VMware下CentOS7安装后,还原虚拟网络后,敲ifconfig不显示局域网ip,没有出现eth0网卡,不能上网,SSH不能连接,输入ifconfig后如下图: 解决方法: 1.编辑网卡的配置文 ...
- CentOS7安装后连不上网络无法使用yum
更新日期:2018年5月31日 笔者今天在本地VMware中安装了CentOS7后,使用yum安装wget的时候发现不能下载,并有下图所示的提示: 于是,笔者就去问度娘,然后就找到了如下各种回复: 1 ...
- centos7安装eclipse方法
很多喜欢编程的朋友并不是很喜欢使用Windows来编写程序,尽管可视化编程但是操作相对繁琐,因而只在电脑上装有Linux系统,那么我们来说一下Linux下安装Java EE编程工具eclipse的方法 ...
- CentOS7安装配置Bacula yum方法
参考: https://www.baidu.com/link?url=o2QIy2YZWjsJPAFJuYFhrH3nPvtyRkSe-o5Q_FqFZ5E1EMOsIOmGeKm0HAonwHOw8 ...
- 详解Linux(centos7)下安装OpenSSL安装图文方法
OpenSSL是一个开源的ssl技术,由于我需要使用php相关功能,需要获取https的文件所以必须安装这个东西了,下面我整理了两种关于OpenSSL安装配置方法. 安装环境: 操作系统:CentO ...
- [转]详解Linux(centos7)下安装OpenSSL安装图文方法
OpenSSL是一个开源的ssl技术,由于我需要使用php相关功能,需要获取https的文件所以必须安装这个东西了,下面我整理了两种关于OpenSSL安装配置方法. 安装环境: 操作系统:CentO ...
- CentOS7安装CDH 第三章:CDH中的问题和解决方法
相关文章链接 CentOS7安装CDH 第一章:CentOS7系统安装 CentOS7安装CDH 第二章:CentOS7各个软件安装和启动 CentOS7安装CDH 第三章:CDH中的问题和解决方法 ...
- 【Docker】 CentOS7 安装 Docker 及其使用方法 ( 一 )
系列目录: [Docker] CentOS7 安装 Docker 及其使用方法 ( 一 ) [Docker] 使用Docker 在阿里云 Centos7 部署 MySQL 和 Redis (二) [D ...
随机推荐
- Programmer's Jokes
1. 一天, 下着小雨, 和同事们一起去上班,一位同事差点滑倒,另一位同事笑话说:如果人走路用爬的就不会摔倒了! 遂反问他:能用两行代码搞定的事情为什么要用4行呢? 2. 有趣的公式( Fr ...
- ubuntu笔记1
修改grub启动项顺序 在/etc/grub.d/ 目录下 文件前序号越小 在启动界面顺序越靠前, 用sudo mv修改文件名, sudo update-grub更新
- 字符集转换: Ansi - Unicode
字符集转换: Ansi - Unicode wstring AnsiToUnicode (const string& strSrc ) { /*!< 分配目标空间 */ ,strSrc. ...
- MySQL之左连接与右连接
左连接: select 列1,列2,列N from tableA left join tableB on tableA.列 = tableB.列(正常是一个外键列) [此处表连接成一张大表,完全当成一 ...
- OpenGL第12-14讲小结
首先要为自己为什么没有写第10讲的控制3D场景和第11讲的红旗飘飘呢?因为没看啊~哈哈哈,而且我尝试着运行红旗飘飘的时候电脑蓝屏了(可能不是它的锅),暂时跳过了. 恩,12到14主要了解了这么些东西, ...
- unity基本操作二
一:error1,先断网再启动点击Manual Activation点击Save License生成相应的alf文件2,联网打开https://license.unity3d.com/manual上传 ...
- python 实现梯度下降
在多元线性回归中会用到梯度下降来计算参数值.这里我用python实现一个梯度下降版本. 这里多元线性方程为 y = A0+A1*x1+...+An* xn 数据输入格式,y表示 y \t x1 \t ...
- 素数个数统计——Eratosthenes筛法 [LeetCode 204]
1- 问题描述 Count the number of prime numbers less than a non-negative number, n 2- 算法思想 给出要筛数值的范围 $n$,找 ...
- maven 相关
maven相关 一 windows安装配置maven: 1. 官网下载最新版本maven,发布日志时为: maven3.2.1 2.解压maven到相应的目录:配置环境变量: MAVEN_HOME:D ...
- PHP取二进制文件头快速判断文件类型的实现代码
通过读取文件头信息来识别文件的真实类型. 一般我们都是按照文件扩展名来判断文件类型,但是这个很不靠谱,轻易就通过修改扩展名来躲避了,一般必须要读取文件信息来识别,PHP扩展中提供了类似 exif_im ...