RHEL安装nagios

运维 系统运维
如果你在用RHEL系统,那我推荐你一款监控系统——nagios,nagios功能非常强大!那如何安装呢,答案就在文章中!

RHEL安装nagios具体步骤如下:

  nagios是Linux下强大的主机监控软件,现在我们就来见识下.本次系统为RHEL5.4,nagios版本号为3.21.废话不多说,马上行动.

  1.需要apache、php、gd等环境支持

  yum install httpd gcc glibc glibc-common gd gd-devel php -y

  2.Create Account Information(创建用户信息)

  #useradd -m nagios

  #groupadd nagcmd

  #usermod -a -G nagcmd nagios

  #usermod -a -G nagcmd apache

  3.Download Nagios and the Plugins(这些都是当前***版本了)

  #wget http://cdnetworks-kr-2.dl.sourceforge.net/project/nagios/nagios-3.x/nagios-3.2.1/nagios-3.2.1.tar.gz

  #wget http://cdnetworks-kr-2.dl.sourceforge.net/project/nagiosplug/nagiosplug/1.4.14/nagios-plugins-1.4.14.tar.gz

  4. Compile and Install Nagios(编译安装nagios,带*的行故意贴上来,可以让你了解源码安装的原理)

  #tar xzf nagios-3.2.1.tar.gz

  **Run the Nagios configure script, passing the name of the group you created earlier like so:

  #./configure --with-command-group=nagcmd

  **Compile the Nagios source code.

  #make all

  **Install binaries, init script, sample config files and set permissions on the external command directory.

  #make install

  #make install-init

  #make install-config

  #make install-commandmode

  5.Customize Configuration(修改下参数)

  vi /usr/local/nagios/etc/objects/contacts.cfg

  比如你可以修改这个文件中的email地址的接受者.

#p#

  6.Configure the Web Interface (配置下Web接口)

  #make install-webconf

  #htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin (nagios web后台用户名和密码就在这里生成)

  #service httpd restart

  7.Compile and Install the Nagios Plugins (没有插件的nagios似乎没有什么用,怎么感觉和WordPress很相似呀)

  #tar xzf nagios-plugins-1.4.14.tar.gz

  #./configure --with-nagios-user=nagios --with-nagios-group=nagios

  #make

  #make install

  8.Start Nagios

  #chkconfig --add nagios

  #chkconfig nagios on

  #/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg (仅仅是个测试)

  #service nagios start

  9.Modify SELinux Settings (如果你开启了selinux,那么你可能需要修改相关安全上下文)

  chcon -R -t httpd_sys_content_t /usr/local/nagios/sbin/

  chcon -R -t httpd_sys_content_t /usr/local/nagios/share/

  10.Login to the Web Interface

  http://localhost/nagios/

通过文章的介绍,我们清楚的知道了RHEL安装nagios的全过程!

【编辑推荐】

  1. Nagios :扩展提示信息发送方式(smtp, msn, fetion)
  2. nagios 安装过程
  3. 启动nagios服务
  4. 如何编写 Nagios 插件
  5. 配置 新的Nagios
  6. 配置和安装Nagios所需的工具与命令
责任编辑:赵鹏 来源: 网络转载
相关推荐

2019-11-14 09:20:15

CentOS 8RHEL 8Nagios Core

2011-03-21 15:35:01

Nagiosnagios-plug安装

2011-08-22 12:25:02

nagios

2011-03-31 16:05:18

Redhat配置nagios

2011-03-23 09:07:38

Nagios安装

2011-03-28 08:48:00

Nagios

2011-03-22 13:28:00

Nagios安装

2011-03-28 12:42:26

nagios

2011-03-22 10:54:01

2011-03-28 09:21:08

RedhatNagios

2011-03-23 13:32:14

配置Nagios系统

2011-03-31 16:05:18

Redhat配置nagios

2010-05-31 12:22:13

Nagios pnp

2011-03-21 13:01:56

LinuxNagios安装

2011-03-25 17:35:12

SuseNagios

2013-12-13 17:04:37

运维监控Nagios

2011-04-01 15:42:13

CactiNagios

2011-08-22 15:03:17

nagios

2010-05-31 10:00:14

Nagios安装

2011-03-21 14:53:26

Ubuntu安装Nagios
点赞
收藏

51CTO技术栈公众号