LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 10-03-2006, 10:52 PM   #1
coolrock
Member
 
Registered: Sep 2006
Location: Singapore
Distribution: Slackware Linux
Posts: 48

Rep: Reputation: 15
PostgreSql


Hi, I just installed postgresql and when I try to test it, there's an error

postgres@nimrod3:~$ /usr/local/pgsql/bin/postmaster -D /usr/local/pgsql/data >logfile 2>&1 &
[1] 29303
postgres@nimrod3:~$ /usr/local/pgsql/bin/createdb test
createdb: could not connect to database postgres: could not connect to server: Connection refused
Is the server running locally and accepting
connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
[1]+ Exit 1 /usr/local/pgsql/bin/postmaster -D /usr/local/pgsql/data >logfile 2>&1

Any ideas? Any help is appreciated

Thanks in advance.

Me = Sorry for the trouble.
 
Old 10-03-2006, 11:05 PM   #2
BCarey
Senior Member
 
Registered: Oct 2005
Location: New Mexico
Distribution: Slackware
Posts: 1,639

Rep: Reputation: Disabled
Did you run initdb?

Brian
 
Old 10-03-2006, 11:09 PM   #3
coolrock
Member
 
Registered: Sep 2006
Location: Singapore
Distribution: Slackware Linux
Posts: 48

Original Poster
Rep: Reputation: 15
postgres@nimrod:/usr/local/pgsql/data$ /usr/local/pgsql/bin/postmaster -D /usr/local/pgsql/data >logfile 2>&1 &
[1] 29337
postgres@nimrod:/usr/local/pgsql/data$ /usr/local/pgsql/bin/postmaster -D /usr/local/pgsql/data
FATAL: could not open lock file "/tmp/.s.PGSQL.5432.lock": Permission denied
[1]+ Exit 1 /usr/local/pgsql/bin/postmaster -D /usr/local/pgsql/data >logfile 2>&1


I did run initd already.
postgres@nimrod:/usr/local/pgsql/data$ /usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.

The database cluster will be initialized with locales
COLLATE: C
CTYPE: en_US
MESSAGES: en_US
MONETARY: en_US
NUMERIC: en_US
TIME: en_US
The default database encoding has accordingly been set to LATIN1.

initdb: directory "/usr/local/pgsql/data" exists but is not empty
If you want to create a new database system, either remove or empty
the directory "/usr/local/pgsql/data" or run initdb
with an argument other than "/usr/local/pgsql/data".


help~ Thanks in advance
 
Old 10-03-2006, 11:11 PM   #4
coolrock
Member
 
Registered: Sep 2006
Location: Singapore
Distribution: Slackware Linux
Posts: 48

Original Poster
Rep: Reputation: 15
I am stuck at http://www.postgresql.org/docs/8.1/i...tallation.html

Section 14.1. Short Version

I did up to
/usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data
/usr/local/pgsql/bin/postmaster -D /usr/local/pgsql/data >logfile 2>&1 &

But
/usr/local/pgsql/bin/createdb test
/usr/local/pgsql/bin/psql test

doesnt work.

Ideas/suggestion? Thanks in advance
 
Old 10-04-2006, 10:24 AM   #5
BCarey
Senior Member
 
Registered: Oct 2005
Location: New Mexico
Distribution: Slackware
Posts: 1,639

Rep: Reputation: Disabled
I think that /usr/local/pgsql/bin/postmaster -D /usr/local/pgsql/data >logfile 2>&1 & is what is failing. After you do this command do you see the postmaster process running (ps -A)? What does logfile show if there is one?

Check the ownership of /usr/local/pgsql/data (ls -l).

The problem might actually be the logfile. If you are issuing the command from your own home directory it will try to create the logfile there. The postgres user does not have permissions to write to your home directory. Maybe try "... >/usr/local/pgsql/logfile..." instead.

Brian
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
PostgreSql sijomon_nd Fedora 1 09-27-2005 09:27 PM
need help in postgresql yawhum80 Linux - Newbie 0 10-28-2003 10:03 AM
postgresql -odbc & postgresql-jdbc installation kjsubbu Linux - Software 0 06-19-2003 02:50 AM
postgreSQL dsgdevil Linux - Software 3 02-20-2003 10:30 PM
PostgreSQL dorian33 Linux - Software 3 01-15-2003 04:01 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 12:25 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration