Re: RH 6.0 and PostgreSQL
От | Michael Jenner |
---|---|
Тема | Re: RH 6.0 and PostgreSQL |
Дата | |
Msg-id | 373F3867.3A4B7113@kom.auc.dk обсуждение исходный текст |
Ответ на | RH 6.0 and PostgreSQL (Ricardo Peres <rjperes@student.dei.uc.pt>) |
Список | pgsql-general |
Ricardo Peres wrote: > Hello, > > After upgrading to RedHat 6.0, PostgreSQL no longer works... > Whenever I try to start the postmaster daemon, using > /erc/rc.d/init.d/postmaster script, I receive a message about postgresql > not finding the data directory. I checked /var/lib/pgsql, and in fact it > does not contain anything! > Am I missing something? Redhat didn't configure it correct. (I'm getting tired of Redhat but what's the alternative ... *hmmm*) What I did to solve the problem was (cut-and-paste from my rh60hist.txt file): 1. Add environment variables to /etc/profile: # To enable postgresql: export PGLIB=/usr/lib/pqsql export PGDATA=/var/lib/pqsql 2. from root; "su postgres" 3. "initdb" initializes database. 4. Edit /var/lib/pgsql/pg_hba.conf to allow only local access: local all trust (you may want to allow remote access as well) 5. Now postmaster is able to start (as root). /etc/rc.d/init.d/postgresql start 6. Test postgresql with: su postgres, createdb, psql, SELECT datetime 'now';, \q to quit. \? or \h gives help. Commands with \ are NOT SQL and must not end with ;, while SQL commands ALWAYS ends with ; 7. Add users [postgres@thor pgsql]$ createuser mj Enter user's postgres ID or RETURN to use unix user ID: 1000 -> Is user "mj" allowed to create databases (y/n) y Is user "mj" allowed to add users? (y/n) n createuser: mj was successfully added Hope it is usefull! By the way, what GUI is recommendable for postgresql ? pgaccess is also not running on Redhat 6.0. It reports: Error in startup script: couldn't load file "libpgtcl.so": /usr/lib/libpgtcl.so: undefined symbol: crypt while executing "load libpgtcl.so" (procedure "main" line 6) invoked from within "main $argc $argv" (file "/usr/bin/pgaccess" line 4954) Regards, Michael
В списке pgsql-general по дате отправления: