1>
After the Oracle STARTUP script dbstart is installed by default, an error listener is reported, which is the same as the installation result in linux. The modification is as follows:
Su-oracle
Vi 'which dbstart'
Locate ORACLE_HOME_LISTNER and change it to the following format:
ORACLE_HOME_LISTNER = $ ORACLE_HOME
Add:
$ ORACLE_HOME_LISTNER/bin/lsnrctl start LISTENER2> $ LOG 2> & 1 &
$ ORACLE_HOME_LISTNER/bin/lsnrctl start LISTENER_NDSC> $ LOG 2> & 1 &
Modify LOGMSG = "logger-puser. alert-s" to LOGMSG = "logger-puser. alert"
Syslog recording
2>
Oracle:/> ls-l/etc/oratab
-Rw-r -- 1 oracle system 758 Nov 20/etc/oratab
Modify/etc/oratab and change "N" to "Y" to enable startup. As follows:
Patybs:/app/oracle/product/10.2.0/db_1: Y
Ndsclone:/app/oracle/product/10.2.0/db_1: Y
3>
Create a STARTUP script and grant related permissions (log in as root)
# Id
Uid = 0 (root) gid = 0 (system) groups = 2 (bin), 3 (sys), 7 (security), 8 (cron), 10 (audit ), 11 (lp)
Touch/etc/rc. oracle
Chmod 700/etc/rc. oracle
Vi/etc/rc. oracle
Join:
#! /Usr/bin/ksh
Echo "-----------------------------------------------">/var/log/dbora
Date + "% T % a % D: Start Oracle Instance...">/var/log/dbora
Su-oracle-c dbstart>/var/log/dbora
Date + "% T % a % D: Oracle Start Finished.">/var/log/dbora
Date + "% T % a % D: Start Tomcat...">/var/log/dbora
Su-tomcat-c startup. sh>/var/log/dbora
Date + "% T % a % D: Tomcat Start Finished.">/var/log/dbora
Echo "-----------------------------------------------">/var/log/dbora
Exit 0
4>
Add it to the bottom of the/etc/inittab To Enable Automatic startup. Create a startup log.
# Pwd
/Etc
# Ls-l inittab
-Rw-r -- 1 root system 3015 Feb 19 inittab
Vi/etc/inittab
Oracle: 2: wait:/etc/rc. oracle>/var/log/oracle. log 2> & 1
: Oracle: 2: respawn:/etc/rc. oracle>/var/log/oracle. log 2> & 1 (do not use this)
Format:
Identifier: RunLevel: Action: Command
# Mkitab "oracle: 2: wait:/etc/rc. oracle>/var/log/oracle. log 2> & 1"
# Lsitab oracle
Oracle: 2: wait:/etc/rc. oracle>/var/log/oracle. log 2> & 1
5>
Create a close script/etc/rc. shutdown
Vi/etc/rc. shutdown
#! /Usr/bin/ksh
Echo "-----------------------------------------------">/var/log/dbora
Date + "% T % a % D: Stop Tomcat...">/var/log/dbora
Su-tomcat-c shutdown. sh>/var/log/dbora
Date + "% T % a % D: Tomcat Stop Finished.">/var/log/dbora
Date + "% T % a % D: Stop Oracle Lsnr...">/var/log/dbora
Su-oracle-c "lsnrctl stop listener2">/var/log/dbora
Su-oracle-c "lsnrctl stop listener_ndsc">/var/log/dbora
Date + "% T % a % D: Oracle Lsnr Stop Finished.">/var/log/dbora
Date + "% T % a % D: Stop Oracle Instance...">/var/log/dbora
Su-oracle-c dbshut>/var/log/dbora
Date + "% T % a % D: Oracle Instance Stop Finished.">/var/log/dbora
Echo "-----------------------------------------------">/var/log/dbora
Sync
Exit 0
Grant/etc/rc. shutdown the execution permission
The system administrator can place a locally customized shutdown Process in the/etc/rc. shutdown shell script. If the script exists, it runs at the beginning of the shutdown. If the script runs but fails (a non-zero return code is returned), shutdown is stopped.
Oracle dbstart starts all databases and the default listener
Dbshut of oracle closes all databases, but does not close listener
# Pwd
/Etc
# Ls-l rc. oracle rc. shutdown
-Rwx ------ 1 root system 500 Feb 26 rc. oracle
-Rwx ------ 1 root system 750 Feb 26 rc. shutdown