pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
postgres installed via rpms -can't run postmaster or postgres
7+ messages / 5 participants
[nested] [flat]

* postgres installed via rpms -can't run postmaster or postgres
@ 2003-10-18 08:39 Eric M. Wulff <ewulff@footbag.org>
  2003-10-18 17:31 ` Re: postgres installed via rpms -can't run postmaster or postgres Eric M. Wulff <ewulff@footbag.org>
  2003-10-21 03:15 ` Re: postgres installed via rpms -can't run postmaster or postgres Lamar Owen <lowen@pari.edu>
  0 siblings, 2 replies; 7+ messages in thread

From: Eric M. Wulff @ 2003-10-18 08:39 UTC (permalink / raw)
  To: pgsql-admin

Hi, I am relatively new to Linux and just installed postgres via rpms. 
I think.  However, I can't for the life of me figure out how to start up
postmaster or psql.

psql - I keep getting the following error when running psql...

"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.1234"?"

How do I find out if the server is running locally and accepting
connections on Unix domain socket?

postmaster - I keep getting the following error when trying to start
postmaster...

"postmaster does not know where to find the database system data.
You must specify the directory that contains the database system
either by specifying the -D invocation option or by setting the
PGDATA environment variable."

Okay, set it to what?  man and postgres docs are of little help.  Any
help is much appreciated.  Following are the rpm's I ran
redhat-install-packages on.  I got them from a mirror off
postgresQl.org...

ostgresql-7.3-2PGDG.i386.rpm         
postgresql-python-7.3-2PGDG.i386.rpm
postgresql-contrib-7.3-2PGDG.i386.rpm 
postgresql-server-7.3-2PGDG.i386.rpm
postgresql-devel-7.3-2PGDG.i386.rpm
postgresql-docs-7.3-2PGDG.i386.rpm
postgresql-jdbc-7.3-2PGDG.i386.rpm
postgresql-libs-7.3-2PGDG.i386.rpm
postgresql-pl-7.3-2PGDG.i386.rpm

Oh, and another thing I'm confused about is...  I tried to install these
in /usr/local/bin, that's where the rpms are, but they wound up in
/usr/lib.  Any idea why that might be?  I rpm'd from /usr/local/bin

many thx
Eric

	





^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: postgres installed via rpms -can't run postmaster or postgres
  2003-10-18 08:39 postgres installed via rpms -can't run postmaster or postgres Eric M. Wulff <ewulff@footbag.org>
@ 2003-10-18 17:31 ` Eric M. Wulff <ewulff@footbag.org>
  2003-10-18 19:41   ` Re: postgres installed via rpms -can't run postmaster or postgres Bruno LEVEQUE <bruno.leveque@net6d.com>
  1 sibling, 1 reply; 7+ messages in thread

From: Eric M. Wulff @ 2003-10-18 17:31 UTC (permalink / raw)
  To: Bruno LEVEQUE <bruno.leveque@net6d.com>; +Cc: pgsql-admin

Great!  I very much appreciate your help.  I'm unclear on what I need to
set PGDATA or the -D option with in order to run postmaster.  Any idea?

Here is what I'm trying and the errors given...

$ postmaster

"postmaster does not know where to find the database system data.
You must specify the directory that contains the database system
either by specifying the -D invocation option or by setting the
PGDATA environment variable."

So I tried

$ postmaster -D /etc/rc.d/init.d"

"FATAL:  data directory /etc/rc.d/init.d has group or world access;
permissions should be u=rwx (0700)"

So I changed the permissions but that didn't work either.

again, many thx
Eric




