1、安装依赖包

#yum install httpd httpd-devel php openssl-devel

#yum install gcc glibc glibc-common

#yum install gd gd-devel

2、创建用户组

#groupadd nagcmd                /*建立组nagcmd*/

#usermod -G nagcmd apache               /*添加用户apache到组nagcmd*/

#useradd -G nagcmd nagios               /*新建用户nagios并添加到组nagcmd*/

#passwd nagios               /*修改nagios密码*/

3、下载nagios和插件

#wget http://sourceforge.net/projects/nagios-cn/files/sourcecode/zh_CN%203.2.3/nagios-cn-3.2.3.tar.bz2      ##中文版
#wget http://iweb.dl.sourceforge.net/project/nagiosplug/nagiosplug/1.4.16/nagios-plugins-1.4.16.tar.gz

4、编译安装nagios

#tar -jxvf nagios-cn-3.2.3.tar.bz2
#cd nagios-cn-3.2.3

#./configure --prefix=/usr/local/nagios --with-nagios-user=nagios --with-nagios-group=nagios --with-command-group=nagcmd   ##把nagcmd更改为之前所创建的组。

#make all

#make install

#make install-init
#make install-config
#make install-commandmode

修改联系人为下一步中的管理员并更改email地址

#vi /usr/local/nagios/etc/objects/contacts.cfg

配置web接口

#make install-webconf

Web接口创建nagiosadmin帐号

#htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin
#设置管理员密码

#service httpd restart

5、安装插件

#cd ~/downloads
#tar xzf nagios-plugins-1.4.16.tar.gz
#cd nagios-plugins-1.4.16
#./configure --prefix=/usr/local/nagios --with-nagios-user=nagios --with-nagios-group=nagios --with-command-group=nagcmd
#make 
#make install

6、启动nagios

#chkconfig --add nagios
#chkconfig nagios on
#chkconfig httpd on
#service httpd restart
#service nagios restart

7、检查nagios配置

#/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg

8、登陆nagios

http://ip:端口/nagios/

Nagios监控平台之一:在Centos上安装Nagios服务的更多相关文章

  1. 在 CentOS 上安装 vsftp 服务

    在 CentOS 上安装 vsftp 服务 1.查看当前 CentOS 服务器是否已安装了 vsftpd 服务: rpm -q vsftpd 如果打印如下类似的信息则表明已安装 vsftpd 服务: ...

  2. CentOS上安装GitBlit服务

    简单介绍 在上一篇文章中,已经简单的介绍了如何在CentOS的服务器上搭建git服务器.但是这种方式实现的服务器功能比较弱,操作起来也比较繁琐.在网上搜索了一圈,感觉Gitblit比较符合我的需求.接 ...

  3. CentOS 上安装 GIT 服务

    获取 YUM 中 GIT 信息:    yum info git 查看当前 GIT 的版本:    git --version    或    git version 卸载当前版本的 GIT:     ...

  4. 在Centos上安装RabbitMQ流程(转)

    在Centos上安装RabbitMQ流程------------------------ 1. 需求 由于项目中要用到消息队列,经过ActiveMQ与RabbitMQ的比较,最终选择了RabbbitM ...

  5. 在Nginx中搭建Nagios监控平台

    本文只做Nginx下Nagiox安装的说明,其它关于Nagios监控的详细配置请参考我的另一篇文章[Ubuntu 10.04下构建Nagios监控平台] Nagios依赖PHP环境和perl环境.由于 ...

  6. 在 CentOS 上安装和配置 OpenNebula

    转自:http://www.aikaiyuan.com/4889.html 我们提到的云计算一般有三种类型:软件即服务(Software as a Service, SaaS),平台即服务(Platf ...

  7. Cacti+Nagios监控平台完美整合

    Cacti+Nagios监控平台完美整合 本博文出自51CTO博客吴光科博主,有任何问题请进入博主页面互动讨论!博文地址:http://wgkgood.blog.51cto.com/1192594/1 ...

  8. centos上安装supervisor来管理dotnetcore等应用程序

    supervisor 介绍: 这是一款用python编写的进程管理工具,可以守护他管理的所有进程,防止异常退出,以及提供一个可视化的web界面来手动管理,打开关闭重启各种应用,界面如下: 关于在cen ...

  9. NoSql1 在Linux(CentOS)上安装memcached及使用

    前言:       今天是初五,生活基本要从过年的节奏中回归到正常的生活了,所以想想也该想想与工作有关的事情了.我之前在工作中会经常使用memcached和redis,但是自己一直没有时间系统的好好看 ...

随机推荐

  1. ios framework 简单制作

    在制作过程中遇到的一些问题跟大家分享下,直接上步骤 制作库有分模拟器框架和真机矿机  如果报错x86_64什么的字眼就是库里面没有包含模拟器框架 模拟器:iPhone4s~5 : i386 iPhon ...

  2. 简单阐述下OC中UIImage三种创建方式~~~

    一. 直接使用imageNamed进行创建 UIImage * image = [UIImage imageNamed:@"1.jpg"]; 简单说一下这种方式的优缺点: 优点:代 ...

  3. 题目1203:IP地址

    题目: http://ac.jobdu.com/problem.php?pid=1203 时间限制:1 秒 内存限制:32 兆 特殊判题:否 提交:3052 解决:1504 题目描述: 输入一个ip地 ...

  4. oracle length and lengthb

    LENGTH──返回以字符为单位的字符串长度. LENGTHB──返回以字节为单位的字符串长度,它和类型定义中的长度是一个概念,比如你定义的varchar2(10)中的10.在不同的数据库,因为字符集 ...

  5. Codeforces Round #376 (Div. 2)

    A 模拟 #include <cstdio> #include <cstring> int Ans; ]; inline ?x:-x;} inline int Min(int ...

  6. 炫酷的Linux终端命令大全-1

    1. 命令行日常快捷键. CTRL + U            ------------------------------- 剪切光标前的内容 CTRL + K             ----- ...

  7. 【Learning Python】【第四章】Python代码结构(一)

    这一章的主旨在于介绍python的代码结构 缩进 在很多的编程语言中,一般{}用于控制代码块,比如以下的一段C代码 if(var <= 10) { printf("....." ...

  8. 调试python程序

    pdb 关键步骤 python -m pdb ***.py n 单步

  9. 日志:using the Connector/J connection property 'autoReconnect=true' to avoid this problem

    com.mysql.jdbc.CommunicationsException: The last packet successfully received from the server was581 ...

  10. Ansible-Tower快速入门-7.配置实时事件【翻译】

    配置实时事件 在tower的菜单中,在接近用户菜单处有一个带有颜色的小点,这个带颜色的小点显示tower的实时事件功能的状态 如果这个小点是绿色的,表示运行正常,如果这个小点是红色或橙色,表示实时事件 ...