Yum-y install PostgreSQL postgresql-libs postgresql-Server
Service PostgreSQL start
Set to boot
Chkconfig PostgreSQL on
Then modify the settings of/var/lib/pgsql/data/pg_assist.conf:
#"Local" Is ForUNIX domain socket connections only
# Local all ident sameuser
Local all trust
# IPv4 local connections:
# Host all127.0.0.1/32Ident sameuser
Host All all127.0.0.1/32MD5
Notify Postmaster that we have modified the settings.
Su-Postgres
Pg_ctl reload
Modify/var/lib/pgsql/data/PostgreSQL. conf
PostgreSQL version 8.x
Listen_addresses ='*'
Then add the settings of the host to be migrated in/var/lib/pgsql/data/pg_assist.conf, for example, a machine of a Class C segment can be imported:
1 |
Host All all 192.168 . 1.0 / 24 MD5 |
Then we will notify Postmaster that we have modified the settings.
Su-Postgres
Pg_ctl reload
Finally, if a firewall is built in Linux using the firewall iptables, you need to add the 5432: TCP port to the enabled port.
Setup-> fire prevention setting-> firewall tool-> self-built-> other ports: Incoming 5432: TCP or ipvs: TCP
Http://www.andowson.com/posts/list/177.page