Configuring a PostgreSQL database cluster on Linux to accept connections

After you install PostgreSQL, you must configure the database cluster to accept client connections.

PostgreSQL uses a configuration file, pg_hba.conf, to store connection information.

NoteNote:

You may have to add the IP address of the local computer before you can start an ArcSDE service.

Steps:
  1. Make a backup copy of the pg_hba.conf file before you alter it.
  2. If the PostgreSQL postmaster is already running, stop it using the pg_ctl stop command.
  3. Open the pg_hba.conf file in a text editor.
  4. Add the IP addresses of connecting client machines and the client authentication methods used for connections.
    NoteNote:

    The recommended authentication type to use with your geodatabase is md5. For a description of this authentication method and the pg_hba.conf file, consult the PostgreSQL documentation.

    For example, to allow any user who supplies a valid password to connect to a database named habitat from addresses beginning with 10.2.12 using an md5 connection, add the following line to the pg_hba.conf file:

    host habitat all 10.2.12.0/24 md5
    

    If you want to allow all users who supply a valid password to connect to any of the databases on the PostgreSQL instance from addresses beginning with 100, you would add a line similar to the following to the pg_hba.conf file:

    host all all 100.0.0.0/8 md5
    

    The preceding examples were for IPV4 addresses. If you need to configure the database cluster to accept connections from machines with an IPV6 address, the format would be as follows:

    host all all fe60::61f9:1253:c522:9b92%10/128 md5
    

    To allow any machines with an address beginning with fe60 to connect, you would add this line to the pg_hba.conf file:

    host all all fe60::0000:0000:0000:0000%10/8 md5

    If your PostgreSQL database cluster is set up on a machine that has an IPV6 address and you want machines with an IPV4 address to connect to it, you need to uncomment the following line in the pg_hba.conf file:

    host all all ::1/128 md5
    

Related Topics


8/19/2013