View previous topic :: View next topic |
Author |
Message |
baboo Senior Member
Joined: 04 Sep 2007 Posts: 676
|
Posted: Wed Mar 10, 2010 9:21 pm Post subject: postgres and webmin module |
|
|
I installed postgres from extras and postgres webmin module. No error installing.
In webmin clicking on postgres I get this error msg:
The PostgreSQL host configuration file /var/lib/pgsql/data/pg_hba.conf was not found on your system. Maybe PostgreSQL has not been initialised, or your module configuration is incorrect.
I tried to fillout module config but it will not save.
The file pg_hba.conf does not exist.
?
thanks |
|
Back to top |
|
gerasimos_h Site Admin
Joined: 09 Aug 2007 Posts: 1757 Location: Greece
|
Posted: Wed Mar 10, 2010 9:36 pm Post subject: Re: postgres and webmin module |
|
|
You need to initialize the Postgresql database before you run postgresql.
Code: | su postgres -c "initdb -D /var/lib/pgsql/data"
/etc/rc.d/rc.postgresql start |
gerasimos_h _________________ Superb! Mini Server Project Manager
http://sms.it-ccs.com |
|
Back to top |
|
baboo Senior Member
Joined: 04 Sep 2007 Posts: 676
|
Posted: Wed Mar 10, 2010 9:45 pm Post subject: |
|
|
thanks for reply
the first command to initialize db works. However when trying to start using rc. command I get an error that says root is not allowed to start db. Same thing when trying from webmin.
sh: /etc/rc.d/rc.postgresql: Permission denied
when initializing here is the message at the end:
Success. You can now start the database server using:
postgres -D /var/lib/pgsql/data
or
pg_ctl -D /var/lib/pgsql/data -l logfile start
so do I need to create a user or is this a mistake in config of postgres? |
|
Back to top |
|
gerasimos_h Site Admin
Joined: 09 Aug 2007 Posts: 1757 Location: Greece
|
Posted: Wed Mar 10, 2010 9:55 pm Post subject: |
|
|
You should have postgres user and group, this is from install script
Code: | if ! grep -q postgres etc/group; then
groupadd -g 73 postgres
fi
if ! grep -q postgres etc/passwd; then
useradd -u 73 -g postgres -d /var/lib/pgsql postgres
fi |
do a "cat /etc/passwd | grep postgres" & "cat /etc/group | grep postgres"
to check them.
The rc.postgresql uses postgres user for starting the database.
Also there must be an entry in rc.local.
gerasimos_h _________________ Superb! Mini Server Project Manager
http://sms.it-ccs.com |
|
Back to top |
|
baboo Senior Member
Joined: 04 Sep 2007 Posts: 676
|
Posted: Wed Mar 10, 2010 10:04 pm Post subject: |
|
|
aaah - found problem. rc.postgresql was not executable. changed and now works.
thanks for the help. Made you earn your money today |
|
Back to top |
|
|