Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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:
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")
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?
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.
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.
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.
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?
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.
[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
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?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.