From: Devrim GUNDUZ <devrim@gunduz.org>
To: Jagdish rao <aquajags@yahoo.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: Linux not starting postgres automatically
Date: Thu, 21 Oct 2004 09:22:04 +0300 (EEST)
Message-ID: <Pine.LNX.4.61.0410210905320.28988@emo.org.tr> (raw)
In-Reply-To: <20041021060242.27829.qmail@web60407.mail.yahoo.com>
References: <20041021060242.27829.qmail@web60407.mail.yahoo.com>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi,
On Wed, 20 Oct 2004, Jagdish rao wrote:
> i have a Linux redhat 9 machine
> and i have installed the POstgres 7.4.5 using the
> sources
RPMs for Red Hat 9 are also available from any PostgreSQL FTP mirrors; you
could install the RPMs also: www.postgresql.org/mirrors-ftp.html
> the problem heppens when i want the postgres to start
> automatically when my server is booted
> i have written a shell script in rc.local for doing
> this which looks as shown below
> my applications like jonas are stared as User : root
> i login as root which starts my applicatios
> automatically
> but as postgres has to be started only as user :
> postgres
> shell scripts stops at the command su postgres and
> does not execute further.
You should execute something like this:
su -l postgres -c "/usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data start"
Put this line in /etc/rc.local. (If you've installed PostgreSQL under a
different directory, then edit the line above)
...or download
http://postgresql.gunduz.org/init_scripts/RedHat9/postgresql-source
and move it under /etc/init.d with the name postgresql . Then
run
chkconfig --add postgresql
chkconfig --levels 2345 postgresql on
Modify the script if you've installed postgresql under a different
directory than /usr/local/pgsql
> i searched for help and some suggestions were
>
> using chkconfig --add postgresql
> when i did that it says error reading info on
> postgresql service no such file or directory
> i guess this is bcos postgres is not installed as a
> service
Since you haven't installed from RPMs, there is no default init script
installed under /etc/init.d. So chkconfig does not make sense there. If
you install postgresql from the RPMs, then running
chkconfig --levels 2345 postgresql on
will help you.
Regards,
- --
Devrim GUNDUZ
devrim~gunduz.org devrim.gunduz~linux.org.tr
http://www.tdmsoft.comhttp://www.gunduz.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
iD8DBQFBd1WOtl86P3SPfQ4RAv+JAKDif1al63T8pfY1s7Rqi6qBcasAsgCdG9lB
wGNSfnmwtWzYkuUnbkmHZ80=
=dPf1
-----END PGP SIGNATURE-----
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: devrim@gunduz.org, aquajags@yahoo.com
Subject: Re: Linux not starting postgres automatically
In-Reply-To: <Pine.LNX.4.61.0410210905320.28988@emo.org.tr>
References: <20041021060242.27829.qmail@web60407.mail.yahoo.com> <Pine.LNX.4.61.0410210905320.28988@emo.org.tr>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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