In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-22 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.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.