Step # 1: Enable client authentication
Edit the PostgreSQL configuration file /var/lib/pgsql/data/pg_hba.conf:
# TYPE DATABASE USER CIDR-ADDRESS METHOD
# "local" is for Unix domain socket connections only
local all all trust
# IPv4 local connections:
host all all 127.0.0.1/32 trust
host all all 10.14.0.0/0 password
# IPv6 local connections:
host all all ::1/128 password
Save and close the file.
Step # 2: Enable networking for PostgreSQL: Allow TCP/IP socket
If you are using PostgreSQL version 8.x or newer use the following instructions or skip to Step # 3a for older version (7.x or older).
You need to open PostgreSQL configuration file /var/lib/pgsql/data/postgresql.conf
In this file change the following:
listen_addresses='localhost'
to
listen_addresses='*'
Step # 3 Restart PostgreSQL Server
Type the following command:
# /etc/init.d/postgresql restart
Step # 4: Iptables firewall rules
Make sure iptables is not blocking communication, open port 5432 (append rules to your iptables scripts or file /etc/sysconfig/iptables):
put this line in the iptables,
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 5432 -j ACCEPT
But it must before this line,
-A RH-Firewall-1-INPUT -j REJECT --reject-with icmp-host-prohibited
Restart firewall:
# /etc/init.d/iptables restart
Step # 6: Test your setup
Modified from http://www.cyberciti.biz/tips/postgres-allow-remote-access-tcp-connection.html
**Try to disable the Iptable if you still can not work it out.
Subscribe to:
Post Comments (Atom)
Datatable static image not found on the server
When you use ```datatables.min.css``` and ```datatables.min.js``` locally, instead of datatables CDN, you may have encountered that ```sort...
-
Step 1. Install Oracle XE 11g 1. Download Oracle XE (oracle-xe-11.2.0-1.0.x86_64.rpm.zip) from Oracle official website. You need an accoun...
-
I used the following method to hide the extra long column contents when loading the page. The contents will then display when mouse hover th...
-
When you use ```datatables.min.css``` and ```datatables.min.js``` locally, instead of datatables CDN, you may have encountered that ```sort...
No comments:
Post a Comment