LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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-31-2008, 02:00 PM   #16
Curtor
Member
 
Registered: Feb 2008
Posts: 65

Original Poster
Rep: Reputation: 16

You sure make me sound like a bad guy here :P

I was hoping to maybe even get some answers from other users. Don't want you doing all the work now :P Your question on the other thread was if I installed both postgresql and postgresql-server, which as you can see from the initial post of this thread, I did.

As for the third thread, that was just me being curious about how to start up postgresql-server, which is not exactly the same thing, but I admit is related none the less.

But, I don't want to argue - lets please move on with the problem at hand.
 
Old 03-31-2008, 02:01 PM   #17
Curtor
Member
 
Registered: Feb 2008
Posts: 65

Original Poster
Rep: Reputation: 16
I am running Fedora 8

As for the command you requested:
Code:
[root@grid9 ~]# rpm -ql postgresql-server
/etc/pam.d/postgresql
/etc/rc.d/init.d/postgresql
/etc/sysconfig/pgsql
/usr/bin/initdb
/usr/bin/ipcclean
/usr/bin/pg_controldata
/usr/bin/pg_ctl
/usr/bin/pg_resetxlog
/usr/bin/postgres
/usr/bin/postmaster
/usr/lib/pgsql/ascii_and_mic.so
/usr/lib/pgsql/cyrillic_and_mic.so
/usr/lib/pgsql/euc_cn_and_mic.so
/usr/lib/pgsql/euc_jp_and_sjis.so
/usr/lib/pgsql/euc_kr_and_mic.so
/usr/lib/pgsql/euc_tw_and_big5.so
/usr/lib/pgsql/latin2_and_win1250.so
/usr/lib/pgsql/latin_and_mic.so
/usr/lib/pgsql/plpgsql.so
/usr/lib/pgsql/utf8_and_ascii.so
/usr/lib/pgsql/utf8_and_big5.so
/usr/lib/pgsql/utf8_and_cyrillic.so
/usr/lib/pgsql/utf8_and_euc_cn.so
/usr/lib/pgsql/utf8_and_euc_jp.so
/usr/lib/pgsql/utf8_and_euc_kr.so
/usr/lib/pgsql/utf8_and_euc_tw.so
/usr/lib/pgsql/utf8_and_gb18030.so
/usr/lib/pgsql/utf8_and_gbk.so
/usr/lib/pgsql/utf8_and_iso8859.so
/usr/lib/pgsql/utf8_and_iso8859_1.so
/usr/lib/pgsql/utf8_and_johab.so
/usr/lib/pgsql/utf8_and_sjis.so
/usr/lib/pgsql/utf8_and_uhc.so
/usr/lib/pgsql/utf8_and_win.so
/usr/share/locale/af/LC_MESSAGES/postgres.mo
/usr/share/locale/cs/LC_MESSAGES/pg_controldata.mo
/usr/share/locale/cs/LC_MESSAGES/pg_resetxlog.mo
/usr/share/locale/cs/LC_MESSAGES/postgres.mo
/usr/share/locale/de/LC_MESSAGES/pg_controldata.mo
/usr/share/locale/de/LC_MESSAGES/pg_resetxlog.mo
/usr/share/locale/de/LC_MESSAGES/postgres.mo
/usr/share/locale/es/LC_MESSAGES/pg_controldata.mo
/usr/share/locale/es/LC_MESSAGES/pg_resetxlog.mo
/usr/share/locale/es/LC_MESSAGES/postgres.mo
/usr/share/locale/fa/LC_MESSAGES/pg_controldata.mo
/usr/share/locale/fr/LC_MESSAGES/pg_controldata.mo
/usr/share/locale/fr/LC_MESSAGES/pg_resetxlog.mo
/usr/share/locale/fr/LC_MESSAGES/postgres.mo
/usr/share/locale/hr/LC_MESSAGES/postgres.mo
/usr/share/locale/hu/LC_MESSAGES/pg_controldata.mo
/usr/share/locale/hu/LC_MESSAGES/pg_resetxlog.mo
/usr/share/locale/hu/LC_MESSAGES/postgres.mo
/usr/share/locale/it/LC_MESSAGES/pg_controldata.mo
/usr/share/locale/it/LC_MESSAGES/pg_resetxlog.mo
/usr/share/locale/it/LC_MESSAGES/postgres.mo
/usr/share/locale/ko/LC_MESSAGES/pg_controldata.mo
/usr/share/locale/ko/LC_MESSAGES/pg_resetxlog.mo
/usr/share/locale/ko/LC_MESSAGES/postgres.mo
/usr/share/locale/nb/LC_MESSAGES/pg_controldata.mo
/usr/share/locale/nb/LC_MESSAGES/pg_resetxlog.mo
/usr/share/locale/nb/LC_MESSAGES/postgres.mo
/usr/share/locale/pl/LC_MESSAGES/pg_controldata.mo
/usr/share/locale/pt_BR/LC_MESSAGES/pg_controldata.mo
/usr/share/locale/pt_BR/LC_MESSAGES/pg_resetxlog.mo
/usr/share/locale/pt_BR/LC_MESSAGES/postgres.mo
/usr/share/locale/ro/LC_MESSAGES/pg_controldata.mo
/usr/share/locale/ro/LC_MESSAGES/pg_resetxlog.mo
/usr/share/locale/ro/LC_MESSAGES/postgres.mo
/usr/share/locale/ru/LC_MESSAGES/pg_controldata.mo
/usr/share/locale/ru/LC_MESSAGES/pg_resetxlog.mo
/usr/share/locale/ru/LC_MESSAGES/postgres.mo
/usr/share/locale/sk/LC_MESSAGES/pg_controldata.mo
/usr/share/locale/sk/LC_MESSAGES/pg_resetxlog.mo
/usr/share/locale/sk/LC_MESSAGES/postgres.mo
/usr/share/locale/sl/LC_MESSAGES/pg_controldata.mo
/usr/share/locale/sl/LC_MESSAGES/pg_resetxlog.mo
/usr/share/locale/sl/LC_MESSAGES/postgres.mo
/usr/share/locale/sv/LC_MESSAGES/pg_controldata.mo
/usr/share/locale/sv/LC_MESSAGES/pg_resetxlog.mo
/usr/share/locale/sv/LC_MESSAGES/postgres.mo
/usr/share/locale/tr/LC_MESSAGES/pg_controldata.mo
/usr/share/locale/tr/LC_MESSAGES/pg_resetxlog.mo
/usr/share/locale/tr/LC_MESSAGES/postgres.mo
/usr/share/locale/zh_CN/LC_MESSAGES/pg_controldata.mo
/usr/share/locale/zh_CN/LC_MESSAGES/pg_resetxlog.mo
/usr/share/locale/zh_CN/LC_MESSAGES/postgres.mo
/usr/share/locale/zh_TW/LC_MESSAGES/pg_controldata.mo
/usr/share/locale/zh_TW/LC_MESSAGES/pg_resetxlog.mo
/usr/share/locale/zh_TW/LC_MESSAGES/postgres.mo
/usr/share/man/man1/initdb.1.gz
/usr/share/man/man1/ipcclean.1.gz
/usr/share/man/man1/pg_controldata.1.gz
/usr/share/man/man1/pg_ctl.1.gz
/usr/share/man/man1/pg_resetxlog.1.gz
/usr/share/man/man1/postgres.1.gz
/usr/share/man/man1/postmaster.1.gz
/usr/share/pgsql
/usr/share/pgsql/conversion_create.sql
/usr/share/pgsql/information_schema.sql
/usr/share/pgsql/pg_hba.conf.sample
/usr/share/pgsql/pg_ident.conf.sample
/usr/share/pgsql/pg_service.conf.sample
/usr/share/pgsql/postgres.bki
/usr/share/pgsql/postgres.description
/usr/share/pgsql/postgres.shdescription
/usr/share/pgsql/postgresql.conf.sample
/usr/share/pgsql/psqlrc.sample
/usr/share/pgsql/recovery.conf.sample
/usr/share/pgsql/sql_features.txt
/usr/share/pgsql/system_views.sql
/usr/share/pgsql/timezonesets
/usr/share/pgsql/timezonesets/Africa.txt
/usr/share/pgsql/timezonesets/America.txt
/usr/share/pgsql/timezonesets/Antarctica.txt
/usr/share/pgsql/timezonesets/Asia.txt
/usr/share/pgsql/timezonesets/Atlantic.txt
/usr/share/pgsql/timezonesets/Australia
/usr/share/pgsql/timezonesets/Australia.txt
/usr/share/pgsql/timezonesets/Default
/usr/share/pgsql/timezonesets/Etc.txt
/usr/share/pgsql/timezonesets/Europe.txt
/usr/share/pgsql/timezonesets/India
/usr/share/pgsql/timezonesets/Indian.txt
/usr/share/pgsql/timezonesets/Pacific.txt
/var/lib/pgsql
/var/lib/pgsql/.bash_profile
/var/lib/pgsql/backups
/var/lib/pgsql/data
 
