首页 > 其他分享 >Nagios

Nagios

时间:2023-03-28 10:05:39浏览次数:34  
标签:bin make nagios etc usr Nagios local


服务端安装:

tar xzvf nagios-3.3.1.tar.gz
cd nagios
/usr/sbin/useradd nagios -s /sbin/nologins
/usr/sbin/groupadd nagcmd
/usr/sbin/usermod -G nagcmd nagios
/usr/sbin/usermod -G nagcmd nobody
./configure –with-command-group=nagcmd –with-httpd-conf=/usr/local/apache/conf/ –with-gd-lib=/usr/lib –with-gd-inc=/usr/include/
make all
make install
make install-init
make install-commandmode
make install-config
make install-classicui
/usr/local/apache/bin/htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin
New password:
Re-type new password:
Adding password for user nagiosadmintar xzvf nagios-plugins-1.4.15.tar.gz
cd nagios-plugins-1.4.15
./configure –with-nagios-user=nagios –with-nagios-group=nagios –enable-redhat-pthread-workaround[root@test etc]# /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
[root@test etc]# /usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg
[root@test etc]# /usr/local/nagios/bin/nagios -s /usr/local/nagios/etc/nagios.cfg
[root@test etc]# /usr/local/nagios/bin/nagios -sp /usr/local/nagios/etc/nagios.cfg[root@test conf]# vim httpd.conf
ScriptAlias /nagios/cgi-bin /usr/local/nagios/sbin<directory "="" usr="" local="" nagios="" sbin"=""  style="margin-bottom: 0px;">
Options ExecCGI
AllowOverride None
Order allow,deny
Allow from all
AuthName “Nagios Access”
AuthType Basic
AuthUserFile /usr/local/nagios/etc/htpasswd.users
Require valid-userAlias /nagios /usr/local/nagios/share
<directory "="" usr="" local="" nagios="" share"=""  style="margin-bottom: 0px;">
Options None
AllowOverride None
Order allow,deny
Allow from all
AuthName “Nagios Access”
AuthType Basic
AuthUserFile /usr/local/nagios/etc/htpasswd.users
Require valid-user
#
# Directives to allow use of AWStats as a CGI

客户端安装:

cd /opt/
tar xzvf nrpe-2.12.tar.gz
groupadd nagios
useradd nagios -g nagios -d /usr/local/nagios/ -s /sbin/nologin
mkdir -p /usr/local/nagios/etc
mkdir /usr/local/nagios/bin
mkdir /usr/local/nagios/libexec
chown -R nagios.nagios /usr/local/nagios/etc/
cd nrpe-2.12
./configure
make all
make install-plugin
cp ./sample-config/nrpe.cfg /usr/local/nagios/etc/
cp src/nrpe /usr/local/nagios/bin/cd ..
tar xzvf nagios-plugins-1.4.15.tar.gz
cd nagios-plugins-1.4.15
./configure –with-nagios-user=nagios –with-nagios-group=nagios –enable-redhat-pthread-workaround
make
make install

标签:bin,make,nagios,etc,usr,Nagios,local
From: https://blog.51cto.com/u_2650279/6153814

相关文章

  • Nagios 配置工具 Nconf
    安装参考:​​http://www.nconf.org/dokuwiki/doku.php?id=nconf:help:documentation:start:installation​​#下载解压wgethttps://sourceforge.net/projects/nconf/files......
  • 新建的nagios,本地RHEL6.0报HTTP/1.1--403错误
    新建的nagios,本地RHEL6.0报HTTP/1.1--403错误 HTTPWARNING:HTTP/1.1403Forbidden-4184bytesin0.001secondresponsetime是因为nagios不断地检查apahce的根目录,......
  • linux下搭建nagios
    环境准备yuminstall-yhttpdphpgccglibcglibc-commongdgd-develmakenet-snmp创建Nagios用户和Nagcmd组useraddnagios&&groupaddnagcmd加入nagios和a......
  • Nagios安装
    实验环境   操作系统:RedHatEnterpriseLinuxServerrelease6.0(Santiago)  64bit。   注意,Nagios只能安装在Linux或Unix平台,不支持Windows平台,当然,它可以......
  • nagios
    [masamaso@cscc~]$ipa  inet192.168.254.181/20brd192.168.255.255scopeglobaleth0  inet10.2.0.181/29brd10.2.0.183scopeglobaleth0:0  inet......
  • 重启Nagios时报错“Failed to restart nagios.service: Unit not found”
     问题:执行完命令/usr/local/nagios/bin/nagios-v/usr/local/nagios/etc/nagios.cfg后重启Nagios报错[[email protected]]#systemctlrestartnagi......
  • Nagios配置
    其实上篇Nogios安装只是安装了Nagios基本组件,虽然能够打开主页,但是如果不配置相关配置文件文件,那么左边菜单很多页面都打不开,相当于只是一个空壳子。接下来,我们来学习研究一......
  • Nagios配置文件nagios.cfg详解
    这里开始要讲一些Nagios的配置。首先要看看目前Nagios的主配置路径下有哪些文件。[root@nagiosetc]#ll总用量152-rwxrwxr-x.1nagiosnagios18259月2414:40cgi.cf......
  • 实战配置Nagios主机及服务实战
    目录1在客户服务器上配置...11.1配置nrpe.11)加入可以监控该服务器的nagiosserver端的IP。...12)注释掉或者干脆删除199-203行即下面几行...12配置nagios监控服......
  • nagios添加被监控的机器
    此工作大约用时:30min准备工作,在被监控机上yuminstall-ygccglibcglibc-commongdgd-develxinetdopenssl-devel0客户端上增加用户/usr/sbin/useradd-m-s1,安装Na......