LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-27-2005, 02:49 PM   #1
rickh
Senior Member
 
Registered: May 2004
Location: Albuquerque, NM USA
Distribution: Debian-Lenny/Sid 32/64 Desktop: Generic AMD64-EVGA 680i Laptop: Generic Intel SIS-AC97
Posts: 4,250

Rep: Reputation: 62
Postgres setup


I have some fairly sophisicated MS Access dbs that I want to try converting to Postgresql

Main reason is to learn Postgresql, but I've run into a setup problem very early on. Postgresql is installed on Fedora Core 3. After the initdb appeared to run successfully, the 1st option given for starting Postgresql fails ... The 2nd option appears to work, but I can not create a database. If anyone can steer me in the right direction, I'd be appreciative.

This is output from my efforts.
.................................................................................................... .
[myusername@MYCOMPUTERNAME ~]$ initdb -D ./pgsql/data
The files belonging to this database system will be owned by user "myusername".
This user must also own the server process.

The database cluster will be initialized with locale en_US.UTF-8.

creating directory ./pgsql/data... ok
creating directory ./pgsql/data/base... ok
creating directory ./pgsql/data/global... ok
creating directory ./pgsql/data/pg_xlog... ok
creating directory ./pgsql/data/pg_clog... ok
selecting default max_connections... 100
selecting default shared_buffers... 1000
creating configuration files... ok
creating template1 database in ./pgsql/data/base/1... ok
initializing pg_shadow... ok
enabling unlimited row size for system tables... ok
initializing pg_depend... ok
creating system views... ok
loading pg_description... ok
creating conversions... ok
setting privileges on built-in objects... ok
creating information schema... ok
vacuuming database template1... ok
copying template1 to template0... ok

Success. You can now start the database server using:

/usr/bin/postmaster -D ./pgsql/data
or
/usr/bin/pg_ctl -D ./pgsql/data -l logfile start

[myusername@MYCOMPUTERNAME ~]$ /usr/bin/postmaster -D ./pgsql/data
FATAL: could not open lock file "/tmp/.s.PGSQL.5432.lock": Permission denied
[myusername@MYCOMPUTERNAME ~]$ /usr/bin/pg_ctl -D ./pgsql/data -l logfile start
postmaster successfully started
[myusername@MYCOMPUTERNAME ~]$ createdb
createdb: could not connect to database template1: FATAL: user "myusername" does not exist
[myusername@MYCOMPUTERNAME ~]$
..................................................................................................
 
Old 02-27-2005, 03:53 PM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 19,117

Rep: Reputation: 2973Reputation: 2973Reputation: 2973Reputation: 2973Reputation: 2973Reputation: 2973Reputation: 2973Reputation: 2973Reputation: 2973Reputation: 2973Reputation: 2973
You need to add "myusername" as a DB admin to create new databases. The DB admin is postgres. Use the su command to login as postgres and run the createuser command.
 
Old 02-27-2005, 04:07 PM   #3
rickh
Senior Member
 
Registered: May 2004
Location: Albuquerque, NM USA
Distribution: Debian-Lenny/Sid 32/64 Desktop: Generic AMD64-EVGA 680i Laptop: Generic Intel SIS-AC97
Posts: 4,250

Original Poster
Rep: Reputation: 62
Ah! Very good.

Now, if you would, Why does the 1st option offered as a start command, at the end of my initdb output above, still not work?
 
Old 02-27-2005, 04:28 PM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 19,117

Rep: Reputation: 2973Reputation: 2973Reputation: 2973Reputation: 2973Reputation: 2973Reputation: 2973Reputation: 2973Reputation: 2973Reputation: 2973Reputation: 2973Reputation: 2973
pg_ctl is a script to start/stop the postmaster service. See man pages for all of the details. postmaster is setup to run using the postgres user. Your user myusername does not have permissions to access the lock file.
 
Old 02-27-2005, 04:44 PM   #5
rickh
Senior Member
 
Registered: May 2004
Location: Albuquerque, NM USA
Distribution: Debian-Lenny/Sid 32/64 Desktop: Generic AMD64-EVGA 680i Laptop: Generic Intel SIS-AC97
Posts: 4,250

Original Poster
Rep: Reputation: 62
Thanks a lot. I think I'm now ready to make a major mess.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Postgres Hiper1 Linux - Newbie 8 04-10-2005 06:43 PM
Installing Postgres 7.3 Hiper1 Linux - Software 0 12-01-2004 02:38 AM
Postgres DBMS??! Hady Linux - Newbie 4 04-27-2004 04:19 PM
postgres data jamna17 Linux - Newbie 4 04-07-2004 06:45 AM
starting postgres 7.2.2 lolmc Linux - Software 4 02-26-2003 04:30 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:22 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration