centos 5.8上nagios服务端安装

CSDN学院讲师招募,诚邀您加入!博客Markdown编辑器上线啦PMBOK第五版精讲视频教程火星人敏捷开发1001问

centos 5.8上nagios服务端安装

分类:nagios

[root@mode yum.repos.d]# useradd -s /sbin/nologin nagios[root@mode yum.repos.d]# mkdir /usr/local/nagios[root@mode yum.repos.d]# chown -R nagios.nagios /usr/local/nagios[root@mode yum.repos.d]# ll -d /usr/local/nagiosdrwxr-xr-x 2 nagios nagios 4096 Mar 17 06:14 /usr/local/nagios[root@mode yum.repos.d]# cd /home/oldboy/tools/[root@mode tools]# rzrz waiting to receive.开始 zmodem 传输。 按 Ctrl+C 取消。 100% 1742 KB 1742 KB/s 00:00:01 0 Errors[root@mode tools]# tar zxf nagios-3.4.3.tar.gz[root@mode tools]# cd nagios

[root@mode nagios]# ./configure –prefix=/usr/local/nagios

[root@mode nagios]# make all

[root@mode nagios]# make install

root@mode nagios]# make install-init[root@mode nagios]# make install-config[root@mode nagios]# make install-commandmode安装nagios web 配置文件及创建用户

make install-webconf

f

因为nagios的配置文件指定了密码文件的存放路径就是/usr/local/nagios/etc/htpasswd.users

添加监控报警的email 地址

[root@mode nagios]# sed -i ‘s#nagios@localhost#1204070172@qq.com#’ /usr/local/nagios/etc/objects/contacts.cfg

root@mode nagios]# /etc/init.d/sendmail startStarting sendmail:[root@mode nagios]# /etc/init.d/sendmail statussendmail (pid 3203) is running…[root@mode nagios]# cat /etc/hosts# Do not remove the following line, or various programs# that require network functionality will fail.127.0.0.1 mode localhost.localdomain localhost::1 localhost6.localdomain6 localhost6[root@mode nagios]# hostnamemode

[root@mode nagios]# chkconfig sendmail on[root@mode nagios]# chkconfig –list onerror reading information on service on: No such file or directory[root@mode nagios]# chkconfig –list sendmailsendmail 0:off 1:off 2:on 3:on 4:on 5:on 6:off[root@mode nagios]# netstat -lntActive Internet connections (only servers)Proto Recv-Q Send-Q Local Address Foreign Address State tcp 0 0 0.0.0.0:2049 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:841 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:55924 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:789 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:757 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN tcp 0 0 :::22 :::* LISTEN

配置apache服务

/etc/init.d/httpd start

chkconfig httpd on

如果Apache是编译安装的,那么它的用户和用户组默认是daemon需要

x修改httpd.conf

安装nagios插件:

但我们好多人没想过,勇敢的冷静的理智的去接受失败,

centos 5.8上nagios服务端安装

相关文章:

你感兴趣的文章:

标签云: