`

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

 

分享到:
评论

相关推荐

    weblogic安装

    - 确认 WebLogic Server 的安装位置。 - 点击“确认”开始安装过程。 - 安装完成后,按 Enter 键退出安装程序。 #### 四、WebLogic 域的创建 WebLogic 域是运行 Web 应用程序的基本单位,每个 WebLogic 应用...

    shell方式重启weblogic

    例如,通过编写一个综合性的Shell脚本,可以依次调用`startWebLogic.sh`和`stop.sh`,并加入逻辑判断,以实现WebLogic的平滑重启。 总结,"shell方式重启WebLogic"涉及到的是如何利用Linux Shell脚本控制WebLogic ...

    One Key Start Stop Weblogic

    这些脚本会调用Weblogic域(DOMAIN_HOME)中的`startWebLogic.sh`和`startManagedWebLogic.sh`等命令,根据服务器的角色(如Admin Server或Managed Server)来启动相应的服务,并指定IP地址和端口。 - 启动脚本...

    linux设定定时执行任务-oracle,arcGIS-精选.docx

    - 启动WebLogic服务的`autoStart.sh`脚本类似,只是调用`startWebLogic.sh`。 2. **设置脚本执行权限**: - 使用`chmod`命令添加执行权限,例如:`chmod a+x autoStop.sh`和`chmod a+x autoStart.sh`。 3. **...

    今天上传的一个重要文件

    # Start/stop/restart the Apache web server. # To make Apache start automatically at boot, make this # file executable: chmod 755 /etc/rc.d/rc.httpd case "$1" in 'start') /usr/sbin/apachectl start;; ...

    linux bash脚本监控启动停止weblogic服务的脚本写法

    最后,根据传入的命令(如“start”、“stop”、“restart”或“status”),脚本执行相应的操作。例如,当命令是“status”时,它会检查与服务器关联的Java进程是否存在,如果存在,则表明服务器正在运行;如果不...

    resin4.0配置文件介绍

    Resin 提供了一系列配置选项,通过执行 `./configure` 命令来进行设置。这些选项包括但不限于: - **内存管理**:通过调整 JVM 的堆大小来优化内存使用情况。 - **垃圾回收**:配置垃圾回收策略以提高应用性能。 - ...

Global site tag (gtag.js) - Google Analytics