快捷搜索:   服务器  安全  linux 安全  MYSQL  dedecms

Debian学习 Linux系统服务器的搭建方法(6)

 

译注:现在slackware为了提高兼容性,在/etc/rc.d/提供了rc.sysvinit脚本以适应某些基于SysV启动过程的商业程序的需要。另外,在许多设置服务的脚本中,也接受start、stop、restart这一类参数,例如rc.sendmail、rc.sshd等。

 

2.a sample:

 

1).In /etc/initab ,we found it the runlevel is set to 2.so it will use rc2.d directory for SysV init.

 

2).create a file named apache.sh. vi /etc/init.d/apache.sh:

#! /bin/sh

 

echo "Starting Apache Web Server: httpd."

/usr/apache2/bin/apachectl start

 

3).chmod +x apache.sh

 

4).change to /etc/rc2.d/

ln -s ../init.d/apache.sh S96apache

 

5).comments:

顺便解释一下 S96apache 的意思,以 S 开头表明是开机时会执行的文件,96 是执行的优先顺序。

目录中 S 开头的档案为执行该服务, K 为开头的档案则是杀掉该服务的意思。那么那些数字代表的意义为何?那就是激活的顺序啦!例如S12syslog 会比S90crond 更早被执行呢

顶(0)
踩(0)

您可能还会对下面的文章感兴趣:

最新评论