In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Set Oracle11g to boot automatically:
The setting in Redhat and Centos allows the ORACLE system to start automatically and is not allowed by default.
1. Modify the / etc/oratab file under the root account:
# vi / etc/oratab
The last N of orcl=/db/app/oracle/product/11.1.0/db_1: n is changed to Y
two。 Modify the startup and shutdown scripts included with ORACLE under the oracle account, which are dbstart and dbshut, respectively.
These two scripts can realize the startup and shutdown of ORACLE scripts.
Modify the $ORACLE_HOME/bin/dbstart file under the account:
$cd $ORACLE_HOME/bin
$vi dbstart
The line to find ORACLE_HOME_LISTNER=$1 is changed to: ORACLE_HOME_LISTNER=$ORACLE_HOME
$cd $ORACLE_HOME/bin
$vi dbshut
The line to find ORACLE_HOME_LISTNER=$1 is changed to: ORACLE_HOME_LISTNER=$ORACLE_HOME
# cd / etc/rc.d/init.d/
Vim oracle.sh
#
#! / bin/bash
# chkconfig: 2345 80 25
# / etc/init.d/oracle11g
# description: ORACLE 11g Server
# Run-level Startup script. For the Oracle Listener and Instances
# It relies on the information on / etc/oratab
Export ORACLE_BASE=/u01
Export ORACLE_HOME=/u01/app/oracle/product/11.1
Export ORACLE_SID=ora11g
Export ORACLE_OWNR=oracle
Export PATH=$PATH:$ORACLE_HOME/bin
If [!-f $ORACLE_HOME/bin/dbstart-o!-d $ORACLE_HOME]
Then
Echo "Oracle startup: cannot start"
Exit 1
Fi
Case "$1" in
Start)
# Oracle listener and instance startup
Echo-n "Starting Oracle:"
Su $ORACLE_OWNR-c "$ORACLE_HOME/bin/lsnrctl start"
Su $ORACLE_OWNR-c "$ORACLE_HOME/bin/dbstart $ORACLE_HOME"
Touch / var/lock/oracle
Echo "OK"
Stop)
# Oracle listener and instance shutdown
Echo-n "Shutdown Oracle:"
Su $ORACLE_OWNR-c "$ORACLE_HOME/bin/lsnrctl stop"
Su $ORACLE_OWNR-c "$ORACLE_HOME/bin/dbshut $ORACLE_HOME"
Rm-f / var/lock/oracle
Echo "OK"
Reload | restart)
$0 stop
$0 start
*)
Echo "Usage: `basename $0` start | stop | restart | reload"
Exit 1
Esac
Exit 0
Chkconfig-- add oracle # add Services
Chkconfig oracle on # start automatic motion
Chkconfig-- list oracle # to see if it is successful
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.