Re: [SLE] Installing PostgreSQL in a Linux Environment
Hiya Bob,
Thanks for your suggestion. When i tried to check if
the postmaster was running with the commands you gave
me, i got the following result:
newton@linux:~> rpm - qa | grep postmaster
newton@linux:~> rpm - qa | grep postgres
postgresql-jdbc-7.2-70
postgresql-odbc-7.2-70
postgresql-perl-7.2-70
postgresql-libs-7.2-70
postgresql-tcl-7.2-70
postgresql-python-7.2-70
postgresql-docs-7.2-70
postgresql-tk-7.2-70
postgresql-devel-7.2-70
postgresql-test-7.2-70
postgresql-tk-7.2-103
postgresql-test-7.2-103
postgresql-tcl-7.2-103
postgresql-jdbc-7.2-103
postgresql-docs-7.2-103
postgresql-7.2-70
postgresql-contrib-7.2-70
postgresql-server-7.2-70
newton@linux:~> px ax | grep postmaster
bash: px: command not found
newton@linux:~> su
Password:
linux:/home/newton # px ax | grep postmaster
bash: px: command not found
linux:/home/newton #
........................
I think the implication of the above is that the
system could not find the px command. I don't know
what else to do. Can you help again , plz?
Cheers,
Newton
--- Bob Hartung
Newton, If you installed SuSE you probably installed binary files with the rpm format. In that case you can check the install location of the files with: rpm -ql postgresql-xxxxxx
the exact file name can be had with:
rpm -qa | grep postgres
Once you have the file locations check the postgresql file in /etc/init.d/... subdirectory. Chances are that SuSE has this all set up.
Now, check to see that postmaster (the postgresql daemon) is running with:
px ax | grep postmaster
If the daemon is not running then you need to check that it is set to start on boot. This will require root access to Yast. I can't tell you much about that part as I use Fedora2.
After all is set up:
su to root and then
su postgres to become the postgres user.
At this point you should be able to create a database etc. Once the postgres superuser has created a database you can give yourself superuser rights.
Suggested Books:
Practical PostgreSQL, o'Reilly Beginning Databases with Postgresql, Wrox [I think they're still publishing]. DO NOT forget the documentation installed whether you installed from the tar.gz or rpm files. This has everything in it.
HTH
Bob Hartung
Hiya Dees,
I've seen the intelligent contributions you've been making to this community, and would wish to ask for your assistance to solve this problem.
I have, before now, been working in the windows environment. Recently however, i installed SUSE 8.0 in my desktop, and as one of the open source softwares in SUSE, also installed PostgreSQL. The problem is
have been unable to get it properly installed.
The manual i read says i should do carry out the following steps:
1) Create the postgre user, using the following command: $ su - -c " useradd postgres "
This was successfully done.
2) Install the postgreSQL Source package. This i have done successfully from the SUSE package.
3) Configure Source Tree. This I am supposed to do using: $ ./configure
However, this has refused to work as shown by
following response i got from the system:
newton@linux:~> cd home newton@linux:~/home> cd bin newton@linux:~/home/bin> ./configure bash: ./configure: No such file or
Eyinagho Newton wrote: that i the directory
newton@linux:~/home/bin> su Password: linux:/home/newton/home/bin #
./configure
bash: ./configure: No such file or
directory
linux:/home/newton/home/bin # ls . PG_VERSION global pg_hba.conf
pg_xlog postmaster.opts .. base pg_clog pg_ident.conf
postgresql.conf linux:/home/newton/home/bin # exit exit newton@linux:~/home/bin> ls PG_VERSION global pg_hba.conf pg_xlog
postmaster.opts base pg_clog pg_ident.conf postgresql.conf newton@linux:~/home/bin> ./configure --help bash: ./configure: No such file or directory newton@linux:~/home/bin>
What exactly haven't i done correctly? How do i go about configuring the Source Tree?
Thanks
Newton
_______________________________ Do you Yahoo!? Win 1 of 4,000 free domain names from Yahoo! Enter now. http://promotions.yahoo.com/goldrush
_______________________________ Do you Yahoo!? Express yourself with Y! Messenger! Free. Download now. http://messenger.yahoo.com
* Eyinagho Newton
newton@linux:~> px ax | grep postmaster bash: px: command not found newton@linux:~> su Password: linux:/home/newton # px ax | grep postmaster bash: px: command not found linux:/home/newton #
........................
I think the implication of the above is that the system could not find the px command. I don't know what else to do. Can you help again , plz?
Yes, it could not find 'px'. It should be 'ps'. ps ax|grep postmaster please trim your quotes, thanks, -- Patrick Shanahan Registered Linux User #207535 http://wahoo.no-ip.org @ http://counter.li.org HOG # US1244711 Photo Album: http://wahoo.no-ip.org/photos
Hey Patrick,
I did it as you said and it gave the underlisted
result:
newton@linux:~> su
Password:
linux:/home/newton # ps ax | grep postmaster
1077 pts/1 S 0:00 grep postmaster
Is this an indication that the postmaster is properly
installed and running?
If yes, what next should i do to create a database? I
tried creating one by using this command ' createdb
mydb' and the result i got was:
newton@linux:~> createdb mydb
psql: could not connect to server: No such file or
directory
Is the server running locally and accepting
connections on Unix domain socket
"/tmp/.s.PGSQL.5432"?
createdb: database creation failed
newton@linux:~> su
Password:
linux:/home/newton # createdb mydb
psql: could not connect to server: No such file or
directory
Is the server running locally and accepting
connections on Unix domain socket
"/tmp/.s.PGSQL.5432"?
createdb: database creation failed
linux:/home/newton #
Thanks for ur assistance.
Newton
--- Patrick Shanahan
* Eyinagho Newton
[08-29-04 14:11]: <snip> newton@linux:~> px ax | grep postmaster bash: px: command not found newton@linux:~> su Password: linux:/home/newton # px ax | grep postmaster bash: px: command not found linux:/home/newton #
........................
I think the implication of the above is that the system could not find the px command. I don't know what else to do. Can you help again , plz?
Yes, it could not find 'px'. It should be 'ps'.
ps ax|grep postmaster
please trim your quotes, thanks, -- Patrick Shanahan Registered Linux User #207535 http://wahoo.no-ip.org @ http://counter.li.org HOG # US1244711 Photo Album: http://wahoo.no-ip.org/photos
-- Check the headers for your unsubscription address For additional commands send e-mail to suse-linux-e-help@suse.com Also check the archives at http://lists.suse.com Please read the FAQs: suse-linux-e-faq@suse.com
_______________________________ Do you Yahoo!? Win 1 of 4,000 free domain names from Yahoo! Enter now. http://promotions.yahoo.com/goldrush
* Eyinagho Newton
I did it as you said and it gave the underlisted result:
ok, but one copy of your email to the list is enough. I read the list.
newton@linux:~> su Password: linux:/home/newton # ps ax | grep postmaster 1077 pts/1 S 0:00 grep postmaster
Is this an indication that the postmaster is properly installed and running?
no, it says that you ran 'grep' looking for 'postmaster'. It does not indicate that 'postmaster' is running.
newton@linux:~> createdb mydb psql: could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/tmp/.s.PGSQL.5432"? createdb: database creation failed
postgres server is not running. You cannot create a db without the postgres server running and you be connected to it. Please trim your posts. -- Patrick Shanahan Registered Linux User #207535 http://wahoo.no-ip.org @ http://counter.li.org HOG # US1244711 Photo Album: http://wahoo.no-ip.org/photos
Hey Patrick,
I did it as you said and it gave the underlisted
result:
newton@linux:~> su
Password:
linux:/home/newton # ps ax | grep postmaster
1077 pts/1 S 0:00 grep postmaster
Is this an indication that the postmaster is properly
installed and running?
If yes, what next should i do to create a database? I
tried creating one by using this command ' createdb
mydb' and the result i got was:
newton@linux:~> createdb mydb
psql: could not connect to server: No such file or
directory
Is the server running locally and accepting
connections on Unix domain socket
"/tmp/.s.PGSQL.5432"?
createdb: database creation failed
newton@linux:~> su
Password:
linux:/home/newton # createdb mydb
psql: could not connect to server: No such file or
directory
Is the server running locally and accepting
connections on Unix domain socket
"/tmp/.s.PGSQL.5432"?
createdb: database creation failed
linux:/home/newton #
......................................
There must be something i've failed to do, in order to
be able to create the database.
Cheers,
Newton
--- Patrick Shanahan
* Eyinagho Newton
[08-29-04 14:11]: <snip> newton@linux:~> px ax | grep postmaster bash: px: command not found newton@linux:~> su Password: linux:/home/newton # px ax | grep postmaster bash: px: command not found linux:/home/newton #
........................
I think the implication of the above is that the system could not find the px command. I don't know what else to do. Can you help again , plz?
Yes, it could not find 'px'. It should be 'ps'.
ps ax|grep postmaster
please trim your quotes, thanks, -- Patrick Shanahan Registered Linux User #207535 http://wahoo.no-ip.org @ http://counter.li.org HOG # US1244711 Photo Album: http://wahoo.no-ip.org/photos
-- Check the headers for your unsubscription address For additional commands send e-mail to suse-linux-e-help@suse.com Also check the archives at http://lists.suse.com Please read the FAQs: suse-linux-e-faq@suse.com
_______________________________ Do you Yahoo!? Win 1 of 4,000 free domain names from Yahoo! Enter now. http://promotions.yahoo.com/goldrush
-----Original Message-----
From: Eyinagho Newton
Hey Patrick,
I did it as you said and it gave the underlisted result:
First, no need to reply to the list and Patrick as that causes him to get two copies of your reply. Please only reply to the list unless asked otherwise. The way to use ps with grep so that you don't see the grep command used is: ps auxw|grep postmaster|grep -v grep Try that and you will find that postgresql is -not- running. Ken
Thanks Ken. Forgive my inadequacies, as i'm very new
on here. Also installed Linux ( SUSE ) only a few days
ago.
I did as you suggested and it gave me this result:
newton@linux:~> ps auxw|grep postmaster|grep -v grep
newton@linux:~> su
Password:
linux:/home/newton # ps auxw!grep postmaster!grep -v
grep
bash: !grep: event not found
linux:/home/newton # exit
exit
newton@linux:~> ps auxw|grep postmaster|grep -v grep
newton@linux:~> cd /usr
newton@linux:/usr> cd share
newton@linux:/usr/share> cd pgsql
newton@linux:/usr/share/pgsql> ps auxw|grep
postmaster|grep -v grep
newton@linux:/usr/share/pgsql> su
Password:
linux:/usr/share/pgsql # ps auxw|grep postmaster|grep
-v grep
linux:/usr/share/pgsql # ...
linux:/usr # ..
linux:/ # ps auxw|grep postmaster|grep -v grep
linux:/ # exit
exit
newton@linux:/usr/share/pgsql> ps auxw|grep
postmaster|grep -v grep
newton@linux:/usr/share/pgsql> ...
newton@linux:/usr> ..
newton@linux:/> ps auxw|grep postmaster|grep -v grep
newton@linux:/> su
Password:
linux:/ # ps auxw|grep postmaster|grep -v grep
linux:/ # cd home
linux:/home # cd newton
linux:/home/newton # ps auxw|grep postmaster|grep -v
grep
linux:/home/newton #
....................................
Not sure what the interpretation is for the above.
Thanks,
Newton
--- Ken Schneider
-----Original Message----- From: Eyinagho Newton
To: suse-linux-e@suse.com Cc: paka@wahoo.no-ip.org Date: Mon, 30 Aug 2004 04:04:02 -0700 (PDT) Subject: Re: [SLE] Installing PostgreSQL in a Linux Environment Hey Patrick,
I did it as you said and it gave the underlisted result:
First, no need to reply to the list and Patrick as that causes him to get two copies of your reply. Please only reply to the list unless asked otherwise.
The way to use ps with grep so that you don't see the grep command used is:
ps auxw|grep postmaster|grep -v grep
Try that and you will find that postgresql is -not- running.
Ken
-- Check the headers for your unsubscription address For additional commands send e-mail to suse-linux-e-help@suse.com Also check the archives at http://lists.suse.com Please read the FAQs: suse-linux-e-faq@suse.com
__________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! http://promotions.yahoo.com/new_mail
On Mon, 30 Aug, 2004 at 05:29:32 -0700, Eyinagho Newton wrote:
Thanks Ken. Forgive my inadequacies, as i'm very new on here. Also installed Linux ( SUSE ) only a few days ago.
I did as you suggested and it gave me this result:
newton@linux:~> ps auxw|grep postmaster|grep -v grep
<snip>
....................................
Not sure what the interpretation is for the above.
Put very simply, it means that "no matter who, or where, you are, 'postmaster' isn't running." 'ps' doesn't care which directory you're in, it just lists the running processes. The output is piped to 'grep postmaster' which looks for the string "postmaster". Since there is now a running process (namely; 'grep postmaster') - the output is piped further into 'grep -v grep' which *inverts* the match, discarding anything containg the string "grep", leaving... nothing... Have a look at 'grep --help' HTH /Jon -- Just say "know!"
participants (4)
-
Eyinagho Newton
-
Jon Clausen
-
Ken Schneider
-
Patrick Shanahan