Old 03-31-2008, 02:59 PM   #18
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
It doesn't look like the rpm holds (or creates) the configuration files for you.

What's the content of
/etc/sysconfig/pgsql
?


Cheers,
Tink
 
Old 03-31-2008, 03:09 PM   #19
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 did you see this one in your search for wisdom on the net?

http://www.flmnh.ufl.edu/linux/install_postgresql.htm

Going to http://www.google.com/linux and searching for "fedora postgres pg_hba.conf"
gets a few interesting hits.


Cheers,
Tink
 
Old 03-31-2008, 06:14 PM   #20
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 now I merged your three threads on the same topic into one handy
little single thread.


Cheers,
Tink
 
Old 04-01-2008, 09:05 AM   #21
Curtor
Member
 
Registered: Feb 2008
Posts: 65

Original Poster
Rep: Reputation: 16
Well, thank you for all the help
For those curious, it seems that you have to start the service before the pg_hba.conf file will be generated.
Code:
[root@grid9 ~]# yum -y install postgresql postgresql-server php-pgsql
Setting up Install Process
Parsing package install arguments
Package postgresql - 8.2.7-1.fc8.i386 is already installed.
Package postgresql-server - 8.2.7-1.fc8.i386 is already installed.
Package php-pgsql - 5.2.4-3.i386 is already installed.
Nothing to do
[root@grid9 ~]# /sbin/chkconfig postgresql on
[root@grid9 ~]# /sbin/service postgresql start
/var/lib/pgsql/data is missing. Use "service postgresql initdb" to initialize the cluster first.
                                                           [FAILED]
