Linux postgresql 10 configuration

1. Install postgresql 10, I installed it to the default directory /opt/PostgreSql/10
2. Modify pg_hba.conf in the data directory under the installation directory, in the ipv4 section, copy the existing line and paste it to add a line, then add ip and Change the port to 0.0.0.0/0, save and exit.
3. Modify the firewall: vim /etc/sysconfig/iptables
add a line -A INPUT line by copying and pasting, change the port number to 5432, save and exit.
4. Restart/save the firewall: service iptables restart
                  service iptables save
5. Start the postgresql service: service postgresql-10 start
6. Use pgAdmin of other machines to access it.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326122572&siteId=291194637