安装 syslog-ng

安装 syslog-ng

我在 Debian Squeeze 上有一个带有 nagios、cacti 和 nedi 的监控服务器。当我尝试通过 apt-get 安装 syslog-ng 时,出现下面的错误。我认为 rc 中的符号链接有问题。但我不知道如何解决这个问题。

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Suggested packages:
  libdbd-mysql libdbd-pgsql libdbd-sqlite3
The following NEW packages will be installed:
  syslog-ng
0 upgraded, 1 newly installed, 0 to remove and 109 not upgraded.
Need to get 0 B/350 kB of archives.
After this operation, 705 kB of additional disk space will be used.
Selecting previously deselected package syslog-ng.
(Reading database ... 39405 files and directories currently installed.)
Unpacking syslog-ng (from .../syslog-ng_3.1.3-3_amd64.deb) ...
Processing triggers for man-db ...
Setting up syslog-ng (3.1.3-3) ...
insserv: warning: script 'K02networker' missing LSB tags and overrides
insserv: warning: script 'S99nagios' missing LSB tags and overrides
insserv: warning: script 'nagios' missing LSB tags and overrides
insserv: warning: script 'networker' missing LSB tags and overrides
insserv: Starting nagios depends on stop-bootlogd-single and therefore on system facility `$all' which can not be true!
.
.
.
insserv: Max recursions depth 99 reached
insserv: Starting nagios depends on stop-bootlogd-single and therefore on system facility `$all' which can not be true!
.
.
.
Stopping system logging: syslog-ng seems to be stopped already
Starting system logging: syslog-ng.

答案1

这些警告表明 LSB 标签缺失,这意味着服务脚本 /etc/init.d/service_name 中缺少如下内容:

### BEGIN INIT INFO
# Provides:          scriptname
# Required-Start:    $remote_fs $syslog
# Required-Stop:     $remote_fs $syslog
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Start daemon at boot time
# Description:       Enable service provided by daemon.
### END INIT INFO

简单的解决方法是删除 insserv(在 Debian 6.0 中取代了 update-rc.d):

apt-get remove insserv

或者可能更好的解决方案是在所有需要的脚本中添加那些缺失的标签。

以下是 Debian wiki 上关于 LSB 标签的详细描述: LSBInitScripts
此页很好地描述了什么是 LSB: 基于 LSB Init 标准的初始化脚本

相关内容