Thread: Postgresql startup script on RH9

Postgresql startup script on RH9

From
"Balazs Wellisch"
Date:

Hi all,

 

Can anyone please tell me how to modify the postgresql startup script to accept TCP/IP connections? This is on a Redh Hat 9 machine running Postgresql 7.3.4 RPM installation. The RPMs were compiled from the SRPM available at postgresql.org.

 

The script in question is: /etc/rc.d/init.d/postgresql

 

The relevent line, I think, is:

 

su -l postgres -s /bin/sh -c "/usr/bin/pg_ctl  -D $PGDATA -p /usr/bin/postmaster -o '-p ${PGPORT}' start  > /dev/null 2>&1" < /dev/null

 

However, when I stick a –i  in there the server fails to start up. Can anyone tell me how to do this correctly?

 

TIA,

 

Balazs

 

 

 

Re: Postgresql startup script on RH9

From
Oliver Fromme
Date:
Moin,

Balazs Wellisch wrote:
 > Can anyone please tell me how to modify the postgresql startup script to
 > accept TCP/IP connections? This is on a Redh Hat 9 machine running
 > Postgresql 7.3.4 RPM installation. The RPMs were compiled from the SRPM
 > available at postgresql.org.

I would recommend not to modify that script, if possible.
Instead, you should enable the appropriate option in your
postgres.conf file:  tcpip_socket = on

For details on the configuration file, see the official docs
(look for "TCPIP_SOCKET"):
http://www.postgresql.org/docs/7.3/static/runtime-config.html

Note that you should also have a look at the pg_hba.conf
file, which controls access to databases by hosts and
usernames.

Regards
   Oliver

--
Oliver Fromme, secnetix GmbH & Co KG, Oettingenstr. 2, 80538 München
Any opinions expressed in this message may be personal to the author
and may not necessarily reflect the opinions of secnetix in any way.

cat man du : where Unix geeks go when they die

Re: Postgresql startup script on RH9

From
Tom Lane
Date:
"Balazs Wellisch" <balazs@neusolutions.com> writes:
> Can anyone please tell me how to modify the postgresql startup script to
> accept TCP/IP connections?

Don't touch the script, just set tcp_ip to true in postgresql.conf.

            regards, tom lane

Re: Postgresql startup script on RH9

From
"Balazs Wellisch"
Date:
I see... However, I'm not sure where this file belongs. Should I put it
in /etc? There is a sample config file under
/usr/share/pgsql/postgresql.conf.sample, should I simply rename this
file and leave it where it is?

I can't find an actual postgresql.conf file anywhere.

Thanks again for your help.

Balazs



-----Original Message-----
From: Oliver Fromme [mailto:olli@lurza.secnetix.de]
Sent: Friday, September 19, 2003 4:27 PM
To: Balazs Wellisch
Cc: pgsql-novice@postgresql.org
Subject: Re: [NOVICE] Postgresql startup script on RH9


Moin,

Balazs Wellisch wrote:
 > Can anyone please tell me how to modify the postgresql startup script
to
 > accept TCP/IP connections? This is on a Redh Hat 9 machine running
 > Postgresql 7.3.4 RPM installation. The RPMs were compiled from the
SRPM
 > available at postgresql.org.

I would recommend not to modify that script, if possible.
Instead, you should enable the appropriate option in your
postgres.conf file:  tcpip_socket = on

For details on the configuration file, see the official docs
(look for "TCPIP_SOCKET"):
http://www.postgresql.org/docs/7.3/static/runtime-config.html

Note that you should also have a look at the pg_hba.conf
file, which controls access to databases by hosts and
usernames.

Regards
   Oliver

--
Oliver Fromme, secnetix GmbH & Co KG, Oettingenstr. 2, 80538 München
Any opinions expressed in this message may be personal to the author
and may not necessarily reflect the opinions of secnetix in any way.

cat man du : where Unix geeks go when they die



Re: Postgresql startup script on RH9

From
"Rod K"
Date:
It will be in your data directory.  The same place as pg_hba.conf

> -----Original Message-----
> From: pgsql-novice-owner@postgresql.org
> [mailto:pgsql-novice-owner@postgresql.org]On Behalf Of Balazs Wellisch
> Sent: Friday, September 19, 2003 7:53 PM
> To: 'Oliver Fromme'
> Cc: pgsql-novice@postgresql.org
> Subject: Re: [NOVICE] Postgresql startup script on RH9
>
>
> I see... However, I'm not sure where this file belongs. Should I put it
> in /etc? There is a sample config file under
> /usr/share/pgsql/postgresql.conf.sample, should I simply rename this
> file and leave it where it is?
>
> I can't find an actual postgresql.conf file anywhere.
>
> Thanks again for your help.
>
> Balazs
>
>
>
> -----Original Message-----
> From: Oliver Fromme [mailto:olli@lurza.secnetix.de]
> Sent: Friday, September 19, 2003 4:27 PM
> To: Balazs Wellisch
> Cc: pgsql-novice@postgresql.org
> Subject: Re: [NOVICE] Postgresql startup script on RH9
>
>
> Moin,
>
> Balazs Wellisch wrote:
>  > Can anyone please tell me how to modify the postgresql startup script
> to
>  > accept TCP/IP connections? This is on a Redh Hat 9 machine running
>  > Postgresql 7.3.4 RPM installation. The RPMs were compiled from the
> SRPM
>  > available at postgresql.org.
>
> I would recommend not to modify that script, if possible.
> Instead, you should enable the appropriate option in your
> postgres.conf file:  tcpip_socket = on
>
> For details on the configuration file, see the official docs
> (look for "TCPIP_SOCKET"):
> http://www.postgresql.org/docs/7.3/static/runtime-config.html
>
> Note that you should also have a look at the pg_hba.conf
> file, which controls access to databases by hosts and
> usernames.
>
> Regards
>    Oliver
>
> --
> Oliver Fromme, secnetix GmbH & Co KG, Oettingenstr. 2, 80538 München
> Any opinions expressed in this message may be personal to the author
> and may not necessarily reflect the opinions of secnetix in any way.
>
> cat man du : where Unix geeks go when they die
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
>
>



Re: Postgresql startup script on RH9

From
"Balazs Wellisch"
Date:
Never mind my earlier email, I found it in /var/lib/pgsql/data.

Thanks very much for your help.

Balazs



-----Original Message-----
From: Oliver Fromme [mailto:olli@lurza.secnetix.de]
Sent: Friday, September 19, 2003 4:27 PM
To: Balazs Wellisch
Cc: pgsql-novice@postgresql.org
Subject: Re: [NOVICE] Postgresql startup script on RH9


Moin,

Balazs Wellisch wrote:
 > Can anyone please tell me how to modify the postgresql startup script
to
 > accept TCP/IP connections? This is on a Redh Hat 9 machine running
 > Postgresql 7.3.4 RPM installation. The RPMs were compiled from the
SRPM
 > available at postgresql.org.

I would recommend not to modify that script, if possible.
Instead, you should enable the appropriate option in your
postgres.conf file:  tcpip_socket = on

For details on the configuration file, see the official docs
(look for "TCPIP_SOCKET"):
http://www.postgresql.org/docs/7.3/static/runtime-config.html

Note that you should also have a look at the pg_hba.conf
file, which controls access to databases by hosts and
usernames.

Regards
   Oliver

--
Oliver Fromme, secnetix GmbH & Co KG, Oettingenstr. 2, 80538 München
Any opinions expressed in this message may be personal to the author
and may not necessarily reflect the opinions of secnetix in any way.

cat man du : where Unix geeks go when they die