weblogic开机启动脚本
1、在/home/bea/startBeaAll目录内创建一个startBeaAll.sh文件,加入如下内容(把相应目录与命令修改即可,红字部分为修改地方):
#!/bin/sh
echo "======weblogic start begin========"
echo "======managerServer start begin========"
managerid=`ps auxww|grep managerServer|grep -v grep|awk '{print $2}'`
if [ -n "$managerid" ];
then
echo "======managerServer is start ,to kill the managerServer managerid $managerid========"
kill -9 $managerid
sleep 10
echo "====== the weblogic managerServer start========"
cd /home/bea/user_projects/domains/managerdomain/bin
nohup ./startWebLogic.sh > /home/bea/logs/manager.log &
#/home/bea/logs/manager.log &为日志存放位置,下同
else
echo "======managerServer is not start, the weblogic managerServer start========"
cd /home/bea/user_projects/domains/managerdomain/bin
nohup ./startWebLogic.sh > /home/bea/logs/manager.log &
fi
sleep 30
echo "======managerServer start end========"
echo "======appServer1 start begin========"
apponeid=`ps auxww|grep appServer1|grep -v grep|awk '{print $2}'`
if [ -n "$apponeid" ]; then
echo "======appServer1 is start ,to kill the appServer1 apponeid $apponeid========"
kill -9 $apponeid
sleep 5
echo "====== the weblogic appServer1 start========"
cd /home/bea/user_projects/domains/managerdomain/bin
nohup ./startManagedWebLogic.sh appServer1 http://192.168.100.102:7001 > /home/bea/logs/app1.log &
else
echo "======appServer1 is not start, the weblogic appServer1 start========"
cd /home/bea/user_projects/domains/managerdomain/bin
nohup ./startManagedWebLogic.sh appServer1 http://192.168.100.102:7001 > /home/bea/logs/app1.log &
fi
sleep 120
echo "======appServer1 start end========"
echo "======appServer2 start begin========"
apptwoid=`ps auxww|grep appServer2|grep -v grep|awk '{print $2}'`
if [ -n "$apptwoid" ]; then
echo "======appServer2 is start ,to kill the appServer2 apptwoid $apptwoid========"
kill -9 $apptwoid
sleep 5
echo "====== the weblogic appServer2 start========"
cd /home/bea/user_projects/domains/managerdomain/bin
nohup ./startManagedWebLogic.sh appServer2 http://192.168.100.102:7001 > /home/bea/logs/app2.log &
else
echo "======appServer2 is not start, the weblogic appServer2 start========"
cd /home/bea/user_projects/domains/managerdomain/bin
nohup ./startManagedWebLogic.sh appServer2 http://192.168.100.102:7001 > /home/bea/logs/app2.log &
fi
sleep 120
echo "======appServer2 start end========"
echo "======appServer3 start begin========"
appthrd=`ps auxww|grep appServer3|grep -v grep|awk '{print $2}'`
if [ -n "$appthrid" ]; then
echo "======appServer3 is start ,to kill the appServer3 appthrid $appthrid========"
kill -9 $appthrid
sleep 5
echo "====== the weblogic appServer3 start========"
cd /home/bea/user_projects/domains/managerdomain/bin
nohup ./startManagedWebLogic.sh appServer3 http://192.168.100.102:7001 > /home/bea/logs/app3.log &
else
echo "======appServer3 is not start, the weblogic appServer3 start========"
cd /home/bea/user_projects/domains/managerdomain/bin
nohup ./startManagedWebLogic.sh appServer3 http://192.168.100.102:7001 > /home/bea/logs/app3.log &
fi
sleep 120
echo "======appServer3 start end========"
echo "======appServer4 start begin========"
appforid=`ps auxww|grep appServer4|grep -v grep|awk '{print $2}'`
if [ -n "$appforid" ]; then
echo "======appServer4 is start ,to kill the appServer4 appforid $appforid========"
kill -9 $appforid
sleep 5
echo "====== the weblogic appServer4 start========"
cd /home/bea/user_projects/domains/managerdomain/bin
nohup ./startManagedWebLogic.sh appServer4 http://192.168.100.102:7001 > /home/bea/logs/app4.log &
else
echo "======appServer4 is not start, the weblogic appServer4 start========"
cd /home/bea/user_projects/domains/managerdomain/bin
nohup ./startManagedWebLogic.sh appServer4 http://192.168.100.102:7001 > /home/bea/logs/app4.log &
fi
sleep 120
echo "======appServer4 start end========"
sleep 5
echo "======weblogic start end========"
2、修改/etc/rc.local配置文件
在/etc/rc.local中加入如下内容: #vi /etc/rc.local
su - root -c "/home/bea/startBeaAll/startBeaAll.sh start "
weblogic开机启动脚本的更多相关文章
- 关于Ubuntu运行级别、开机启动脚本的说明
关于Ubuntu运行级别.开机启动脚本的说明 目录简介 1.1介绍Ubuntu下面的自启动脚本目录 1.2 Linux操作系统运行级别的概念 1.3关于操作系统自启脚本的启动顺序 1.4 Lin ...
- linux 的开机启动脚本顺序
linux 开机启动脚本顺序 linux 开机启动脚本顺序. 第一步:启动内核 第二步:执行init (配置文件/etc/inittab) 第三步:启动相应的脚本,并且打开终端/etc/init.d ...
- Centos 配置开机启动脚本启动 docker 容器
Centos 配置开机启动脚本启动 docker 容器 Intro 我们的 Centos 服务器上部署了好多个 docker 容器,因故重启的时候就会导致还得手动去手动重启这些 docker 容器,为 ...
- ubuntu-18.04 设置开机启动脚本-亲测有效
ubuntu-18.04不能像ubuntu14一样通过编辑rc.local来设置开机启动脚本,通过下列简单设置后,可以使rc.local重新发挥作用. 2.将下列内容复制进rc-local.servi ...
- ubuntu-18.04 设置开机启动脚本
ubuntu-18.04 设置开机启动脚本 参阅下列链接 https://askubuntu.com/questions/886620/how-can-i-execute-command-on-sta ...
- Ubuntu 18.04 设置开机启动脚本 rc.local systemd
ubuntu18.04不再使用initd管理系统,改用systemd. ubuntu-18.04不能像ubuntu14一样通过编辑rc.local来设置开机启动脚本,通过下列简单设置后,可以使rc.l ...
- Ubuntu 16.04设置开机启动脚本的方法
需求:公司卡片机容量太小,只有100G,由于使用的人比较的多,开机使用后有时候就会出现磁盘空间占满数据写不进去的情况,影响工作进度,而且每次使用完都得关掉卡片机,所以就有必要写个清理磁盘的脚本,当卡片 ...
- ubuntu高版本如何设置开机启动脚本
ubuntu-18.04不能像ubuntu14一样通过编辑rc.local来设置开机启动脚本 可以通过下列简单设置后,可以使rc.local重新发挥作用. 1.建立rc-local.service文件 ...
- 为 Android 8.0 添加开机启动脚本【转】
本文转载自:https://zhuanlan.zhihu.com/p/32868074 本人对于 SELinux for Android 理解不深,下文中的各文件及安全规则虽都是我所编写,但也是一边查 ...
随机推荐
- C# 将对象序列化为Json格式
public static string JsonSerializer<T>(T t) { DataContractJsonSerializer ser = new DataContrac ...
- Linux命令:TOP
top命令 是Linux下常用的性能 分析工具 ,能够实时显示系统 中各个进程的资源占用状况,类似于Windows的任务管理 器.下面详细介绍它的使用方法. top - 02:53:32 up 16 ...
- iOS_SN_Socket - AsyncSocket
转载文章,原地址:http://yimouleng.com/2015/02/04/Socket-AsyncSocket/ 一.前言 公司的项目用到了Socket编程,之前在学习的过程当中,用到的更多的 ...
- 对话框(alert,prompt,confirm,showModalDialog)
alert大部分浏览器中会产生阻塞,confirm,prompt都会产生阻塞 关于showModalDialog的介绍:(转自JS中showModalDialog 详细使用) 基本介绍: ...
- Introduction to the POM
原文:https://maven.apache.org/guides/introduction/introduction-to-the-pom.html Introduction to the POM ...
- AttributeError at /home/home/ Exception Type: AttributeError at /home/home/
"错误提示信息": Environment: Request Method: GET Request URL: http://localhost:8000/home/home/ D ...
- Java笔记--Java的List、Iterator用法
1. List的使用 准备知识: List继承自Collection接口.List是一种有序集合,List中的元素可以根据索引(顺序号:元素在集合中处于的位置信息)进行取得/删除/插入操作. 跟Set ...
- Java中的日期处理类
在Java中可以使用Date类和Calendar类来处理日期 但是Date类很多方法都过时了,推荐使用Canlendar类来处理日期,并对日期的格式化做了介绍.下面的部分将会逐一介绍 Date类 Ja ...
- Database JDBC Developer's Guide
http://docs.oracle.com/database/121/JJDBC/datacc.htm#JJDBC28363
- MySQL加锁分析
参考:MySQL 加锁处理分析.该文已经讲的很详尽了,也易懂,下面仅仅是个人做的总结. 一. 背景 1.1 隔离级别 1.2 加锁过程 逐条处理,逐条加锁. 1.3 两阶段锁2PL 1.4 gap锁 ...