postgresql-7.4 no workie in slackware 9.1
i did the following
./configure gmake su gmake install adduser postgres mkdir /usr/local/pgsql/data chown postgres /usr/local/pgsql/data su - postgres /usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data /usr/local/pgsql/bin/postmaster -D /usr/local/pgsql/data >logfile 2>&1 & Then tried to test it got this root@ggx:~/sql/postgresql-7.4# /usr/local/pgsql/bin/createdb test createdb: could not connect to database template1: could not connect to server: Connection refused Is the server running locally and accepting connections on Unix domain socket "/tmp/.s.PGSQL.5432"? root@ggx:~/sql/postgresql-7.4# during the ./configure, gmake, gmake install stages no errors were recorded. when i do this to check the status. root@ggx:~/sql/postgresql-7.4# /usr/bin/pg_ctl -D /usr/local/pgsql/data -l logfile start postmaster successfully started root@ggx:~/sql/postgresql-7.4# /usr/bin/pg_ctl -D /usr/local/pgsql/data status pg_ctl: postmaster or postgres not running root@ggx:~/sql/postgresql-7.4# Which is odd because its started then for some reason it doesnt work anymore. Can any one help me? |
*bump*
|
First of all, you just broke a rule :
Quote:
ps -A | grep postmaster less /home/postgres/logfile If it's not you may find that you've forgotten to add /usr/local/pgsql/lib to /etc/ld.so.conf (don't forget to run ldconfig as root as well). I'd also recommend putting this script Quote:
Oh, and to start postgres automatically when booting, add this line to your rc.local Code:
/bin/su - postgres /usr/local/pgsql/bin/pg_ctl start -l /home/postgres/logfile -D /usr/local/pgsql/data > /home/postgres/start 2>&1& Tink |
sorry about that but i have been workin on this thing for like 2 weeks now and i just mad that i cant figure it out. I did all of the steps that you said to do and its still doesnt work.
|
Back to diagnostics:
Quote:
Cheers, Tink |
root@ggx:~# ps -A | grep postmaster
root@ggx:~# less /home/postgres/logfile /home/postgres/logfile: No such file or directory root@ggx:~# it seems my postgres home is /opt/pgsql so i did root@ggx:~#less /opt/pgsql FATAL: could not open file "/usr/local/pgsql/data/PG_VERSION": Permission denied then i did this root@ggx:~# cd /usr/local/pgsql/data/ root@ggx:/usr/local/pgsql/data# chmod 777 PG_VERSION root@ggx:/usr/local/pgsql/data# createdb mydb createdb: could not connect to database template1: could not connect to server: Connection refused Is the server running locally and accepting connections on Unix domain socket "/tmp/.s.PGSQL.5432"? root@ggx:/usr/local/pgsql/data# less /opt/pgsql/logfile FATAL: could not open file "/usr/local/pgsql/data/PG_VERSION": Permission denied [1]+ Stopped less /opt/pgsql/logfile root@ggx:/usr/local/pgsql/data# :cry: |
Does not look like postmaster is running.
su - postgres /usr/local/pgsql/bin/postmaster -D /usr/local/pgsql/data Should start postmaster in the foreground. BTW root does not have any privileges to create DBs or has any other admin functions for security reasons. Open up another console window and to su back to the postgres user and create a regular user as a postgresql user. The command is createuser. Then use your regular user to create the DB. |
All times are GMT -5. The time now is 12:06 AM. |