[root@grid9 ~]# /sbin/service postgresql initdb
Initialize Database:                                     [  OK  ]
[root@grid9 ~]# /sbin/service postgresql start
Starting postgresql service:                               [  OK  ]
[root@grid9 ~]# su - postgres
-bash-3.2$ psql template1
Welcome to psql 8.2.7, the PostgreSQL interactive terminal.
Type:  \copyright for distribution terms
       \h for help with SQL commands
       \? for help with psql commands
       \g or terminate with semicolon to execute query
       \q to quit
template1=# create user web_user;
CREATE ROLE
template1=# create database web_database owner web_user;
CREATE DATABASE
template1=# \q
-bash-3.2$ vim /var/lib/pgsql/data/pg_hba.conf
-bash-3.2$ vim /var/lib/pgsql/data/p (+tab to see options)
pg_clog/         pg_log/          pg_tblspc/       postgresql.conf
pg_hba.conf      pg_multixact/    pg_twophase/     postmaster.opts
pg_ident.conf    pg_subtrans/     pg_xlog/         postmaster.pid
-bash-3.2$ su
[root@grid9 pgsql]# /sbin/service postgresql restart 
Stopping postgresql service:                               [  OK  ]
Starting postgresql service:                               [  OK  ]
The pg_hba.conf has been found! I edited it accordingly. Though, the location of the postmaster.conf is still unknown.

Interesting thing also to notice is that after I had done all this, I opened a prompt and tried to locate these files again:
Code:
[root@grid9 globus]# locate postmaster
/usr/bin/postmaster
/usr/share/doc/postgresql-8.2.7/html/app-postmaster.html
/usr/share/man/man1/postmaster.1.gz
[root@grid9 globus]# locate pg_hba
/usr/share/pgsql/pg_hba.conf.sample
[root@grid9 globus]# 
Neither file showed up!

For reference, /etc/sysconfig/pgsql contains the following:
Code:
" ============================================================================
" Netrw Directory Listing                                        (netrw v109)
"   /etc/sysconfig/pgsql
"   Sorted by      name
"   Sort sequence: [\/]$,\.h$,\.c$,\.cpp$,\.[a-np-z]$,*,\.info$,\.swp$,\.o$\.obj
"   Quick Help: <F1>:help  -:go up dir  D:delete  R:rename  s:sort-by  x:exec
" ============================================================================
../
./
 