On Sat, 2003-10-18 at 06:21, Bruno LEVEQUE wrote:
> With  the postgresql-server-7.3-2PGDG.i386.rpm, you have installed a 
> file etc/rc.d/init.d/postgresql,
> if you run it like postgresql start, you must start postmaster and so 
> you can connect.
> (I am not a specialist of RH so may be there is other thinks to know)
> 
> Bruno
> 
> 
> Eric M. Wulff wrote:
> 
> >Hi, I am relatively new to Linux and just installed postgres via rpms. 
> >I think.  However, I can't for the life of me figure out how to start up
> >postmaster or psql.
> >
> >psql - I keep getting the following error when running psql...
> >
> >"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.1234"?"
> >
> >How do I find out if the server is running locally and accepting
> >connections on Unix domain socket?
> >
> >postmaster - I keep getting the following error when trying to start
> >postmaster...
> >
> >"postmaster does not know where to find the database system data.
> >You must specify the directory that contains the database system
> >either by specifying the -D invocation option or by setting the
> >PGDATA environment variable."
> >
> >Okay, set it to what?  man and postgres docs are of little help.  Any
> >help is much appreciated.  Following are the rpm's I ran
> >redhat-install-packages on.  I got them from a mirror off
> >postgresQl.org...
> >
> >ostgresql-7.3-2PGDG.i386.rpm         
> >postgresql-python-7.3-2PGDG.i386.rpm
> >postgresql-contrib-7.3-2PGDG.i386.rpm 
> >postgresql-server-7.3-2PGDG.i386.rpm
> >postgresql-devel-7.3-2PGDG.i386.rpm
> >postgresql-docs-7.3-2PGDG.i386.rpm
> >postgresql-jdbc-7.3-2PGDG.i386.rpm
> >postgresql-libs-7.3-2PGDG.i386.rpm
> >postgresql-pl-7.3-2PGDG.i386.rpm
> >
> >Oh, and another thing I'm confused about is...  I tried to install these
> >in /usr/local/bin, that's where the rpms are, but they wound up in
> >/usr/lib.  Any idea why that might be?  I rpm'd from /usr/local/bin
> >
> >many thx
> >Eric
> >
> >	
> >
> >
> >
> >---------------------------(end of broadcast)---------------------------
> >TIP 8: explain analyze is your friend
> >
> >  
> >
> 
> -- 
> Bruno LEVEQUE
> System Engineer
> SARL NET6D
> bruno.leveque@net6d.com
> http://www.net6d.com
> 
> 





^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: postgres installed via rpms -can't run postmaster or postgres
  2003-10-18 08:39 postgres installed via rpms -can't run postmaster or postgres Eric M. Wulff <ewulff@footbag.org>
  2003-10-18 17:31 ` Re: postgres installed via rpms -can't run postmaster or postgres Eric M. Wulff <ewulff@footbag.org>
@ 2003-10-18 19:41   ` Bruno LEVEQUE <bruno.leveque@net6d.com>
  0 siblings, 0 replies; 7+ messages in thread

From: Bruno LEVEQUE @ 2003-10-18 19:41 UTC (permalink / raw)
  To: Eric M. Wulff <ewulff@footbag.org>; +Cc: Bruno LEVEQUE <bruno.leveque@net6d.com>; pgsql-admin



Eric M. Wulff wrote:
> Great!  I very much appreciate your help.  I'm unclear on what I need to
> set PGDATA or the -D option with in order to run postmaster.  Any idea?

The line you need with postmaster should be like :

postmaster -i -D /PATH/WHERE/FIND/DATA/FILES -S

The /PATH/WHERE/FIND/DATA/FILES must be /var/lib/pgsql/data/ (or 
/var/lib/pgsql)

The -i is for allowing clients to connect via TCP/IP
The -S is fot separating postmaster of the console launching it.

Bruno

