pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jagdish rao <aquajags@yahoo.com>
To: pgsql-admin@postgresql.org
Subject: Linux not starting postgres automatically
Date: Wed, 20 Oct 2004 23:02:42 -0700 (PDT)
Message-ID: <20041021060242.27829.qmail@web60407.mail.yahoo.com> (raw)

hi friends

pls help me 

i have a Linux redhat 9 machine
and i have installed the POstgres 7.4.5 using the
sources

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.

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 

so this didn't help

pls help me in achieving this .

#!bin/tcsh

ANT_HOME=/home/deploy/local/ant

JAVA_HOME=/home/deploy/local/jdk

JONAS_ROOT=/usr/local/JONAS414

PGDATA=/usr/local/pgsql/data

PATH=$JAVA_HOME/bin:/home/deploy/local/ant/bin:/usr/local/pgsql/bin:$PATH:/usr/local/JONAS414/bin/unix

CLASSPATH=:.:$JAVA_HOME/lib:/usr/local/kesintlclasses:/usr/local/JONAS414/lib/commons/j2ee/ejb-2_1-api.jar:/usr/local/JONAS414/lib/commons/j2ee/jta-spec1_0_1.jar

#export JONAS_ROOT PATH JAVA_HOME TOMCAT_HOME

export CLASSPATH PATH JAVA_HOME CATALINA_HOME
JONAS_ROOT PGDATA

echo 'set java home .........'
echo $JAVA_HOME
echo 'starting postgres.....'

(su postgres ; postmaster)

echo 'started postgres.....'


echo 'starting jonas.....'

jonas start









__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 



view thread (2+ messages)  latest in thread

Message-ID: <20041021060242.27829.qmail@web60407.mail.yahoo.com>
Permalink:  ../20041021060242.27829.qmail@web60407.mail.yahoo.com/
Also on:    postgresql.org/message-id/20041021060242.27829.qmail@web60407.mail.yahoo.com

 · 

reply

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: aquajags@yahoo.com
  Subject: Re: Linux not starting postgres automatically
  In-Reply-To: <20041021060242.27829.qmail@web60407.mail.yahoo.com>
  References: <20041021060242.27829.qmail@web60407.mail.yahoo.com>

* 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