Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1413657
  • 博文数量: 269
  • 博客积分: 3602
  • 博客等级: 中校
  • 技术积分: 4536
  • 用 户 组: 普通用户
  • 注册时间: 2012-04-17 21:13
文章分类

全部博文(269)

文章存档

2014年(8)

2013年(139)

2012年(122)

分类: 系统运维

2013-04-18 09:59:30

1、查看linux启动级别

$ vi  /ect/inittab

看到文本中如如下字样,则表示启动级别为5

  id:5:initdefault:

 

在/etc/init.d 下建脚本 swimstart

内容如下:

#!/bin/sh
### BEGIN INIT INFO
# Provides:          swimstart
# Required-Start:    $remote_fs $network
# Required-Stop:     $remote_fs $network
# Default-Start:     3 5
# Default-Stop:      0 1 6
# Short-Description: The swimstart Java Application Server
### END INIT INFO
cd /home/db2inst1/counter/bin
su - db2inst1 -c /home/db2inst1/counter/bin/swimstart  。

保存后执行以下命令

chmod +x /etc/init.d/swimstart

chkconfig swimstart on 或 chkconfig -a swimstart  或 chkconfig --add swimstart

阅读(1239) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~