OracleBoot auto Start
The database and the Tomcat program need to be started automatically when the server shuts down the reboot
Oracle Database self-booting
The Oracle database comes with a self-launching script that can be modified to use
Vim $ORACLE _home/bin/dbstart
Find Oracle_home_listner=$1
modified to oracle_home_listner= $ORACLE _home
Save exit
self-booting Oracle listener
Modify The/etc/oratab file with the following command:
Vim/etc/oratab found zhy:/u01/app/oracle/product/11.2.0/db_1:n.
Change "N" to "Y"and save Exit
Add the Lsnrctl start and Dbstart to the rc.local command as follows:
Vim/etc/rc.local
Add the following command
Su Oracle-lc/u01/app/oracle/product/11.2.0/db_1/bin/dbstart
Su oracle-lc "/u01/app/oracle/product/11.2.0/db_1/bin/lsnrctl start"
Restart the server Oracle will start automatically.
TomcatBoot auto Start
Vim/etc/rc.local
Add the following command:
Su tomcat-lc/home/tomcat/apache-tomcat-6.0.26/bin/startup.sh
Save exit
(depending on the installation directory, select the path, in addition, if you have a self-startup script for the Oracle database, you should put Tomcat to execute after starting the database, or there will be problems)
writing a startup script to rc.local may cause Tomcat to start before Oracle and can be started with the following script
#!/bin/bash
#orastart. Sh
#tomcat Start after Oracle 2 min
Su ORACLE-LC Dbstart
Su oracle-lc "/u01/app/oracle/product/11.2.0/db_1/bin/lsnrctl start"
Sleep 120
Su tomcat/home/tomcat/apache-tomcat-6.0.26/bin/startup.sh
This script starts the database, launches Tomcat after the database starts for two minutes , and writes the Orastart Run command to Rc.local
This article is from the "elike" blog, make sure to keep this source http://elike.blog.51cto.com/7292950/1718470
Oracle and Tomcat Boot from