In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-11 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
ORACLE setting Boot self-start
Note: generally speaking, the windows platform oracle server will start automatically, but linux will not, including monitoring, database, console emctl needs to be set up
Available methods: method 1: using OS services: oratab mode 2: using dbstart and dbshut included in oracle
Personally, I think there is no great difference between the two ways. Finally, both of them are realized by using linux services. This paper combines our own production operations and uses oratab as an example to illustrate.
Step 1 modifies the oratab setting path: / etc/oratab, so that the dbstart and dbshut that come with Oracle can work. Vi / etc/oratab format: $ORACLE_SID:$ORACLE_HOME::Examplewind:/u01/app/oracle/product/11.2.0/dbhome_1:Ystep 2 configure oracle service
Linux init description:
When Linux starts, it runs an init program, and then init starts the following tasks, including the multi-user environment (set in inittab) and the network. The runtime level is the functional level at which the current program runs, ranging from 1 to 6, with different functions. These levels are specified in / etc/inittab (other distributions have different locations for this file), which is the main file that the init program is looking for. The service that runs first is placed in the / etc/rc.d directory.
The file begins with S, which stands for start, followed by a number that is the startup order; the file begins with K, which represents kill, and again, the following number represents the ending order. For example: / etc/rc3.d/S55sshd indicates that it is related to runlevel 3, 55 is its startup order; / etc/rc3.d/K15nginx indicates that it is related to runlevel 3, and 15 is its shutdown order.
Init.d this directory contains a number of service startup scripts, system installation of multiple rpm packages, these scripts can be used to start, stop and restart these services when executed. Rcx.d (x is 0x6) this directory is the startup-level executor link directory, and the files in it are soft connections to the files in the init.d directory. Create the file oracle under / etc/init.d/, which contains the following:
#! / bin/sh# chkconfig: 35 80 1 description: Oracle auto start-stop script.## Set ORA_HOME to be equivalent to the $ORACLE_HOME# from which you wish to execute dbstart and dbshut # # Set ORA_OWNER to the user id of the owner of the# Oracle database in ORA_HOME.ORA_HOME=/u01/app/oracle/product/11.2/dbhome_1ORA_OWNER=oracleif [!-f $ORA_HOME/bin/dbstart] thenecho "Oracle startup: cannot start" exitficase "$1" in'start') # Start the Oracle databases:echo "Starting Oracle Databases. "echo"-- "> > / var/log/oracledate +" T% a% D: Starting Oracle Databases as part of system up. "> > / var/log/oracleecho"-- -"> > / var/log/oraclesu-$ORA_OWNER-c" $ORA_HOME/bin/dbstart "> / var/log/oracleecho" Done "# Start the Listener:echo" Starting Oracle Listeners. "echo"-- "> > / var/log/oracledate +" T% a% D: Starting Oracle Listeners as part of system up. "> > / var/log/oracleecho"-- -"> > / var/log/oraclesu-$ORA_OWNER-c" $ORA_HOME/bin/lsnrctl start "> > / var/log/oracleecho" Done. "echo"-- > / var/log/oracledate + "% T% a% D. : Finished. "> > / var/log/oracleecho"-- > / var/log/oracletouch / var/lock/subsys/oracle ; 'stop') # Stop the Oracle Listener:echo "Stoping Oracle Listeners... "echo"-- "> > / var/log/oracledate +" T% a% D: Stoping Oracle Listener as part of system down. "> > / var/log/oracleecho"-- -"> > / var/log/oraclesu-$ORA_OWNER-c" $ORA_HOME/bin/lsnrctl stop "> > / var/log/oracleecho" Done. "rm-f / var/lock/subsys/oracle# Stop the Oracle Database:echo" Stoping Oracle Databases. "echo"-- "> > / var/log/oracledate +" T% a% D: Stoping Oracle Databases as part of system down. "> > / var/log/oracleecho"-- -"> > / var/log/oraclesu-$ORA_OWNER-c" $ORA_HOME/bin/dbshut "> > / var/log/oracleecho" Done. "echo"echo"-- "> > / var/log/oracledate +"% T% a % D: Finished. "> > / var/log/oracleecho"-> > / var/log/oracle ; 'restart') $0 stop$0 start;;esacstep 3 Settings Service oracle Boot chmod 755 / etc/init.d/oraclechkconfig-- level 35 oracle onln-s / etc/init.d/oracle / etc/rc0.d/K01oracle-set os shutdown, shut down oraclestep 4 test mode before restart # service oracle start / / start oracle# service oracle stop / / close oracle# service oracle restart / / restart oracle# reboot
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: 227
*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.