当前位置: 代码迷 >> Web前端 >> start/stop weblogic server in shell
  详细解决方案

start/stop weblogic server in shell

热度:1090   发布时间:2012-06-29 15:48:47.0
start/stop weblogic server in shell.

1. ?Knowledge:?

?

  • nohup: we can use that command to run job in the background. ?remember the last '&'
  • start managed weblogic: connect using HTTP protocal, the user/pwd passed to command line using:?-Dweblogic.management.username=$2 -Dweblogic.management.password=$3
  • stop managed weblogic: connect using t3 protocal, the user and password directly passed to the command line.

?

start_wls.sh: start Weblogic Server in the base_domain

?

#!/bin/sh

export DOMAIN_HOME=/home/oracle/Middleware/user_projects/domains/base_domain
export LOG_HOME=$DOMAIN_HOME/logs

nohup $DOMAIN_HOME/bin/startWebLogic.sh > $LOG_HOME/wls.log &

tail -f $LOG_HOME/wls.log

?

stop_wls.sh:stop Weblogic Server in the base_domain

?

#!/bin/sh

export DOMAIN_HOME=/home/oracle/Middleware/user_projects/domains/base_domain
export LOG_HOME=$DOMAIN_HOME/logs

nohup $DOMAIN_HOME/bin/stopWebLogic.sh > $LOG_HOME/wls.log &

tail -f $LOG_HOME/wls.log

?

?start_mgs.sh:?start Managed Weblogic Server in the Admin Server

?

#!/bin/sh
#echo $1, $2, $3
if [ $# -lt 3 ] 
then 
   echo "please input managed_sever_name, and the user/password for the Admin server!"
   echo "eg."
   echo "./start_msg.sh soa_server1 weblogic password"
   exit
fi

export DOMAIN_HOME=/home/oracle/Middleware/user_projects/domains/base_domain
export LOG_HOME=$DOMAIN_HOME/logs

nohup $DOMAIN_HOME/bin/startManagedWebLogic.sh $1 http://l360cn03:7001 -Dweblogic.management.username=$2 -Dweblogic.management.password=$3 > $LOG_HOME/$1.log &

tail -f $LOG_HOME/$1.log

?

stop_mgs.sh

?

#!/bin/sh
#echo $1, $2, $3
if [ $# -lt 3 ] 
then 
   echo "please input managed_sever_name, and the user/password for the Admin server!"
   echo "eg."
   echo "./stop_msg.sh soa_server1 weblogic password"
   exit
fi

export DOMAIN_HOME=/home/oracle/Middleware/user_projects/domains/base_domain
export LOG_HOME=$DOMAIN_HOME/logs

nohup $DOMAIN_HOME/bin/stopManagedWebLogic.sh $1 t3://l360cn03:7001 $2 $3 > $LOG_HOME/$1.log &

tail -f $LOG_HOME/$1.log

?

  相关解决方案