X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id EFF1732A7AD for ; Thu, 21 Oct 2004 07:22:15 +0100 (BST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 81488-02 for ; Thu, 21 Oct 2004 06:22:11 +0000 (GMT) Received: from emo.org.tr (emo.org.tr [195.142.105.9]) by svr1.postgresql.org (Postfix) with ESMTP id 7C37E32A356 for ; Thu, 21 Oct 2004 07:22:11 +0100 (BST) Received: by emo.org.tr (Postfix, from userid 41643) id 1E7232FDA1; Thu, 21 Oct 2004 09:22:07 +0300 (EEST) Received: from localhost (localhost [127.0.0.1]) by emo.org.tr (Postfix) with ESMTP id 14F0E112192; Thu, 21 Oct 2004 09:22:07 +0300 (EEST) Date: Thu, 21 Oct 2004 09:22:04 +0300 (EEST) From: Devrim GUNDUZ X-X-Sender: devrim2@emo.org.tr To: Jagdish rao Cc: pgsql-admin@postgresql.org Subject: Re: Linux not starting postgres automatically In-Reply-To: <20041021060242.27829.qmail@web60407.mail.yahoo.com> Message-ID: References: <20041021060242.27829.qmail@web60407.mail.yahoo.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200410/272 X-Sequence-Number: 15265 -----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.com http://www.gunduz.org -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQFBd1WOtl86P3SPfQ4RAv+JAKDif1al63T8pfY1s7Rqi6qBcasAsgCdG9lB wGNSfnmwtWzYkuUnbkmHZ80= =dPf1 -----END PGP SIGNATURE-----