> 
> Here is what I'm trying and the errors given...
> 
> $ postmaster
> 
> "postmaster does not know where to find the database system data.
> You must specify the directory that contains the database system
> either by specifying the -D invocation option or by setting the
> PGDATA environment variable."
> 
> So I tried
> 
> $ postmaster -D /etc/rc.d/init.d"
> 
> "FATAL:  data directory /etc/rc.d/init.d has group or world access;
> permissions should be u=rwx (0700)"
> 
> So I changed the permissions but that didn't work either.
> 
> again, many thx
> Eric
> 
> 
> 
> 
> On Sat, 2003-10-18 at 06:21, Bruno LEVEQUE wrote:
> 
>>With  the postgresql-server-7.3-2PGDG.i386.rpm, you have installed a 
>>file etc/rc.d/init.d/postgresql,
>>if you run it like postgresql start, you must start postmaster and so 
>>you can connect.
>>(I am not a specialist of RH so may be there is other thinks to know)
>>
>>Bruno
>>
>>
>>Eric M. Wulff wrote:
>>
>>
>>>Hi, I am relatively new to Linux and just installed postgres via rpms. 
>>>I think.  However, I can't for the life of me figure out how to start up
>>>postmaster or psql.
>>>
>>>psql - I keep getting the following error when running psql...
>>>
>>>"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.1234"?"
>>>
>>>How do I find out if the server is running locally and accepting
>>>connections on Unix domain socket?
>>>
>>>postmaster - I keep getting the following error when trying to start
>>>postmaster...
>>>
>>>"postmaster does not know where to find the database system data.
>>>You must specify the directory that contains the database system
>>>either by specifying the -D invocation option or by setting the
>>>PGDATA environment variable."
>>>
>>>Okay, set it to what?  man and postgres docs are of little help.  Any
>>>help is much appreciated.  Following are the rpm's I ran
>>>redhat-install-packages on.  I got them from a mirror off
>>>postgresQl.org...
>>>
>>>ostgresql-7.3-2PGDG.i386.rpm         
>>>postgresql-python-7.3-2PGDG.i386.rpm
>>>postgresql-contrib-7.3-2PGDG.i386.rpm 
>>>postgresql-server-7.3-2PGDG.i386.rpm
>>>postgresql-devel-7.3-2PGDG.i386.rpm
>>>postgresql-docs-7.3-2PGDG.i386.rpm
>>>postgresql-jdbc-7.3-2PGDG.i386.rpm
>>>postgresql-libs-7.3-2PGDG.i386.rpm
>>>postgresql-pl-7.3-2PGDG.i386.rpm
>>>
>>>Oh, and another thing I'm confused about is...  I tried to install these
>>>in /usr/local/bin, that's where the rpms are, but they wound up in
>>>/usr/lib.  Any idea why that might be?  I rpm'd from /usr/local/bin
>>>
>>>many thx
>>>Eric
>>>
>>>	
>>>
>>>
>>>
>>>---------------------------(end of broadcast)---------------------------
>>>TIP 8: explain analyze is your friend
>>>
>>> 
>>>
>>
>>-- 
>>Bruno LEVEQUE
>>System Engineer
>>SARL NET6D
>>bruno.leveque@net6d.com
>>http://www.net6d.com
>>
>>
> 
> 
> 
> 

-- 
Bruno LEVEQUE
System Engineer
SARL NET6D
bruno.leveque@net6d.com
http://www.net6d.com




^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: postgres installed via rpms -can't run postmaster or postgres
  2003-10-18 08:39 postgres installed via rpms -can't run postmaster or postgres Eric M. Wulff <ewulff@footbag.org>
