Oracle and Tomcat Boot from

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.