摘要Nagios是一款开源的免费网络监视工具,能有效监控Windows、Linux和Unix的主机状态,交换机路由器等网络设置,打印机等。

Nagios是一款开源的免费网络监视工具,能有效监控Windows、Linux和Unix的主机状态,交换机路由器等网络设置,打印机等。

Nagios官方文档提供了详细的安装步骤,只要按照步骤一步一步安装还是非常容易的:

1、关闭linux内核防火墙

setenforce 0

2、安装依赖包

yum install httpd php php-cli gcc glibc glibc-common gd gd-devel net-snmp openssl-devel wget unzip  -y

4、创建linux用户

useradd nagios
groupadd nagcmd
usermod -a -G nagcmd nagios
usermod -a -G nagcmd apache

5、下载nagios core

cd /tmp
wget https://assets.nagios.com/downloads/nagioscore/releases/nagios-4.1.1.tar.gz
wget http://www.nagios-plugins.org/download/nagios-plugins-2.1.1.tar.gz

7、解压nagios core

tar zxf nagios-4.1.1.tar.gz
tar zxf nagios-plugins-2.1.1.tar.gz
cd nagios-4.1.1

8、编译安装nagios core

./configure --with-command-group=nagcmd
make all
make install
make install-init
make install-config
make install-commandmode
make install-webconf

9、创建web用户

htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin

10、安装nagios-plugin

cd /tmp/nagios-plugins-2.1.1
./configure --with-nagios-user=nagios --with-nagios-group=nagios --with-openssl
make all
make install

11、启动httpd

service httpd start

systemctl start httpd

12、启动nagios

service nagios start

systemctl start nagios

12、设置防火墙

firewall-cmd --zone=public --add-port=80/tcp --permanent
firewall-cmd --reload

13、浏览器访问,输入用户名nagiosadmin和刚才输入的密码

14、安装成功

centos下安装nagios的更多相关文章

  1. CentOS下安装hadoop

    CentOS下安装hadoop 用户配置 添加用户 adduser hadoop passwd hadoop 权限配置 chmod u+w /etc/sudoers vi /etc/sudoers 在 ...

  2. CentOS下安装使用start-stop-daemon

    CentOS下安装使用start-stop-daemon 在centos下下了个自启动的服务器脚本 执行的时候发现找不到start-stop-daemon命令 好吧 执行手动编译一下 加上这个命令 w ...

  3. 从零开始学 Java - CentOS 下安装 Tomcat

    生活以痛吻我,我仍报之以歌 昨天晚上看到那个冯大辉老师的微信公众号,「小道消息」上的一篇文章,<生活以痛吻我,我仍报之以歌>.知乎一篇匿名回答,主题为<冯大辉到底是不是技术大牛,一个 ...

  4. CentOS 下安装

    2016年12月5日15:25:58 ----------------------------------- 通常情况下在centos下安装软件就用yum. 关键是,使用yum你要知道安装包的名字是什 ...

  5. [Linux]CentOS下安装和使用tmux

    前天随意点开博客园,看到了一篇关于tmux的文章 Tmux - Linux从业者必备利器,特意还点进去看了.毕竟Linux对于做游戏服务端开发的我来说,太熟悉不过了.不过我就粗略地看了一眼,就关掉了. ...

  6. CentOS下安装JDK7 转载

    转载地址:http://www.cnblogs.com/rilley/archive/2012/02/02/2335395.html CentOS下安装JDK7 下载地址:http://www.ora ...

  7. Centos下安装mysql 总结

    一.MySQL安装 Centos下安装mysql 请点开:http://www.centoscn.com/CentosServer/sql/2013/0817/1285.html 二.MySQL的几个 ...

  8. 在centos下安装django

    这里有一个不错的Django的学习资料.先收藏一下,以备后用.谢谢 http://www.ziqiangxuetang.com/django/django-install.html 在centos下安 ...

  9. centos下安装php环境

    centos下安装php环境 安装apache yum install httpd-devel 启动apache /etc/init.d/httpd start 安装mysql yum install ...

随机推荐

  1. iosiOS 地图 自定义以及添加锚点

    - (void)clickLongPress:(UILongPressGestureRecognizer *)longPress { CGPoint point = [longPress locati ...

  2. rsync 实现实时增量备份

    Rsync + Crontab实现定时文件同步(首次全量+后续增量) 2015-04-14 19:02:11 标签:增量更新 rsync crontab 原创作品,允许转载,转载时请务必以超链接形式标 ...

  3. vps选择

    banwagonhost.com digitalocean.com vultr.com 优惠链接 https://www.vultr.com/freetrial

  4. virtual box 中两个虚拟机 、宿主机 三机互通并且能上外网设置

    virtual box 中两个虚拟机 .宿主机 三机互通并且能上外网设置 1:背景:因为需要学习linux,所以需要在虚拟机里装linux系统,测试要么宿主机与虚拟机linux网络实验测试:要么另一台 ...

  5. Data URL

    Data URL 早在 1995 年就被提出,那个时候有很多个版本的 Data URL Schema 定义陆续出现在 VRML 之中,随后不久,其中的一个版本被提上了议案——将它做个一个嵌入式的资源放 ...

  6. RequireJS示例

    建议项目结构: HTML文件结构: <!DOCTYPE html> <html> <head lang="en"> <meta chars ...

  7. Android IOS WebRTC 音视频开发总结(五三)-- 国内IM & RTC SDK列表

    本文主要总结国内提供RTC SDK的产品,转载必须说明出处,文章来自博客园RTC.Blacker,欢迎关注微信公众号blacker,更多详见www.rtc.help 自从开通邮件和微信公众号以来,很多 ...

  8. projecteuler Smallest multiple

    2520 is the smallest number that can be divided by each of the numbers from 1 to 10 without any rema ...

  9. C++ 必知必会:条款16 指向成员函数的指针并非指针

    这一点与指向成员的指针类似,其实现可能更加复杂,因为成员函数同时还存在虚拟函数,需要动态绑定执行动作.当然这种属性是属于函数本身的,此处表达的是指针不涉及函数的属性问题. 1: class shape ...

  10. 获取本地ip地址

    #import <ifaddrs.h> #import <arpa/inet.h> // Get IP Address - (NSString *)getIPAddress { ...