@ 2003-10-21 03:15 ` Lamar Owen <lowen@pari.edu>
  1 sibling, 0 replies; 7+ messages in thread

From: Lamar Owen @ 2003-10-21 03:15 UTC (permalink / raw)
  To: Eric M. Wulff <ewulff@footbag.org>; pgsql-admin

On Saturday 18 October 2003 04:39 am, Eric M. Wulff wrote:
> Hi, I am relatively new to Linux and just installed postgres via rpms.
> I think.  However, I can't for the life of me figure out how to start up
> postmaster or psql.

Well, Eric, you got some bad advice already.  I hope you didn't do most of it, 
since the RPM installation does most of the hard things for you.  I know this 
because I built the RPMs.  But I digress.

The RPM's are intended to make things simpler.  First, though, you need to get 
a newer version than 7.3-2.  You really want to download the 7.3.4 RPMs, 
since 7.3.4 has substantial bugfixes.

To get a running postgresql system with the RPMs, after installing the RPMs 
(assuming you have postgresql-server installed), while you are still root (do 
not su to postgres for this step, as the script you are about to run does 
that for you), run '/sbin/service postgresql start'.  The 'service' command 
(located in /sbin) on Red Hat Linux is the control program to start, stop, 
and otherwise signal system processes.  It invokes the 
/etc/rc.d/init.d/postgresql script packaged with the postgresql-server RPM.

The script automatically performs the proper initdb functions and starts the 
postmaster as user postgres (the user and group named postgres were created 
during the installation of the postgresql-server RPM by the RPM's post 
installation script).  Once the postmaster is running (use the command 'ps 
ax|grep postmaster' to see if the postmaster is running), you can su to the 
postgres user (from root only, since you can't directly log in as that user, 
unless you set its password) and run the commands you need to run.

> Oh, and another thing I'm confused about is...  I tried to install these
> in /usr/local/bin, that's where the rpms are, but they wound up in
> /usr/lib.  Any idea why that might be?  I rpm'd from /usr/local/bin

The directory in which you execute the rpm command has nothing to do with 
where the rpm is installed.  The locations for each of the files in the RPM 
itself is set by the packager (in this case, me), and isn't selectable by the 
installer, unless the packager has made the package relocatable (which the 
postgresql RPMs aren't).

I am, however, somewhat dismayed by the amount of misinformation you already 
have received.  My apologies for not replying sooner.

So, in summary, to get a running PostgreSQL installation with the RPM's 
(assuming PostgreSQL is not already installed):
rpm -i postgresql*7.3.4*.rpm
/sbin/service postgresql start
su - postgres
createdb .......
createuser ......
psql .....
......

Hey, and I'm glad to see that you actually read the README.rpm-dist... :-)

-- 
Lamar Owen
Director of Information Technology
Pisgah Astronomical Research Institute
1 PARI Drive
Rosman, NC  28772
(828)862-5554
www.pari.edu




^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: postgres installed via rpms -can't run postmaster or
@ 2003-10-18 20:15 Eric M. Wulff <ewulff@footbag.org>
  2003-10-18 21:30 ` Re: postgres installed via rpms -can't run postmaster or Mailing List <list@1006.org>
  2003-10-20 05:06 ` Re: postgres installed via rpms -can't run postmaster or mathan <mathan@hotpop.com>
  0 siblings, 2 replies; 7+ messages in thread

From: Eric M. Wulff @ 2003-10-18 20:15 UTC (permalink / raw)
  To: bruno.leveque@net6d.com; pgsql-admin

This is very helpful.  My next problem is setting up a db.  createdb fails...

"psql: FATAL:  user "blah" does not exist
createdb: database creation failed"
 
The user is either myself or root.  Of course, doesn't like root.   How
do I get psql to recognize me as a user.

fyi - I'm on redhat 8.0.  Can anyone refer me to documentation for
configuring if installed via rpm?  The docs on postgres.org seem to refer
to deeper darker operations than I need.  The README.rpm-dist alluded that
might need to set the config file for tcpip.  Did that. Still didn't help.
Redhat is more often refereeing to Red Hat db.  I am missing something.Also,
I have now studied the server start script somewhat but that hasn't shed
any light on the issue either.
 
thx much
Eric

 
> On Sat, 2003-10-18 at 10:42, Mailing List wrote:
> > 
> > > Hi, I am relatively new to Linux and just installed postgres via rpms. 
> > > I think.  However, I can't for the life of me figure out how to start up
> > > postmaster or psql.
> > 
> > If you installed via RPMS you're probably using Red Hat Linux (or
> > something similar). Then you should rely on your OS' startup script.
> > As root give:
> > 
> >   /etc/rc.d/init.d/postgresql start
> > 
> > to start your PostgreSQL server.
> > 
> > 
> > > psql - I keep getting the following error when running psql...
> > > 
> > > "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.1234"?"
> > > 
> > > How do I find out if the server is running locally and accepting
> > > connections on Unix domain socket?
> > 
> > It is not, apperantly...
> > 
> > 
> > > postmaster - I keep getting the following error when trying to start
> > > postmaster...
> > > 
> > > "postmaster does not know where to find the database system data.
> > > You must specify the directory that contains the database system
> > > either by specifying the -D invocation option or by setting the
> > > PGDATA environment variable."
> > 
> > Look at Red Hat's startup script: without the environment variables
> > defined therein the postmaster is lost...
> > 
> > 
> > > Oh, and another thing I'm confused about is...  I tried to install these
> > > in /usr/local/bin, that's where the rpms are, but they wound up in
> > > /usr/lib.  Any idea why that might be?  I rpm'd from /usr/local/bin
> > 
> > RPMs install at locations specified in the packages. You can't really
> > influence that (ok, you can, but you need to know what you are doing...)
> > 
> > 
> > Bye, Chris.
> > 
> > 
> 





^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: postgres installed via rpms -can't run postmaster or
  2003-10-18 20:15 Re: postgres installed via rpms -can't run postmaster or Eric M. Wulff <ewulff@footbag.org>
@ 2003-10-18 21:30 ` Mailing List <list@1006.org>
  1 sibling, 0 replies; 7+ messages in thread

