欢迎登陆真网站,您的到来是我们的荣幸。 登陆 注册 忘记密码? ☆设为首页 △加入收藏
欢迎加入真幸福QQ群
电脑知识: 基础知识 网络技术 操作系统 办公软件 电脑维修 电脑安全 windows7 windows8 windows10 服务器教程 平板电脑 视频播放教程 网络应用 互联网 工具软件 浏览器教程 QQ技巧 输入法教程 影视制作 YY教程 wps教程 word教程 Excel教程 PowerPoint
云南西双版纳特产小花糯玉米真空包装


搞定LINUX之安装ubuntu
linux之进程
阿里云邮箱邮件收发的密送是什么
win7打开摄像头提示“无法列示所过滤器图像”怎么办
在U盘上安装Linux系统解决方案
Windows 8相机模糊的调节方法
刀片服务器没落吸引力原因
Windows 2003 asp网页不能访问的常见问题
linux free命令详解和使用实例
linux命令大全之sst命令详解
linux下开机启动DB2,WAS,TDS服务
【 来源:网络 】【 点击:1 】 【 发布时间:2017_03_03 08:59:59 】

   linux下开机启动DB2,WAS,TDS服务

  参考链接:

  http://www.2cto.com/database/201207/141858.html

  www.2cto.com

  http://www.2cto.com/os/201207/141862.html

  1.转到/etc/init.d 目录下。

  以root身份执行

  Shell代码

  cd /etc/init.d

  2.编写DB2启动脚本

  Shell代码

  vi startDB2

  输入以下内容

  Shell代码

  #!/bin/sh

  # chkconfig: 2345 99 01

  # processname:IBMDB2

  # description:db2 start

  DB2_HOME="/home/db2inst1/sqllib" #安装db2用户的sqllib

  DB2_OWNER="db2inst1" #db2用户名

  www.2cto.com

  case "$1" in

  start )

  echo -n "starting IBM db2"

  su - $DB2_OWNER -c $DB2_HOME/adm/db2start

  touch /var/lock/db2

  echo "ok"

  ;;

  stop )

  echo -n "shutdown IBM db2"

  su - $DB2_OWNER -c $DB2_HOME/adm/db2stop

  rm -f /var/lock/db2

  echo "ok"

  ;;

  restart|reload)

  $0 stop

  $0 start

  ;;

  *)

  echo "usage:$0 start|stop|restart|reload"

  exit 1 www.2cto.com

  esac

  exit 0

  3.编写启动was和tds的脚本。

  Shell代码

  vi startWasTds

  输入以下内容

  Shell代码

  #!/bin/sh

  # chkconfig: 2345 99 01

  # processname:IBMTDSWAS

  # description:filenet was tds

  /opt/IBM/WebSphere/AppServer/profiles/AppSrvTds/bin/startServer.sh server1

  /opt/IBM/WebSphere/AppServer/profiles/AppSrv01/bin/startServer.sh server1

  /opt/IBM/WebSphere/AppServer/profiles/ilog/bin/startServer.sh serve1

  #TDS

  /opt/ibm/ldap/V6.3/sbin/ibmdiradm -l dsrdbm01 -t

  /opt/ibm/ldap/V6.3/sbin/ibmslapd

  参数说明:

  头部注释:

  linux 命令 chkconfig 要求文件头中必须包含:下面这3项

  Shell chkconfig代码 www.2cto.com

  # chkconfig: 2345(默认的runlevel) 99(启动优先级) 01(关闭优先级)

  # processname:进程名称

  # description:进程描述

  4.给文件赋予权限

  Shell代码

  chmod -R 777 startDB2

  chmod -R 777 startWasTds

  chkconfig --add startDB2

  chkconfig --add startWasTds

  添加开机启动成功。

本网站由川南居提供技术支持,fkzxf版权所有 浙ICP备12031891号
淳安分站 淳安分站