LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-26-2008, 09:19 AM   #1
Curtor
Member
 
Registered: Feb 2008
Posts: 65

Rep: Reputation: 16
Running Postgresql


I'm following a tutorial, but the problem is that I am running on Fedora 8, and the instructions listed below do not match my system. Can I get some help as to how to run them please?

Code:
root@choate:~# vim /var/lib/postgres/postmaster.conf 
root@choate:~# grep POSTMASTER /var/lib/postgres/postmaster.conf 
POSTMASTER_OPTIONS="-i"
root@choate:~# vim /var/lib/postgres/data/pg_hba.conf 
root@choate:~# grep rftDatabase /etc/postgresql/pg_hba.conf 
host rftDatabase "globus" "140.221.8.31" 255.255.255.255 md5
root@choate:~# /etc/init.d/postgresql restart
Stopping PostgreSQL database server: postmaster.
Starting PostgreSQL database server: postmaster.
root@choate:~# su postgres -c "createuser -P globus"
Enter password for new user: *****
Enter it again: *****
Shall the new user be allowed to create databases? (y/n) y
Shall the new user be allowed to create more new users? (y/n) n
CREATE USER
Quote:
Note
This is one of the most system-dependent steps of this quickstart. Your pg_hba.conf and postmaster.conf files may be located in a different directory. Please consult your vendor's notes for details.
 
Old 03-27-2008, 02:33 AM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
And your problem is ... ?

Not obvious from what you're posting, and I don't know
what postgres looks like on FC, either.


Cheers,
Tink
 
Old 03-27-2008, 07:00 AM   #3
Curtor
Member
 
Registered: Feb 2008
Posts: 65

Original Poster
Rep: Reputation: 16
Sorry, my bad. I wasn't very clear :S
The code and quoted section above are from the tutorial, not my own shell. For me, when I try to find these files, I get the following:
Code:
[root@GRID9 globus]# locate pg_hba.conf
/usr/share/pgsql/pg_hba.conf.sample
[root@GRID9 globus]# locate postmaster.conf
[root@GRID9 globus]# 
I don't think that the pg_hba.conf.sample is the one that I want, and the postmaster does not even exist.
The tutorial itself is here:
http://www.globus.org/toolkit/docs/4....html#q-rft-co
(I am on step "2.6. Configuring RFT")
 
Old 03-27-2008, 08:25 AM   #4
Curtor
Member
 
Registered: Feb 2008
Posts: 65

Original Poster
Rep: Reputation: 16
It seems as though if I have postgresql installed, these files should exist. I have postgres installed, but I'm unsure of what exactly to do past there to generate the configuration files.
Code:
[root@GRID9 globus]# yum install postgresql
Setting up Install Process
Parsing package install arguments
Package postgresql - 8.2.6-1.fc8.i386 is already installed.
Nothing to do
[root@GRID9 globus]# which postgresql
/usr/bin/which: no postgresql in (/usr/kerberos/sbin:/usr/kerberos/bin:/usr/lib/ccache:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/globus/bin)
[root@GRID9 globus]# postgresql --version
bash: postgresql: command not found
[root@GRID9 globus]# man postgresql
No manual entry for postgresql
[root@GRID9 globus]# help postgresql
bash: help: no help topics match `postgresql'.  Try `help help' or `man -k postgresql' or `info postgresql'.
The tutorial also states that "More recent versions of postgres have deprecated the "-i" option. For version 8 and newer, instead set "listen_addresses = '*'" in the postgres configuration file." But that shouldn't matter until I find/create the configuration file to begin with. Am I supposed to just create my own file from scratch?
 
Old 03-27-2008, 09:49 AM   #5
Curtor
Member
 
Registered: Feb 2008
Posts: 65

Original Poster
Rep: Reputation: 16
How do I start PostGreSql?

So, apparently I have postgresql installed on my machine
Code:
[root@GRID9 globus]# yum install postgresql
Setting up Install Process
Parsing package install arguments
Package postgresql - 8.2.6-1.fc8.i386 is already installed.
Nothing to do
[root@GRID9 globus]# which postgresql
/usr/bin/which: no postgresql in (/usr/kerberos/sbin:/usr/kerberos/bin:/usr/lib/ccache:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/globus/bin)
[root@GRID9 globus]# postgresql --version
bash: postgresql: command not found
[root@GRID9 globus]# man postgresql
No manual entry for postgresql
[root@GRID9 globus]# help postgresql
bash: help: no help topics match `postgresql'.  Try `help help' or `man -k postgresql' or `info postgresql'.
But how do I actually get it 'running'? Please, forgive my noob-ness.
I've read that I am supposed to run the command "service postgresql initdb", but no matter where I run it, I just get that 'service' is an unrecognized command.
 
