RHEL安装nagios(1)


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地址的接受者.


相关内容