1. 简介
1.1 安装环境:ContOS6.8, PostGIS9.4, PostpreSQL9.4, QGIS2.17
1.2 说明:
和
http://blog.csdn.net/caoshiying/article/details/51778207
1.2.2 安装过程中要求安装依赖时一律是:yes
2. 安装PostgreSQL
2.1 下载文件
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