Installation and configuration summary of PostgreSQL in CentOs6.5 environment and solution of remote connection problem

Source: Internet
Author: User

Recently installed Linux system CentOs6.5, because of the project to use PostgreSQL, so installed 9.2 version. Because

There are few contact with Linux systems, so it's very laborious to start with. Now, the summary of these two days is as follows:

One: Installation of PostgreSQL9.2

Installation of the time I refer to the garden of the Great God's post, the special website is as follows: http://www.cnblogs.com/mchina/archive/2012/06/06/2539003.html

is to uninstall the installed PostgreSQL, you will encounter a dependency can not be uninstalled, this time will have to change the unloading order, eventually can be uninstalled.

Two: Remote link encountered problem resolution

Installing and creating users, databases, tables, and so on, should not be a problem according to the Great God's post. But there are some problems when it comes to remote links. I mainly

Met two, the process is as follows, hoping to help the people who meet the same problem.

(1) Prompt server not listening

If your database is modified according to the content of your post, and you are prompted with this error, it may be because your port is not open.

It may be because of the firewall. I did it because I didn't add a trust to Port 5432, and it started to cause the server to not listen.

There are some commands to see if the port is open:

Command: lsof-i:5432

It will show

Content, this can be seen in the 5432 is the Postgres service, and the status is listen, if your service is not open or the port is restricted by the firewall, there will be a off behind the listen, indicating

The port is not being monitored at this time.

You can also access the server's port via the Telnet command on the remote machine to see if its port is open.

The command format is as follows: Telnet 192.113.0.23 5432

This will go to the address of 192.113.0.23 5432 port, if the port is open, the DOS window will enter a black screen, if not open, is not connected.

(2) An error occurred: Not used for host "192.168.113.25", User "Postgres", Database "Postgres"

This error occurs because the IP address of the remote machine is not added to the pg_hba.conf file when it is modified. Add the line to the post is:

Host All 10.0.0.0/8 MD5

Replace the IP address of this line with 0.0.0.0/0 to realize the function of any other IP address of the remote machine Access server.

Most people have the problem is that these two, well, this concludes the conclusion here.

Installation and configuration summary of PostgreSQL in CentOs6.5 environment and solution of remote connection problem

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.