Linux 开机启动websphere 服务
来源:互联网 发布:按键精灵节奏大师源码 编辑:程序博客网 时间:2024/05/22 15:17
1. 环境
OS: SUSE
Application Server: Websphere 7
2. 准备shell 脚本
启动websphere 服务脚本,命名为websphere
- #!/bin/bash
- #
- #
- #chkconfig: 2345 98 02
- #description: start/stop the websphere
- #
- #/etc/init.d
- #
- startscript=/opt/IBM/WebSphere7/AppServer/bin/startServer.sh
- shutscript=/opt/IBM/WebSphere7/AppServer/bin/stopServer.sh
- #
- PATH=/opt/IBM/WebSphere7/AppServer/java/bin:$PATH
- #
- #FUNCTIONS
- start()
- {
- echo -n $"starting websphere"
- $startscript server1 -profileName AppSrv01
- echo "OK"
- }
- stop()
- {
- echo -n $"stopping websphere"
- $shutscript server1 -profileName AppSrv01 -username admin -password password
- echo "OK"
- }
- case "$1" in
- start)
- start
- ;;
- stop)
- stop
- ;;
- restart)
- $0 stop
- $0 start
- ;;
- *)
- echo $"usage: $0 {start|stop|restart}"
- exit 1
- esac
- exit 0
3. 拷贝上面脚本到 /etc/init.d 目录,不同linux系统有可能不一样,具体考考个系统的自动加载目录
4. 如果在编写文件的时候不是root用户,那需要赋予shell脚本的执行权力
chmod 755 websphere
5. 加载系统启动项
a. chkconfig --add websphere
添加成功后,可以利用chkconfig --list 来测试是否添加成功
b. 添加启动级别
chkconfig -level 2,3,4,5 websphere on 具体参考不同linux系统格式
6. 测试是否可以启动服务
service websphere start
service websphere stop
7. root用户下,直接reboot启动系统,看是否websphere应用已启动。
0 0
- Linux 开机启动websphere 服务
- Linux 开机启动websphere 服务
- linux开机启动服务
- Linux开机服务启动
- Linux 开机启动服务
- Linux 开机 启动 服务
- linux服务开机启动
- linux服务器开机启动服务
- Linux 系统服务开机启动
- linux开机启动服务详解
- linux(fedora)开机启动服务
- linux 设置开机启动服务
- linux开机启动服务详解
- linux开机启动smb服务
- linux开机启动smb服务
- Linux开机启动服务设置
- 配置Linux 开机启动服务
- linux添加开机启动服务
- 轻松搞定面试中的链表题目
- HDU 2045--不容易系列之(3)—— LELE的RPG难题【递推】
- 1008. Elevator (20)
- 矩阵相乘的优化
- GSM压缩/ 解压实现
- Linux 开机启动websphere 服务
- 林达华推荐的几本数学书
- 黑马程序员——OC基础—-----一个简单OC程序的分析
- 如何在多台机器上共享IOS证书
- ERROR:C++ 字符指针引起的段错误
- 2015.03.04学习笔记
- HDU 2048--神、上帝以及老天爷【错排】
- spring cas 配置小知识
- GStreamer 1.0 运行时环境变量设置