Linux - Enterprise This forum is for all items relating to using Linux in the Enterprise. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
08-05-2007, 12:39 PM
|
#1
|
Member
Registered: Oct 2005
Location: Bangladesh
Posts: 504
Rep:
|
startup script not working in RHEL 4
Dear Friends,
I have to use the follwoing script for auto startup oracle database in my Redhat ent. 4 server , but its not working . I have to keep it into the follwoing directory :
"/etc/rc.d/"
"/etc/rc.d/init.d/"
"/etc/rc.d/rc3.d/"
"/etc/rc.d/rc5.d/"
and give the permission 755 & also change the follwing :
vi /etc/oratab
*:/u01/app/oracle/product/10.2.0/db_1:y
orcl:/u01/app/oracle/product/10.2.0/db_1:y
And . my oracle .bash_profile is the following :
##################bash_profile#################################
# Oracle Settings
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR
ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1; export ORACLE_HOME
ORACLE_SID=orcl; export ORACLE_SID
ORACLE_TERM=xterm; export ORACLE_TERM
PATH=/usr/sbin:$PATH; export PATH
PATH=$ORACLE_HOME/bin:$PATH; export PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/jre:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH "
###############SCRIPTS#############################
#!/bin/sh
#
# Startup script for the Newton Application
#
# chkconfig: 345 56 50
# description: Starts/Stops the Oracle DB, the Oracle Listener,
# the Cobol Licence Manager and the Newton Tuxedo Servers.
# Source function library.
. /etc/rc.d/init.d/functions
# Used variables
export ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1
DBSTART=$ORACLE_HOME/bin/dbstart
DBSHUT=$ORACLE_HOME/bin/dbshut
LSNRCTL=$ORACLE_HOME/bin/lsnrctl
RETVAL=0
startora()
{
echo -n $"Starting Oracle DB: "
daemon --user oracle $DBSTART
RETVAL=$?
echo
[ $RETVAL = 0 ] && touch /var/lock/subsys/oradb
return $RETVAL
startlsnr()
{
echo -n $"Starting Oracle Listener: "
daemon --user oracle $LSNRCTL start
RETVAL=$?
echo
[ $RETVAL = 0 ] && touch /var/lock/subsys/oranet
return $RETVAL
}
stoplsnr()
{
echo -n $"Stopping Oracle Listener: "
daemon --user oracle $LSNRCTL stop
RETVAL=$?
echo
[ $RETVAL = 0 ] && rm -f /var/lock/subsys/oranet
return $RETVAL
}
stopora()
{
echo -n $"Stopping Oracle DB: "
daemon --user oracle $DBSHUT
RETVAL=$?
echo
[ $RETVAL = 0 ] && rm -f /var/lock/subsys/oradb
return $RETVAL
}
# See how we were called.
case "$1" in
start)
startora
startlsnr
;;
stop)
stoplsnr
stopora
;;
restart)
stoplsnr
stopora
startora
startlsnr
;;
*)
echo $"Usage: $prog {start|stop|restart}"
exit 1
esac
exit $RETVAL
##########################################################
plz give me some suggestions .............
|
|
|
08-05-2007, 05:44 PM
|
#2
|
Moderator
Registered: May 2001
Posts: 29,415
|
its not working
What does it say? If nothing, maybe run as "sh -x /path/to/script 2>&1 | tee /tmp/script.log".
|
|
|
08-05-2007, 08:28 PM
|
#3
|
Member
Registered: Apr 2007
Location: Indianapolis, Indiana
Distribution: RHEL, Fedora, AIX, HP-UX, FreeBSD, Slackware
Posts: 62
Rep:
|
chkconfig <script_name> on
|
|
|
08-09-2007, 01:13 PM
|
#4
|
Member
Registered: Oct 2003
Location: Montreal Beach
Distribution: Debian Unstable
Posts: 368
Rep:
|
I have a small oracle RAC cluster running here on RHEL4.5, I didn't build it, but if you need the content of any files, just ask me.
|
|
|
All times are GMT -5. The time now is 12:54 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|