Debian

安裝 syslog-ng

  • September 19, 2012

我在 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.

那些 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 初始化標準的初始化腳本

引用自:https://serverfault.com/questions/429794