Start Weblogic in Linux

Source: Internet
Author: User

The content of the Weblogic File Created under/etc/init. d is as follows:

#! /Bin/bash

Weblogic_user = root

Weblogic_base =/home/jc6/Oracle/middleware/user_projects/domains/base_domain/bin

# Weblogic_user = Administrator

# Weblogic_base =/home/Administrator/domains/base_domain/bin

 

Export weblogic_user weblogic_base

Start (){

 

Echo-N $ "Starting webserver ..."

Su $ weblogic_user-c "nohup $ weblogic_base/startweblogic. Sh &"

Retval =$?

Echo done

[$ Retval-EQ 0]

# Touch/var/lock/subsys/WebLogic;

Return $ retval

}

Stop (){

Echo-N $ "Stopping webserver ..."

Su $ weblogic_user "$ weblogic_base/stopweblogic. Sh"

Retval =$?

Echo

[$ Retval-EQ 0]

# Rm-F/var/lock/subsys/WebLogic;

Return $ retval

}

 

Restart (){

Stop

Start

}

 

Reload (){

Echo-N $ "reloading Cron Daemon Configuration :"

Killproc crond-Hup

Retval =$?

Echo

Return $ retval

}

 

Case "$1" in

Start)

Start

;;

Stop)

Stop

;;

Restart)

Restart

;;

Reload)

Reload

;;

Status)

# Rhstatus

;;

Condrestart)

[Restart |:

;;

*)

Echo $ "Usage: $0 {START | stop | status | reload | restart | condrestart }"

Exit 1

Esac

 

Chmod 755 WebLogic changes file attributes

 

Note: In Windows, the file cannot run normally due to DOS format characters when editing the file. We recommend that you use gedit or VI to edit the file. No error control is added to the shutdownweblogic function, you can complete it yourself.
2. Establish a service connection:
To stop WebLogic at restart, we need the following link:
[Root @ js-Oracle init. d] # ln-S ../init. d/WebLogic/etc/rc. d/rc0.d/k01weblogic
[Root @ js-Oracle init. d] # ln-S ../init. d/WebLogic/etc/rc. d/rc6.d/k01weblogic

When the system starts WebLogic, we need the following link:
[Root @ js-Oracle init. d] # ln-S ../init. d/WebLogic/etc/rc. d/rc2.d/s99weblogic
[Root @ js-Oracle init. d] # ln-S ../init. d/WebLogic/etc/rc. d/rc3.d/s99weblogic
[Root @ js-Oracle init. d] # ln-S ../init. d/WebLogic/etc/rc. d/rc5.d/s99weblogic

Iii. Explanation:
When Linux is started:
Graphical interface: automatically calls/etc/rc. the symbolic connection name under D/rc5.d starts with S (meaning: Start/start) refers to the Service in the script file, and the command line parameter start is automatically passed.
When Linux is disabled:
Graphical interface: automatically calls/etc/rc. the symbolic connection name in D/rc5.d starts with K (meaning: Kill/Close) and automatically transmits the command line parameter stop.

Other running levels are similar (For details, refer to the/etc/rc. d/RC Script)

 

Create the content of the boot. properties File

Username = XXXXX

Password = XXXXX

 

This file is stored in/base_domain/Security and/base_domain/servers/adminserver of Weblogic respectively.

Success! restart OK

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.