监控软件nagios之安装
1.安装软件依赖包和创建nagios用户
[root@tong1 ~]# yum install gcc gcc-c++ make -y
[root@tong1 ~]# groupadd -g 500 nagios
[root@tong1 ~]# useradd -r -u 500 -s /sbin/nologin -g nagios nagios
[root@tong1 ~]#
2.安装apache和php环境
[root@tong1 ~]# yum install httpd php* -y
[root@tong1 ~]# vim /etc/httpd/conf/httpd.conf
User nagios
Group nagios
ServerName localhost
DirectoryIndex index.php index.html index.html.var
AddType application/x-httpd-php .php
[root@tong1 ~]# vim /var/www/html/index.php
<?php
phpinfo();
?>
[root@tong1 ~]# /etc/init.d/httpd restart
Stopping httpd: [ OK ]
Starting httpd: [ OK ]
[root@tong1 ~]#
测试访问:
3.安装nagios监控软件
[root@tong1 ~]# wget http://softlayer-sng.dl.sourceforge.net/project/nagios/nagios-4.x/nagios-4.0.8/nagios-4.0.8.tar.gz
[root@tong1 ~]# wget http://nagios-plugins.org/download/nagios-plugins-2.0.3.tar.gz
[root@tong1 ~]# tar xvf nagios-4.0.8.tar.gz
[root@tong1 nagios-4.0.8]# ./configure --prefix=/usr/local/nagios-4.0.8
[root@tong1 nagios-4.0.8]# make all
[root@tong1 nagios-4.0.8]# make install
[root@tong1 nagios-4.0.8]# make install-init
[root@tong1 nagios-4.0.8]# make install-commandmode
[root@tong1 nagios-4.0.8]# make install-config
[root@tong1 nagios-4.0.8]# make install-webconf
[root@tong1 nagios-4.0.8]# make install-exfoliation
[root@tong1 nagios-4.0.8]# make install-classicui
[root@tong1 nagios-4.0.8]# ll /usr/local/nagios-4.0.8/
total 24
drwxrwxr-x. 2 nagios nagios 4096 Apr 1 13:59 bin --可执行文件
drwxrwxr-x. 3 nagios nagios 4096 Apr 1 14:00 etc --配置文件
drwxrwxr-x. 2 nagios nagios 4096 Apr 1 13:59 libexec --插件
drwxrwxr-x. 2 nagios nagios 4096 Apr 1 13:59 sbin --nagios cgi文件目录
drwxrwxr-x. 10 nagios nagios 4096 Apr 1 13:59 share --网页文件
drwxrwxr-x. 5 nagios nagios 4096 Apr 1 13:59 var --日志文件
[root@tong1 nagios-4.0.8]# cd ../
[root@tong1 ~]# tar xvf nagios-plugins-2.0.3.tar.gz
[root@tong1 ~]# cd nagios-plugins-2.0.3
[root@tong1 nagios-plugins-2.0.3]# ll /usr/local/nagios-4.0.8/libexec/ --nagios没有插件
total 0
[root@tong1 nagios-plugins-2.0.3]# ./configure --prefix=/usr/local/nagios-4.0.8/
[root@tong1 nagios-plugins-2.0.3]# make && make install
[root@tong1 nagios-plugins-2.0.3]# ll /usr/local/nagios-4.0.8/libexec/ | head -3 --nagios有插件了
total 6028
-rwxr-xr-x. 1 root root 179202 Apr 1 14:07 check_apt
-rwxr-xr-x. 1 root root 2249 Apr 1 14:07 check_breeze
[root@tong1 nagios-plugins-2.0.3]#
5.apache整合nagios监控
[root@tong1 nagios-plugins-2.0.3]# cd /etc/httpd/conf/
[root@tong1 conf]# vim httpd.conf
ScriptAlias /nagios/cgi-bin "/usr/local/nagios-4.0.8/sbin"
<Directory "/usr/local/nagios-4.0.8/sbin">
AuthType Basic
Options ExecCGI
AllowOverride None
Order allow,deny
Allow from all
AuthName "Nagios Access"
AuthUserFile /usr/local/nagios-4.0.8/etc/htpasswd --用于此目录访问身份验证的文件
Require valid-user
</Directory>
Alias /nagios "/usr/local/nagios-4.0.8/share" --定义别名
<Directory "/usr/local/nagios-4.0.8/share">
AuthType Basic
Options None
AllowOverride None
Order allow,deny
Allow from all
AuthName "nagios Access"
AuthUserFile /usr/local/nagios-4.0.8/etc/htpasswd
Require valid-user
</Directory>
[root@tong1 conf]# htpasswd -c /usr/local/nagios-4.0.8/etc/htpasswd tong
New password:
Re-type new password:
Adding password for user tong
[root@tong1 conf]# /etc/init.d/httpd restart
Stopping httpd: [ OK ]
Starting httpd: [ OK ]
[root@tong1 conf]# /etc/init.d/nagios restart
Running configuration check...
Stopping nagios:. done.
Starting nagios: done.
[root@tong1 conf]#
测试结果:
监控软件nagios之安装相关推荐
- Nagios监控软件源码安装
nagios是目前非常流行的系统,服务器监控免费软件,很多大的国内站点像搜狐,网易都在使用nagios进行服务器监控. nagios的有点在于他本身只是一个框架,对于nagios扩展监控模块,以及报警 ...
- docker开源系统监控软件Nagios
开源的系统监控软件 下面整理了3个: 1.Zabbix 2.Nagios 3.Open-Falcon 这位博主进行的完整的介绍: https://www.cnblogs.com/linuxandy/p ...
- 使用cacti对mysql监控的图像解释_Linux下的监控软件cacti的安装与配置
一.Cacti的介绍 Cacti是一套基于PHP,MySQL,SNMP及RRDTool开发的网络流量监测图形分析工具,是通过 snmpget来获取数据,使用 RRDtool绘画图形.它提供了非常强大的 ...
- 监控软件nagios错误总结
1.安装好nagios软件后点击任意页面报错 It appears as though you do not have permission to view information for any o ...
- 开源监控软件-Nagios-Rhel5.9安装手册
一.安装Nagios所需组件(事先需配置好yum环境) # yum -y install httpd php gcc glibc glib-common gd gd-devel libpng libj ...
- 监控软件nagios之配置文件详解
1.nagios根目录 [root@tong1 nagios-4.0.8]# ll total 28 drwxrwxr-x. 2 nagios nagios 4096 Apr 1 14:50 bi ...
- monit监控mysql_monit监控软件安装配置
monit很不错的监控软件,下载安装如下: wget http://mmonit.com/monit/dist/monit-5.1.1.tar.gz #最新的版本可能不是这个 tar xzvf mon ...
- 电脑监控软件可以监控到企业微信吗?
对于公司监控员工的微信这种行为一直存在着很多争议,员工觉得这样会侵犯个人隐私,属于违法行为:然而对于公司来说,则担心员工在微信上的很多操作,会对公司造成影响.比如: 员工利用公司的资源给客户推广自己的 ...
- Nagios远程监控软件的安装与配置详解
Nagios远程监控软件的安装与配置详解 作者:redhat_hu Nagios是一款功能强大的网络监视工具,它可以有效的监控windows.linux.unix主机状态以及路由器交换机的网络设置,打 ...
最新文章
- android progressbar 不显示_Android多线程技术选型最全指南(1)
- HTML5的data-*自定义属性
- Meeting 2 Notes
- 根据工作年限预测工资python代码实现
- 目前我国家庭计算机用户接入因特网的下述,目前我国家庭计算机用户接入因特网的下述几种方法中,速度最快的是________ 。...
- 5.【练习题】构造方法与重载
- Vs2013 头文件注释
- range函数python2和3区别_range函数python2和3区别
- perl与php,perl与php之异同
- 安装非认证的chrome插件和设置文件夹的权限
- 多项式之和 Sn=a+aa+aaa+aaaa+.....+aaa.....aa(n个a)
- SQL读书笔记SQL操作语句
- Python3面向对象:实例(instance)
- Android 关于内存泄漏的一些总结
- MIPS指令集及汇编
- linux中tmp文件在哪,学习LINUX入门,/tmp文件夹
- 肇庆PCR实验室建设消毒事项汇总
- 网络安全知识竞赛题库及答案(多选题1-100题)
- TYPE-C接口设备OTG线(手机接OTG线的同时进行充电)
- 数学基础从高一开始1、集合的概念
热门文章
- SSM/SpringBoot+layui实现数据表格
- windows下利用sox批量将PCM转为WAV
- ui vue 创建项目教程 并关闭语法_使用vue ui命令创建vue项目步骤
- 电热耦合_教育部关于发布电热原子吸收光谱分析方法通则等30个教育行业标准的通知...
- PyTorch随笔-4
- 工业用微型计算机笔记(2)-二进制有符号数
- 趣学python3(19)-函数-Lambda
- 【学术相关】进高校当老师有多难?非海归非 985 怎么办?
- 【机器学习基础】Self-Supervised Learning入门介绍
- 【收藏】机器学习入门的常见问题集(文末送书)