PostGIS安装及ShapeFile数据导入

1. 简介

1.1 安装环境:ContOS6.8, PostGIS9.4, PostpreSQL9.4, QGIS2.17

1.2 说明:

1.2.1 参考自http://www.postgresonline.com/journal/archives/362-An-almost-idiots-guide-to-install-PostgreSQL-9.5,-PostGIS-2.2-and-pgRouting-2.1.0-with-Yum.html#pgRouting

http://blog.csdn.net/caoshiying/article/details/51778207

1.2.2 安装过程中要求安装依赖时一律是:yes

 

2. 安装PostgreSQL

2.1 下载文件

https://yum.postgresql.org/

2.2 上传文件到ContOS(远程数据库)

2.3 安装

1. yum install pgdg-redhat94-9.4-1.noarch.rpm  

2. yum install postgresql94-server postgresql94-contrib 

 

2.4 配置

2.4.1 初始化并启动服务

service postgresql-9.4 initdb

chkconfig postgresql-9.4 on

2.4.2 编辑pg_hba.conf

cd /var/lib/pgsql/9.4/data

vim pg_hba.conf

保存并退出

1. # TYPE  DATABASE       USER            ADDRESS                METHOD  

2.    

3. # "local" is for Unix domain socket connections only  

4. local   all            all                                     peer  

5. # IPv4 local connections:  

6. host    all            all             0.0.0.0/0           MD5  

7. # IPv6 local connections:  

8. host    all            all             ::1/128                ident  

9. # Allow replication connections from localhost, by a user with the  

10. # replication privilege.  

11. #local   replication    postgres                                peer  

12. #host    replication    postgres        127.0.0.1/32           ident  

13. #host    replication    postgres        ::1/128                ident 

 

2.4.3 编辑postgresql.conf文件

vim postgresql.conf 

保存并退出

 

1. # - Connection Settings -  

2.    

3. listen_addresses = 'localhost'        # what IP address(es) to l

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值