[luau] Postgres Question on RH9

John Johnson jsj at amagata.com
Tue Jul 1 21:12:00 PDT 2003


I have a newbie problem that is driving me nuts. I installed RH9 with
postgres and PHP installed. I installed pgPhpAdmin and was getting
errors telling me I didn't have postgres support, even though the dbx
section from phpinfo() told me I did have postgres support. After hours
of newsgroup searches I went to RH and downloaded the
php-pgsql-4.2.2-17.i386.rpm module. This seemed to solve the problem of
pg_connect being undefined.
I started to set up postgres according to the instructions in the
manual. This is where my hair started thinning out. I ran initdb with -D
/www/db as the options, not knowing that a data directory already
existed in /var/lib/pgsql/data. I modified the pg_hba.conf file in
/www/db to allow internet connections. I also added the line:
/usr/bin/pg_ctl start -l logfile -D /www/db -i
to 
/etc/rc.d/rc.local
I reset the system and tried to connect. I kept getting an error that
user apache didn't exist.
A little investigating and I figured out that it must have already been
pre-configured to start up the postmaster and that my call in
/etc/rc.d/rc.local wasn't working. So I looked to the
/var/lib/pgsql/data directory and saw a number of interesting files.
Postmaster.pid had the pid and I figured this was indeed the data
directory being used. Postmaster.opts had only one line:
/usr/bin/postmaster '-p' '5432'
No matter what I do to this file, it always gets reinstated. There is a
postgresql.conf file here and I set tcp/ip to true. But I have no idea
to modify the startup script to specify the -D option. I am a very new
newbie to Linux and have little clue about these startup processes. I
know that an ls * | grep post in the /etc/rc.d directory yields tons of
K15postgresql files and an S85postgresql and a postgresql. /etc/init.d
seems to have related files as well. It's all beyond me what any of this
means. Does anyone have the time to explain to a newbie how to get it so
that whatever is getting started with respect to the postmaster no
longer gets started as well has how to go about properly starting the
postmaster with the options below:
/usr/bin/pg_ctl start -l logfile -D /www/db -i

Many thanks in advance! I'm losing my mind...

--John




More information about the LUAU mailing list