From: Mailing List @ 2003-10-18 21:30 UTC (permalink / raw)
  To: Eric M. Wulff <ewulff@footbag.org>; +Cc: pgsql-admin

On Sat, 2003-10-18 at 22:15, Eric M. Wulff wrote:
> This is very helpful.  My next problem is setting up a db.  createdb fails...
> 
> "psql: FATAL:  user "blah" does not exist
> createdb: database creation failed"
>  
> The user is either myself or root.  Of course, doesn't like root.   How
> do I get psql to recognize me as a user.

As root become the user postgres by giving:
  su - postgres
Now create a postgres user named after your normal OS user account (blah
I guess?):
  createuser blah
(createuser is a postgres command). If you answer yes to the question
whether the new user should be able to create DBs your done. Now as OS
user blah you can do a createdb.

Bye, Chris.





^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: postgres installed via rpms -can't run postmaster or
  2003-10-18 20:15 Re: postgres installed via rpms -can't run postmaster or Eric M. Wulff <ewulff@footbag.org>
@ 2003-10-20 05:06 ` mathan <mathan@hotpop.com>
  1 sibling, 0 replies; 7+ messages in thread

From: mathan @ 2003-10-20 05:06 UTC (permalink / raw)
  To: Eric M. Wulff <ewulff@footbag.org>; pgsql-admin

Hai Eric

Try the following, let me know if you have any doubts

1. To start postmaster you must be logged in to your PostgreSQL server
   account( postgres). It will not work as root.
create the data dir (eg: /var/postgresql/data)

 # mkdir /var/postgresql/data
 # chown postgres /var/postgresql/data

 create the user "postgres"

        # su - postgres

        $ initdb -D /var/postgresql/data

        $ postmaster -i -D /var/postgresql/data

      This will start the server in the background.

      To stop a server running in the background you can type

        $ kill `cat /var/postgresql/data/postmaster.pid`

 In order to allow TCP/IP connections (rather than only Unix domain socket
ones) you need to pass the "-i" option to "postmaster".

3.   Create a database:

 create a database named 'db'

        $ createdb db

4.   To view the database created, use the following command:

 $ psql -l

 Now postgresql is running, we can view the PID by using the
 following command

 $ ps -ef | grep postmaster

 Then enter

        $ psql db

       Above rule should prompt to database db as
       Welcome to psql 7.3.1, the PostgreSQL interactive terminal.

Type:  \copyright for distribution terms
       \h for help with SQL commands
       \? for help on internal slash commands
       \g or terminate with semicolon to execute query
       \q to quit

 db=#

thanks
mathan

----- Original Message ----- 
From: "Eric M. Wulff" <ewulff@footbag.org>
To: <bruno.leveque@net6d.com>; <pgsql-admin@postgresql.org>
Sent: Sunday, October 19, 2003 1:45 AM
Subject: Re: [ADMIN] postgres installed via rpms -can't run postmaster or


> This is very helpful.  My next problem is setting up a db.  createdb
fails...
>
> "psql: FATAL:  user "blah" does not exist
> createdb: database creation failed"
>
> The user is either myself or root.  Of course, doesn't like root.   How
> do I get psql to recognize me as a user.
>
> fyi - I'm on redhat 8.0.  Can anyone refer me to documentation for
> configuring if installed via rpm?  The docs on postgres.org seem to refer
> to deeper darker operations than I need.  The README.rpm-dist alluded that
> might need to set the config file for tcpip.  Did that. Still didn't help.
> Redhat is more often refereeing to Red Hat db.  I am missing
something.Also,
> I have now studied the server start script somewhat but that hasn't shed
> any light on the issue either.
>
> thx much
> Eric
>
>
> > On Sat, 2003-10-18 at 10:42, Mailing List wrote:
> > >
> > > > Hi, I am relatively new to Linux and just installed postgres via
rpms.
> > > > I think.  However, I can't for the life of me figure out how to
start up
> > > > postmaster or psql.
> > >
> > > If you installed via RPMS you're probably using Red Hat Linux (or
> > > something similar). Then you should rely on your OS' startup script.
> > > As root give:
> > >
> > >   /etc/rc.d/init.d/postgresql start
> > >
> > > to start your PostgreSQL server.
> > >
> > >
> > > > psql - I keep getting the following error when running psql...
> > > >
> > > > "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.1234"?"
> > > >
> > > > How do I find out if the server is running locally and accepting
> > > > connections on Unix domain socket?
> > >
> > > It is not, apperantly...
> > >
> > >
> > > > postmaster - I keep getting the following error when trying to start
> > > > postmaster...
> > > >
> > > > "postmaster does not know where to find the database system data.
> > > > You must specify the directory that contains the database system
> > > > either by specifying the -D invocation option or by setting the
> > > > PGDATA environment variable."
> > >
> > > Look at Red Hat's startup script: without the environment variables
> > > defined therein the postmaster is lost...
> > >
> > >
> > > > Oh, and another thing I'm confused about is...  I tried to install
these
> > > > in /usr/local/bin, that's where the rpms are, but they wound up in
> > > > /usr/lib.  Any idea why that might be?  I rpm'd from /usr/local/bin
> > >
> > > RPMs install at locations specified in the packages. You can't really
> > > influence that (ok, you can, but you need to know what you are
doing...)
> > >
> > >
> > > Bye, Chris.
> > >
> > >
> >
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.516 / Virus Database: 313 - Release Date: 9/1/2003





^ permalink  raw  reply  [nested|flat] 7+ messages in thread


end of thread, other threads:[~2003-10-21 03:15 UTC | newest]

Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-10-18 08:39 postgres installed via rpms -can't run postmaster or postgres Eric M. Wulff <ewulff@footbag.org>
2003-10-18 17:31 ` Eric M. Wulff <ewulff@footbag.org>
2003-10-18 19:41   ` Bruno LEVEQUE <bruno.leveque@net6d.com>
2003-10-21 03:15 ` Lamar Owen <lowen@pari.edu>
2003-10-18 20:15 Re: postgres installed via rpms -can't run postmaster or Eric M. Wulff <ewulff@footbag.org>
2003-10-18 21:30 ` Re: postgres installed via rpms -can't run postmaster or Mailing List <list@1006.org>
2003-10-20 05:06 ` Re: postgres installed via rpms -can't run postmaster or mathan <mathan@hotpop.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox