Обсуждение: RH 6.0 and PostgreSQL
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? Thanks in advance! PS-BTW, please e-mail-me directly, as I am not subscribed to this list! ----------------------------------------------------------------------------- Ricardo Peres E-mail: rjperes@student.dei.uc.pt ICQ UIN: 708926 TM: 0931 9459192 Departamento de Engenharia Informática Universidade de Coimbra PORTUGAL -----------------------------------------------------------------------------
Did you perhaps previously build postgres yourself, and now maybe Redhat has overwritten the configuration? 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? > > Thanks in advance! > > PS-BTW, please e-mail-me directly, as I am not subscribed to this list! > > ----------------------------------------------------------------------------- > Ricardo Peres > E-mail: rjperes@student.dei.uc.pt > ICQ UIN: 708926 > TM: 0931 9459192 > Departamento de Engenharia Informática > Universidade de Coimbra > PORTUGAL > ----------------------------------------------------------------------------- -- Chris Bitmead http://www.bigfoot.com/~chris.bitmead mailto:chris.bitmead@bigfoot.com
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
On Sun, 16 May 1999, Ricardo Peres wrote: > 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? The extra postgres stuff in the distribution - did you install all the postgres rpms? cr