RHEL安装nagios
创始人
2024-07-24 09:11:19
0

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所需的工具与命令

相关内容

热门资讯

如何允许远程连接到MySQL数... [[277004]]【51CTO.com快译】默认情况下,MySQL服务器仅侦听来自localhos...
如何利用交换机和端口设置来管理... 在网络管理中,总是有些人让管理员头疼。下面我们就将介绍一下一个网管员利用交换机以及端口设置等来进行D...
施耐德电气数据中心整体解决方案... 近日,全球能效管理专家施耐德电气正式启动大型体验活动“能效中国行——2012卡车巡展”,作为该活动的...
Windows恶意软件20年“... 在Windows的早期年代,病毒游走于系统之间,偶尔删除文件(但被删除的文件几乎都是可恢复的),并弹...
20个非常棒的扁平设计免费资源 Apple设备的平面图标PSD免费平板UI 平板UI套件24平图标Freen平板UI套件PSD径向平...
德国电信门户网站可实时显示全球... 德国电信周三推出一个门户网站,直观地实时提供其安装在全球各地的传感器网络检测到的网络攻击状况。该网站...
为啥国人偏爱 Mybatis,... 关于 SQL 和 ORM 的争论,永远都不会终止,我也一直在思考这个问题。昨天又跟群里的小伙伴进行...
《非诚勿扰》红人闫凤娇被曝厕所... 【51CTO.com 综合消息360安全专家提醒说,“闫凤娇”、“非诚勿扰”已经被黑客盯上成为了“木...