【问题标题】:Unable to install Nagios agent on CentOS7CentOS7 无法安装 Nagios 代理
【发布时间】:2015-10-05 15:45:53
【问题描述】:

当我尝试安装从 (http://assets.nagios.com/downloads/nagiosxi/agents/linux-nrpe-agent.tar.gz) 下载的代理时,我收到了防火墙错误。我能找到的唯一解决方案是启用防火墙,但我不想这样做。

第二,我尝试了这个命令“cat /dev/null > 4-firewall”。但安装程序也返回错误“失败的脚本是:'./A-subcomponents'

有解决办法吗?

    ============================
Nagios Linux Agent Installer
============================

This script will install the Nagios Linux Agent by executing all necessary
sub-scripts.

IMPORTANT: This script should only be used on a clean installed system:

RedHat Enterprise, CentOS, Fedora, or Oracle
OpenSUSE or SUSE Enterprise
Ubuntu or Debian

Do NOT use this on a system running any other distro or that
does not allow additional package installation.

Do you want to continue? [Y/n] y
Proceeding with installation...
Running './0-repos'...
Configuring Repos...
epel-release RPM installed OK
Repos configured OK
RESULT=0
Running './1-prereqs'...
Installing prerequisites...
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: anorien.csc.warwick.ac.uk
* epel: epel.besthosting.ua
* extras: centos.hyve.com
* rpmforge: apt.sw.be
* updates: centos.mirroring.pulsant.co.uk
Package autoconf-2.69-11.el7.noarch already installed and latest version
Package gcc-4.8.3-9.el7.x86_64 already installed and latest version
Package glibc-2.17-78.el7.x86_64 already installed and latest version
Package libmcrypt-devel-2.5.8-13.el7.x86_64 already installed and latest version
Package 1:make-3.82-21.el7.x86_64 already installed and latest version
Package 1penssl-devel-1.0.1e-42.el7.9.x86_64 already installed and latest version
Package sudo-1.8.6p7-13.el7.x86_64 already installed and latest version
Package sysstat-10.1.5-7.el7.x86_64 already installed and latest version
Package 2:xinetd-2.3.15-12.el7.x86_64 already installed and latest version
Package bc-1.06.95-13.el7.x86_64 already installed and latest version
Nothing to do
Prerequisites installed OK
RESULT=0
Running './2-usersgroups'...
Adding users and groups...
useradd: user 'nagios' already exists
groupadd: group 'nagios' already exists
useradd: user 'nagios' already exists
groupadd: group 'nagcmd' already exists
Users and groups added OK
RESULT=0
Running './3-services'...
/etc/services updated
RESULT=0
Running './4-firewall'...
The service command supports only basic LSB actions (start, stop, restart, try-restart, reload, force-reload, status). For other actions, please try to use systemctl.
FirewallD is not running
RESULT=252

===================
INSTALLATION ERROR!
===================
Installation step failed - exiting.
Check for error messages in the install log (install.log).

If you require assistance in resolving the issue, please include install.log
in your communications with Nagios XI technical support.

The script that failed was: './4-firewall' 

【问题讨论】:

    标签: nagios centos7


    【解决方案1】:

    在包含fullinstall 的同一文件夹中,尝试通过执行以下命令创建一个空的installed.firewall 文件:

    touch installed.firewall
    

    然后尝试重新运行

    ./fullinstall
    

    这是基于4-firewall的第12行:

    # Was this step already completed?
    if [ -f installed.firewall ]; then
        echo "Firewall rules already configured - skipping."
        exit 0
    fi
    

    如果该目录中存在名为installed.firewall 的文件,则应跳过防火墙配置步骤。

    【讨论】:

      【解决方案2】:

      您也可以使用以下命令在您的服务器上启用 firewalld。

      要启用firewalld,

      systemctl enable firewalld
      

      启动firewalld

      systemctl start firewalld
      

      检查firewalld的状态

      systemctl status firewalld
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2019-01-24
        • 2021-02-28
        • 2022-07-23
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2021-05-20
        相关资源
        最近更新 更多