PostgreSQL10版本的主從安裝配置在 http://www.javashuo.com/article/p-xugkknvh-ee.htmlhtml
$ yum install https://download.postgresql.org/pub/repos/yum/9.6/redhat/rhel-7-x86_64/pgdg-centos96-9.6-3.noarch.rpm
$ yum install postgresql96
$ yum install postgresql96-server
$ yum install postgresql96-devel.x86_64
$ yum install postgresql96-contrib.x86_64
$ /usr/pgsql-9.6/bin/postgresql96-setup initdb
$ systemctl enable postgresql-9.6 $ systemctl start postgresql-9.6
$ passwd postgres
$ su - postgres $ psql -U postgres alter user postgres with password '你的密碼';
可能在/var/lib/pgsql/9.6/data下,能夠linux
在最後添加容許訪問IP段(全網段可訪問)
host all all 0.0.0.0/0 md5sql
找到用戶參數listen_address(取消掉註釋),改爲下面樣式:數據庫
listen_address = '*'
啓用密碼驗證centos
#password_encryption = on 修改成 password_encryption = on
$ systemctl restart postgresql-9.6
備註:使用Navicat For PostgreSql來鏈接post