![我应该为 Nagios 安装哪个 mailx 包?](https://linux22.com/image/957435/%E6%88%91%E5%BA%94%E8%AF%A5%E4%B8%BA%20Nagios%20%E5%AE%89%E8%A3%85%E5%93%AA%E4%B8%AA%20mailx%20%E5%8C%85%EF%BC%9F.png)
我正在关注Nagios Ubuntu 快速入门说明。我在 Ubuntu 10.10 上安装 Nagios 3.2.3。
在文档的底部,它说我需要安装 mailx 和 postfix 包。 (Postfix 已经安装。) 但是当我尝试安装 mailx 时,系统会询问我要安装哪个包:
$ sudo apt-get install mailx
[sudo] password for nagios:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package mailx is a virtual package provided by:
mailutils 1:2.1+dfsg1-4ubuntu1
heirloom-mailx 12.4-1.1
bsd-mailx 8.1.2-0.20090911cvs-2ubuntu1
You should explicitly select one to install.
E: Package mailx has no installation candidate
我应该安装哪一个?
答案1
您应该能够安装其中任何一个。我bsd-mailx
的系统上已经安装了,我看不出有什么理由不使用它。
看起来这就是预期的迁移路径。
以下是部分apt-cache show mailx
输出:
Depends: bsd-mailx
Description: Transitional package for mailx rename
This dummy package is provided to smooth the upgrade from mailx to
bsd-mailx and can be safely removed afterwards.
不过,还有两件事。您使用的指令集目前已经很旧了(正如您所见,一些软件包名称会随着时间的推移而改变)。而且它还涉及从源代码安装。
我假设您确实想要从源代码安装,大概是为了获得更多控制权或安装特定版本。
但如果您不知道这一点(或者其他人不知道),nagios 的存储库中已经有许多预构建的软件包。
以下是一些经过稍微编辑的输出apt-cache search nagios
:
nagios3-core - A host/service/network monitoring and management system core files
nagios3 - A host/service/network monitoring and management system
nagios3-cgi - cgi files for nagios3
nagios3-common - support files for nagios3
nagios3-dbg - debugging symbols and debug stuff for nagios3
nagios3-doc - documentation for nagios3
nagios-images - Collection of images and icons for the nagios system
nagios-nrpe-server - Nagios Remote Plugin Executor Server
nagios-plugins - Plugins for the nagios network monitoring and management system
nagios-plugins-basic - Plugins for the nagios network monitoring and management system
nagios-plugins-standard - Plugins for the nagios network monitoring and management system
[...]
djagios - A package to help configure nagios written in Django
libnagios-object-perl - module to parse and represent Nagios configuration as objects
libnagios-plugin-perl - family of perl modules to streamline writing Nagios
mailping - monitor email service availability and functioning
nagcon - console application interfacing to Nagios
nagios-nrpe-plugin - Nagios Remote Plugin Executor Plugin
nagios-plugins-extra - Plugins for the nagios network monitoring and manegement system.
nagios-snmp-plugins - SNMP Plugins for nagios
nagios-statd-client - Nagios client for monitoring remote system information
nagios-statd-server - Nagios server for monitoring remote system information
nagiosgrapher - Charting add-on for Nagios
nagstamon - Nagios status monitor which takes place in systray or on desktop
nagvis - Visualization addon for Nagios
ndoutils-nagios3-mysql - This provides the NDOUtils for Nagios with MySQL support
nsca - Nagios service monitor agent
pomamonitor - A simple host downtime alert for GNOME/KDE desktop
答案2
您可能已经安装了合适的程序。尝试以下命令:mailx -s Test postmaster
和mail -s Test postmaster
。通过连续输入到 s 退出命令ctrl-c
。如果找到任何一个,并且按上述方式调用时没有失败,则应该没问题。如果其中一个失败,则需要验证所使用的命令是否是 Nagios 使用的命令。如有必要,您可以在配置中更改命令。