Old 03-27-2008, 10:37 AM   #6
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
You should be root, and will likely find service in the /sbin directory.
Code:
/sbin/service postgresql initdb
If you want postrgresql to start automatically at boot time, every time, use the chkconfig tool to add it to the list of services at the runlevel(s) you normally use.

--- rod.
 
Old 03-27-2008, 10:58 AM   #7
Curtor
Member
 
Registered: Feb 2008
Posts: 65

Original Poster
Rep: Reputation: 16
Sounds like a plan, but I got this:
Code:
[root@GRID9 sbin]# ls service
service
[root@GRID9 sbin]# service postgresql initdb
bash: service: command not found
 
Old 03-27-2008, 11:14 AM   #8
custangro
Senior Member
 
Registered: Nov 2006
Location: California
Distribution: Fedora , CentOS , RHEL
Posts: 1,979
Blog Entries: 1

Rep: Reputation: 209Reputation: 209Reputation: 209
Quote:
Originally Posted by Curtor View Post
Sounds like a plan, but I got this:
Code:
[root@GRID9 sbin]# ls service
service
[root@GRID9 sbin]# service postgresql initdb
bash: service: command not found
Note: theNbomr wrote

Code:
/sbin/service
I didn't see that on your post...are you sure you are using /sbin?

-C
 
Old 03-27-2008, 11:17 AM   #9
Curtor
Member
 
Registered: Feb 2008
Posts: 65

Original Poster
Rep: Reputation: 16
I see, I was under the impression that being in the directory was just as good, but it appears that I was wrong. Thank you!
 
Old 03-27-2008, 12:20 PM   #10
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Try installing postgresql-server. Chances are FC has split
these up, and you may only have the client side installed.


Cheers,
Tink
 
Old 03-31-2008, 10:17 AM   #11
Curtor
Member
 
Registered: Feb 2008
Posts: 65

Original Poster
Rep: Reputation: 16
Running Postgresql

I know, I already made a thread like this, and I apologize. But the last one has got messed up and confusing, and I'm going to make this one as clear as I can.

I am trying to follow a tutorial, and if you care to look, I am on step 2.6. Configuring RFT here -> http://www.globus.org/toolkit/docs/4...uickstart.html

The tutorial is for a Debian 3.1 machine, and states the following:

Quote:
Following the instructions at RFT Admin, we'll first configure the system to allow TCP/IP connections to postgres, as well as adding a trust entry for our current host. More recent versions of postgres have deprecated the "-i" option. For version 8 and newer, instead set "listen_addresses = '*'" in the postgres configuration file.
Code:
root@choate:~# vim /var/lib/postgres/postmaster.conf 
root@choate:~# grep POSTMASTER /var/lib/postgres/postmaster.conf 
POSTMASTER_OPTIONS="-i"
root@choate:~# vim /var/lib/postgres/data/pg_hba.conf 
root@choate:~# grep rftDatabase /etc/postgresql/pg_hba.conf 
host rftDatabase "globus" "140.221.8.31" 255.255.255.255 md5
root@choate:~# /etc/init.d/postgresql restart
Stopping PostgreSQL database server: postmaster.
Starting PostgreSQL database server: postmaster.
root@choate:~# su postgres -c "createuser -P globus"
Enter password for new user: *****
Enter it again: *****
Shall the new user be allowed to create databases? (y/n) y
Shall the new user be allowed to create more new users? (y/n) n
CREATE USER
Note
This is one of the most system-dependent steps of this quickstart. Your pg_hba.conf and postmaster.conf files may be located in a different directory. Please consult your vendor's notes for details.
Now, when I try to do this on my own system, I get the following:

