Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

where is the pg_hba.conf file

Status
Not open for further replies.

newbiepg

Programmer
Nov 6, 2002
181
0
0
IN
I am new to Postgresql and am facing problems establishing a PHP-Postgresql connection

I need to know where Redhat 7.3 stores the pg_hba.conf file

Also if someone could explain step by step how to complete this process I would be grateful.Initially I was getting an error saying that the db was not accepting TCP-IP connections on port 5432.

I have changed the /etc/rc.d/init.d/postgresql file to include the -i and -o options on line 151.

Now it is showing an error in the pg_hba.conf file

I have both PHP and Postgresql installed(redhat 7.3), I have made no changes to the default installation
 
On a default install of PostgreSQL, the pg_hba.conf file (and postgresql.conf) is usually located at /usr/local/pgsql/data. But RedHat, and many other systems don't always follow the default.

Are you familiar with the Unix "locate" command? In most Linux distributions there is a cron job that regularly indexes all the files on your system, and lets you search for them easily with "locate filename", or even "locate [pattern]". If you want to make sure that index is current, become root and then enter the command "updatedb &". This will update the filesystem index. The & makes it run in the background, and it shouldn't take more than about 5 or 10 minutes.

If for some reason, there is no pg_hba.conf file anywhere on your system, then PostgreSQL just assumes the default settings for pg_hba.conf. All you need to do is create a file by that name, either in /usr/local/pgsql/data, or wherever the postgresql.conf file is located. -------------------------------------------

Big Brother: "War is Peace" -- Big Business: "Trust is Suspicion"
(
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top