Old 04-01-2008, 12:17 PM   #22
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
Code:
[root@grid9 globus]# locate postmaster
/usr/bin/postmaster
/usr/share/doc/postgresql-8.2.7/html/app-postmaster.html
/usr/share/man/man1/postmaster.1.gz
[root@grid9 globus]# locate pg_hba
/usr/share/pgsql/pg_hba.conf.sample
[root@grid9 globus]# 
Neither file showed up!
That'll be because locate's database only gets updated
once a day, commonly in the small hours of the morning.

You can manually update it by running updatedb (potentially
with a -c /etc/updatedb.conf switch).



Cheers,
Tink
 
Old 04-01-2008, 12:50 PM   #23
Curtor
Member
 
Registered: Feb 2008
Posts: 65

Original Poster
Rep: Reputation: 16
Interesting. Well, that solved the problem of not finding the pg_hba.conf, but the postmaster.conf (or equivalent) is yet to be seen unfortunately.
Code:
[root@grid9 pgsql]# updatedb
[root@grid9 pgsql]# locate pg_hba
/usr/share/pgsql/pg_hba.conf.sample
/var/lib/pgsql/data/pg_hba.conf
[root@grid9 pgsql]# locate postmaster
/usr/bin/postmaster
/usr/share/doc/postgresql-8.2.7/html/app-postmaster.html
/usr/share/man/man1/postmaster.1.gz
/var/lib/pgsql/data/postmaster.opts
/var/lib/pgsql/data/postmaster.pid
/var/run/postmaster.5432.pid
[root@grid9 pgsql]# 
Although, I think that I may be able to set the option in the /var/lib/pgsql/data/postgresql.conf file. Is there any way, if I enter this value into the file, save it, and restart the server, to see if the change took affect?
 
Old 04-01-2008, 12:54 PM   #24
Curtor
Member
 
Registered: Feb 2008
Posts: 65

Original Poster
Rep: Reputation: 16
Heh, I guess there is a way, because I take back what I said about being able to set the value in that document.
Code:
[root@grid9 pgsql]# vim /var/lib/pgsql/data/postgresql.conf 
[root@grid9 pgsql]# grep POSTMASTER /var/lib/pgsql/data/postgresql.conf 
POSTMASTER_OPTIONS="-i"
[root@grid9 pgsql]# /etc/init.d/postgresql restart
Stopping postgresql service:                               [  OK  ]
Starting postgresql service:                               [FAILED]
[root@grid9 pgsql]# vim /var/lib/pgsql/data/postgresql.conf 
[root@grid9 pgsql]# grep POSTMASTER /var/lib/pgsql/data/postgresql.conf 
[root@grid9 pgsql]# /etc/init.d/postgresql restart
Stopping postgresql service:                               [FAILED]
Starting postgresql service:                               [  OK  ]
[root@grid9 pgsql]# 
Server won't start if that setting is in the mentioned file.
 
Old 04-01-2008, 01:04 PM   #25
Curtor
Member
 
Registered: Feb 2008
Posts: 65

Original Poster
Rep: Reputation: 16
*spams messages on progress*
Wait, it did work!
I had to set it to:
listen_addresses = '*'
and not:
POSTMASTER_OPTIONS="-i"
Thanks a lot for all the help everyone, especially Tink.
Now, time to move onto the next step in the tutorial :P
 
Old 04-01-2008, 01:10 PM   #26
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 worries. Which version is your postgres, btw?

The '-i' option is deprecated in 8.3.x (I think it was
since 8.x)....

[edit]
Oooops. Just scrolled up and saw it 8.2.7 ;}
[/edit]

Cheers,
Tink

Last edited by Tinkster; 04-01-2008 at 01:11 PM. Reason: [edit]
 
Old 04-02-2008, 09:00 AM   #27
Curtor
Member
 
Registered: Feb 2008
Posts: 65

Original Poster
Rep: Reputation: 16
Alright, quick question
When you said the following:
Quote:
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
Why does the IP address followed by a "/32"?
 
Old 04-02-2008, 12:18 PM   #28
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
Alright, quick question
When you said the following:

Why does the IP address followed by a "/32"?
Because it expresses the netmask, just like 255.255.255.255.
It means JUST THIS ONE IP rather than a whole range of
machines can connect.


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 01:43 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
Open Source Consulting | Domain Registration