weblogic管理脚本
start.sh
- #!/usr/bin/bash
- #
- # start.sh
- # @auth: zhoulin@lianchuang.com
- #
- SERVER_STATUS () {
- serv_status=`ps -ef | grep weblogic | grep webapp | grep -v grep | grep $1 | wc -l`
- if [ "$serv_status" -eq "1" ]; then
- echo "[status: Running]"
- else
- echo "[status: Stopped]"
- fi
- }
- adminserver="http://10.168.31.108:7001"
- echo "================= NGBOSS WebLogic Server start console =================="
- echo " a: start admin " `SERVER_STATUS AdminServer`
- echo " p: start proxy " `SERVER_STATUS proxy`
- echo " 1: start ngboss " `SERVER_STATUS ngboss`
- echo " 2: start chnlmanm " `SERVER_STATUS copmanm`
- echo " 3: start copmanm " `SERVER_STATUS copmanm`
- echo " 4: start custmanm " `SERVER_STATUS custmanm`
- echo " 5: start resmanm " `SERVER_STATUS resmanm`
- echo " 6: start salemanm " `SERVER_STATUS salemanm`
- echo " 7: start statmanm " `SERVER_STATUS statmanm`
- echo " 8: start sysmanm " `SERVER_STATUS sysmanm`
- echo " 9: start saleserv " `SERVER_STATUS saleserv`
- echo " q: to quit"
- echo "========================================================================="
- echo -n "Please select which server you want to start: "
- read v_server
- cd
- cd ngadmindomain
- case $v_server in
- "a")
- echo "starting admin server..."
- nohup bin/startWebLogic.sh &
- ;;
- "p")
- echo "starting proxy server..."
- nohup bin/startManagedWebLogic.sh proxy $adminserver &
- ;;
- "1")
- echo "starting ngboss server..."
- nohup bin/startManagedWebLogic.sh ngboss $adminserver &
- ;;
- "2")
- echo "starting chnlmanm server..."
- nohup bin/startManagedWebLogic.sh chnlmanm $adminserver &
- ;;
- "3")
- echo "starting copmanm server..."
- nohup bin/startManagedWebLogic.sh copmanm $adminserver &
- ;;
- "4")
- echo "starting custmanm server..."
- nohup bin/startManagedWebLogic.sh custmanm $adminserver &
- ;;
- "5")
- echo "starting resmanm server..."
- nohup bin/startManagedWebLogic.sh resmanm $adminserver &
- ;;
- "6")
- echo "starting salemanm server..."
- nohup bin/startManagedWebLogic.sh salemanm $adminserver &
- ;;
- "7")
- echo "starting statmanm server..."
- nohup bin/startManagedWebLogic.sh statmanm $adminserver &
- ;;
- "8")
- echo "starting sysmanm server..."
- nohup bin/startManagedWebLogic.sh sysmanm $adminserver &
- ;;
- "9")
- echo "starting saleserv server..."
- nohup bin/startManagedWebLogic.sh saleserv $adminserver &
- ;;
- *)
- echo "you have not select any server to start yet!"
- ;;
- esac
- exit 0
stop.sh
- #!/usr/bin/bash
- #
- # stop.sh
- # @auth: zhoulin@lianchuang.com
- #
- SERVER_STATUS () {
- serv_status=`ps -ef | grep weblogic | grep webapp | grep -v grep | grep $1 | wc -l`
- if [ "$serv_status" -eq "1" ]; then
- echo "[status: Running]"
- else
- echo "[status: Stopped]"
- fi
- }
- echo "=============== NGBOSS WebLogic Server stop console =============="
- echo " a: stop admin " `SERVER_STATUS AdminServer`
- echo " p: stop proxy " `SERVER_STATUS proxy`
- echo " 1: stop ngboss " `SERVER_STATUS ngboss`
- echo " 2: stop chnlmanm " `SERVER_STATUS chnlmanm`
- echo " 3: stop copmanm " `SERVER_STATUS copmanm`
- echo " 4: stop custmanm " `SERVER_STATUS custmanm`
- echo " 5: stop resmanm " `SERVER_STATUS resmanm`
- echo " 6: stop salemanm " `SERVER_STATUS salemanm`
- echo " 7: stop statmanm " `SERVER_STATUS statmanm`
- echo " 8: stop sysmanm " `SERVER_STATUS sysmanm`
- echo " 9: stop saleserv " `SERVER_STATUS saleserv`
- echo " 99: stop all server except admin and proxy "
- echo " 100: stop all"
- echo " q: to quit"
- echo "================================================================="
- echo -n "Please select which server you want to stop: "
- read v_server
- case $v_server in
- "a")
- echo "stopping admin server..."
- kill -9 `ps -ef | grep weblogic | grep -v grep | grep "AdminServer" | awk '{print $2}'`
- ;;
- "p")
- echo "stopping proxy server..."
- kill -9 `ps -ef | grep weblogic | grep -v grep | grep "proxy" | awk '{print $2}'`
- ;;
- "1")
- echo "stopping ngboss server..."
- kill -9 `ps -ef | grep weblogic | grep -v grep | grep "ngboss" | awk '{print $2}'`
- ;;
- "2")
- echo "stopping chnlmanm server..."
- kill -9 `ps -ef | grep weblogic | grep -v grep | grep "chnlmanm" | awk '{print $2}'`
- ;;
- "3")
- echo "stopping copmanm server..."
- kill -9 `ps -ef | grep weblogic | grep -v grep | grep "copmanm" | awk '{print $2}'`
- ;;
- "4")
- echo "stopping custmanm server..."
- kill -9 `ps -ef | grep weblogic | grep -v grep | grep "custmanm" | awk '{print $2}'`
- ;;
- "5")
- echo "stopping resmanm server..."
- kill -9 `ps -ef | grep weblogic | grep -v grep | grep "resmanm" | awk '{print $2}'`
- ;;
- "6")
- echo "stopping salemanm server..."
- kill -9 `ps -ef | grep weblogic | grep -v grep | grep "salemanm" | awk '{print $2}'`
- ;;
- "7")
- echo "stopping statmanm server..."
- kill -9 `ps -ef | grep weblogic | grep -v grep | grep "statmanm" | awk '{print $2}'`
- ;;
- "8")
- echo "stopping sysmanm server..."
- kill -9 `ps -ef | grep weblogic | grep -v grep | grep "sysmanm" | awk '{print $2}'`
- ;;
- "9")
- echo "stopping saleserv server..."
- kill -9 `ps -ef | grep weblogic | grep -v grep | grep "saleserv" | awk '{print $2}'`
- ;;
- "99")
- echo "stopping all server except AdminServer..."
- kill -9 `ps -ef | grep weblogic | grep -v grep | grep -v "AdminServer" | grep -v "proxy" | awk '{print $2}'`
- ;;
- "100")
- echo "stopping all servers..."
- kill -9 `ps -ef | grep weblogic | grep -v grep | awk '{print $2}'`
- ;;
- *)
- echo "you have not select any server to stop yet!"
- ;;
- esac
- exit 0
weblogic管理脚本的更多相关文章
- 如何写SysV服务管理脚本
本文目录: 1.1 SysV脚本的特性1.2 SysV脚本要具备的能力1.3 start函数分析1.4 stop函数分析1.5 reload函数分析1.6 status.restart.force-r ...
- weblogic重启脚本
客户要求每周weblogic重启,每台机器上有多个weblogic实例,开始准备单个服务器实例做成sysv风格的脚本,但是实例较多,于是在满足需求和自动化重启的情况下,多个服务器实例的重启放在了一起, ...
- [转贴]systemd 编写服务管理脚本
[转贴]sparkdev大神的博客, 关于 systemd的配置文件的 介绍, 自己之前二进制安装 k8s 时 超过一个 service文件 但是当时不明不白的. 现在再学习一下大神的文章 的确牛B ...
- Ubuntu操作系统编写zabbix的启动管理脚本
Ubuntu操作系统编写zabbix的启动管理脚本 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. 一.修改zabbix的pid存放路径 1>.创建存放zabbix的pid目录 ...
- weblogic使用脚本部署
--本机 (/common/bin/wlst.sh (2)connect('weblogic','weblogic1','t3://localhost:7001') (3)progress=deplo ...
- weblogic管理服务器密码相关
安全控制weblogic,我们可以为weblogic Administrator服务器设置密码 1.administrator服务器或受管服务器启动时,需要认证,方法有三种: (1)command启动 ...
- weblogic管理3 - 生产模式下免密码管理配置
admin server免密码配置 >1. 生产模式中admin root目录下是否存在security/boot.properties文件 [weblogic@11g AdminServer ...
- weblogic管理2 - 创建并启动一个managed server
创建一个managed server. 1. 进入网页console管理页面,如:http://10.100.25.14:7001/console , 先点击->服务器 (红色标记框) ...
- weblogic管理1——创建 和 删除一个domain
说明本文环境 WLS_HOME=/home/weblogic/Oracle/Middleware创建一个domian 第一种方法通过console 创建>[weblogic@11g Mid ...
随机推荐
- python学习-字符串 列表 元祖
目录 Python翻转字符串(reverse string) 简单的步长为-1, 即字符串的翻转(常用) 递归反转 借用列表,使用reverse()方法 字符串常用操作 index split 切片 ...
- Codeforces Round #447
QAQ #include<stdio.h> #include<string.h> #include<stdlib.h> #include<vector> ...
- JavaScript操作HTML&CSS简单入门
- Java攻城狮学习路线 - 一. JavaScript基础 输出 使用 window.alert() 弹出警告框. 使用 document.write() 方法将内容写到 HTML 文档中. 使用 ...
- jquery mobile datepicker
1.http://jquerymobile.com/demos/1.0a4.1/experiments/ui-datepicker/ 这个只能用在iOS和PC上,使用<input date,An ...
- Mysql优化-为表字段添加索引
1.添加PRIMARY KEY(主键索引): ALTER TABLE `table_name` ADD PRIMARY KEY ( `column` ) 2.添加UNIQUE(唯一索引) : ALTE ...
- RabbitMQ学习之基于spring-rabbitmq的消息异步发送
spring-rabbitmq的源码到http://github.com/momania/spring-rabbitmq下载,并可以下载实例代码.由于我使用的rabbitmq版本是3.0.4,部分代码 ...
- WPF创建自定义控件并运用
此项目源码:https://github.com/lizhiqiang0204/WpfCustomControlLibrary1 首先创建自定义控件库项目 项目名称命名为:WpfCustomContr ...
- Map使用操作系统内存的情况
public static void main(String[] args) { System.out.println("程序启动-->可用内存:"+(getSystemMe ...
- Nginx全局变量
一.全局变量 $args #请求中的参数值 $query_string #同 $args $arg_NAME #GET请求中NAME的值 $is_args #如果请求中有参数,值为"?&qu ...
- linux--ubuntu的下载以及VMware Tool的安装
1. Ubuntu的下载:http://cn.ubuntu.com/download/ 2. VMware Tool的安装: 第一步:在主机上,从 Workstation Pro 菜单栏中选择虚拟机 ...