Code:
[root@grid9 ~]# yum install postgresql
Setting up Install Process
Parsing package install arguments
Package postgresql - 8.2.7-1.fc8.i386 is already installed.
Nothing to do
[root@grid9 ~]# yum install postgresql-server
Setting up Install Process
Parsing package install arguments
Package postgresql-server - 8.2.7-1.fc8.i386 is already installed.
Nothing to do
[root@grid9 ~]# locate postmaster
/usr/bin/postmaster
/usr/share/man/man1/postmaster.1.gz
[root@grid9 ~]# locate pq_hba
[root@grid9 ~]# 
Do I need to start postgresql before these files are generated?
Are these files located somewhere but by another name?
Am I supposed to create these files myself from scratch?

Any help at all would be more than appreciated!!
 
Old 03-31-2008, 01:02 PM   #12
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Quote:
Originally Posted by Curtor View Post
I know, I already made a thread like this, and I apologize. But the last one has got messed up and confusing, and I'm going to make this one as clear as I can.
You mean two ... ?

Btw, the line
Code:
host rftDatabase "globus" "140.221.8.31" 255.255.255.255 md5
is syntactically wrong.
It *should* be
Code:
host rftDatabase globus  140.221.8.31/32 md5

Quote:
Originally Posted by Curtor View Post
Code:
[root@grid9 ~]# yum install postgresql
Setting up Install Process
Parsing package install arguments
Package postgresql - 8.2.7-1.fc8.i386 is already installed.
Nothing to do
[root@grid9 ~]# yum install postgresql-server
Setting up Install Process
Parsing package install arguments
Package postgresql-server - 8.2.7-1.fc8.i386 is already installed.
Nothing to do
[root@grid9 ~]# locate postmaster
/usr/bin/postmaster
/usr/share/man/man1/postmaster.1.gz
[root@grid9 ~]# locate pq_hba
[root@grid9 ~]# 
Do I need to start postgresql before these files are generated?
Are these files located somewhere but by another name?
Am I supposed to create these files myself from scratch?

Any help at all would be more than appreciated!! :D
You're searching for pq_hba, not pg_hba ... the latter is correct.


Cheers,
Tink

Last edited by Tinkster; 03-31-2008 at 01:05 PM. Reason: added code snippets
 
Old 03-31-2008, 01:25 PM   #13
Curtor
Member
 
Registered: Feb 2008
Posts: 65

Original Poster
Rep: Reputation: 16
Well, sort of. :S I'm really desperate to get it working at this point. Again, my apologies, and thank you for helping.
Code:
[root@grid9 ~]# locate pg_hba
/usr/share/pgsql/pg_hba.conf.sample
[root@grid9 ~]# locate postmaster
/usr/bin/postmaster
/usr/share/man/man1/postmaster.1.gz
[root@grid9 ~]# 
The pg_hba file seems to be a sample file. Do I just uncomment the line that I need and rename it? The location does not seem to be correct, (I could be wrong) will I have to move the file to a proper directory?

For the postmaster, is that the right file, even though it doesn't have the '.conf' suffix?
 
Old 03-31-2008, 01:28 PM   #14
Curtor
Member
 
Registered: Feb 2008
Posts: 65

Original Poster
Rep: Reputation: 16
I ran "vim /usr/bin/postmaster" and the document is unreadable, full of "@" symbols. I do not think that it is the proper configuration file.
 
Old 03-31-2008, 01:39 PM   #15
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
No, that's the executable. And you're still on FC?

I don't KNOW what fedora does to its version of postgres,
did the installation of postgresql-server have any comments/
readme's, anything with it?

What's the content of the RPM?

rpm -ql postgresql-server


And there was nothing wrong with your initial thread (where
you never bothered to respond to my questions, btw).



Cheers,
Tink
 
  


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 running but no port open wet Linux - Newbie 1 10-14-2007 12:49 PM
Error-triggering on Embedded (ARM) running PostgreSQL billygotee Linux - Networking 0 10-19-2006 05:02 PM
How to check whether Postgresql is running? coolrock Slackware 6 10-03-2006 12:17 AM
PostgreSQL database running on RH7.3 standalone want to be accessed with Java gafoor Programming 2 07-11-2005 07:50 AM
installing and running postgresql or MySql Whatshisface Linux - Software 3 02-22-2004 11:29 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:31 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