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 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.
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:
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?
*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
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.