Automatically boot Oracle and WebLogic

Source: Internet
Author: User
Oracle|web my machine is 5l,oracle9i,weblogic6.1,httpserver.
Because of the machine to others, the other side of the limited level (in fact, I am also very food:), in order to worry, or let the system to automatically run the application is better:
First automatically start oracle9i,9i installed under the Oracle file system, under/oracle to create a file Startdb,
File contents
echo "Begin to start Oracle"
Lsnrctl start
Sqlplus/nolog <<eof
Connect/as SYSDBA
Startup
Exit
Exit
echo "Oracle have started"
Execute permissions for Startdb
Automatically close oracle9i and create files under/oracle stopdb
Sqlplus/nolog <<eof
Connect/as SYSDBA
Shutdown immediate
Okay, all right. Start and close the Oracle scripts are also added to the system startup and shutdown files, plus start WebLogic after Oracle is started
Set up the file Rc.startdb under/etc, the script is as follows

Su-oracle "-c/oracle/startdb" # Start Oracle
Cd/weblogic/wlserver6.1/config/mydomain # Go to the WebLogic boot directory, you must
./startweblogic.sh # Start WebLogic
To execute permissions on a file
Note that since WebLogic is automatically turned off when the user exits Telnet after startup, WebLogic is placed in the background, so the command line to start WebLogic in startweblogic.sh file can be run in the background, with Nohup (Start command line) >/home/weblogic.log &
Save the WebLogic running information to the/home/weblogic.log file

The following is to put the launch information into the Inittab, add a line
Startdb:2345678:wait:/etc/rc.startdb
This will start oracle9i automatically after the system starts


System shutdown Auto Shutdown oracle9i
Create a script file under/etc rc.stopdb
Su-oracle "-c/oracle/stopdb"
To execute permissions
Since there are no/etc/rc.shutdown files after the installation is completed in 5L, you need to manually create a
The contents are as follows
#!/bin/ksh
Rc.stopdb
To execute permissions
This will automatically look for Rc.shutdown and execute when the system shuts down, and the system can automatically turn off oracle9i

Of course, some of the command lines can be written directly to Inittab or Rc.shutdown, to see their 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.