Automatically Start Oracle and WebLogic at startup

Source: Internet
Author: User

My machine is 5l, Oracle9i, weblogic6.1, httpserver
The level of the other party is limited because of the machines installed for others (I am also very good at cooking). In order to worry about it, it is better to let the system automatically run various applications :)
First, start Oracle9i automatically, install 9i in the Oracle file system, and create the file startdb under/oracle,
File Content
Echo "begin to start oracle"
LSNRCTL start
Sqlplus log <EOF
Connect/As sysdba
Startup
Exit
Exit
Echo "oracle have started"
Grant startdb execution permission
Automatically disable Oracle9i and create a file stopdb under/Oracle
Sqlplus log <EOF
Connect/As sysdba
Shutdown immediate
After the Oracle script is started and disabled, it must be added to the system startup and shutdown files, and WebLogic should be started after oracle is started.
Create the file RC. startdb in/etc. The script is as follows:

Su-Oracle "-C/Oracle/startdb" # Start Oracle
CD/WebLogic/wlserver6.1/config/mydomain # Go To The WebLogic startup directory, required
./Startweblogic. Sh # Start WebLogic
Grant File Execution permission
Note that Weblogic is automatically disabled if you exit Telnet after it is started, so WebLogic should be executed in the background, so in startweblogic. the command line for starting WebLogic in the sh file can be run in the background. Use nohup (start command line)>/home/weblogic. log &
Save WebLogic running information to the/home/weblogic. log file.

Put the startup information in the inittab and add a line.
Startdb: 2345678: Wait:/etc/rc. startdb
In this way, oracle9i is automatically started after the system is started.

The system shuts down and closes Oracle9i automatically.
Create the script file RC. stopdb in/etc
Su-Oracle "-C/Oracle/stopdb"
Grant execution permission
Because there is no/etc/rc. Shutdown file after the 5l installation is complete, you need to manually create
The content is as follows:
#! /Bin/KSh
RC. stopdb
Grant execution permission
In this way, when the system shuts down, it will automatically find and execute RC. shutdown. The system can automatically shut down Oracle9i.

Of course, you can write some command lines directly into inittab or RC. shutdown to check your preferences :)

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.