Centos系统下载大全 | Redhat系统下载大全 | Windows2012系统下载大全 | Windows2008系统下载大全| CMS教程 | 网站地图 51运维网-专注Linux/Unix系统安全运维!
当前位置:51运维网 > 监控 > Nagios > 正文

nagios安装部署

时间:2015-01-06 16:32 来源:未知 作者:www.taoping.org 阅读:
  1. nagios服务端安装

    基础套件  rpm -q gcc glibc glibc-common gd gd-devel xinetd openssl-devel

    创建用户 

    useradd -r nagios

    mkdir /usr/local/nagios

    chown -R nagios.nagios /usr/local/nagios

    安装nagios  

    ./configure --prefix=/usr/local/nagios

    make all

    make install

    make install-init

    make install-commandmode

    make install-config

    添加nagios服务

    chkconfig --add nagios

    chkconfig --level 35 nagios

    安装nagios-plugins 

    ./configure --prefix=/usr/local/nagios

    make && make install

     

  2. http和php安装

    apache用的是httpd-2.4.10.tar.gz

    还需要apr-1.5.1.tar.gz和apr-util-1.5.4.tar.gz

    tar xf httpd-2.2.23.tar.gz

    tar xf apr-1.5.1.tar.gz

    tar xf apr-util-1.5.4.tar.gz

    cp -r /home/apr-1.5.1 srclib/apr

    cp -r apr-util-1.5.4 httpd-2.4.10/srclib/apr-util

    cd httpd-2.2.23

    ./configure --prefix=/usr/local/httpd --with-included-apr

    make && make install

    php安装

    ./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache2/bin/apxs

    httpd.conf配置修改

    添加AddType application/x-httpd-php .php

    安装完成修改httpd.conf

    DirectoryIndex index.html 改成 DirectoryIndex index.php index.html

     

     

    开启cgi模块 LoadModule cgid_module modules/mod_cgid.so

                AddHandler cgi-script .cgi

    末尾添加

    ScriptAlias /nagios/cgi-bin "/usr/local/nagios/sbin"

    <Directory "/usr/local/nagios/sbin">
         AuthType Basic
         Options ExecCGI
         AllowOverride None
         Order allow,deny
         Allow from all
         AuthName "Nagios Access"
         AuthUserFile /usr/local/nagios/etc/htpasswd
         Require valid-user
    </Directory>
    Alias /nagios "/usr/local/nagios/share"
    <Directory "/usr/local/nagios/share">
         AuthType Basic
         Options None
         AllowOverride None
         Order allow,deny
         Allow from all
         AuthName "nagios Access"
         AuthUserFile /usr/local/nagios/etc/htpasswd
         Require valid-user

    保存退出

    创建apache目录验证文件

    /usr/local/apache2/bin/htpasswd -c /usr/local/nagios/etc/htpasswd admin

    访问http://localhost/nagios 即可看到nagios的web界面

感谢您对【51运维网 http://www.51ou.com/】的支持,我们为您免费提供《 nagios安装部署》技术文章,《 nagios安装部署》详细使用和说明,有时《 nagios安装部署》可能不完善、敬请谅解!如果《 nagios安装部署》有错误请给我们留言,我们将尽快修复文章错误,如果您觉得本站不错,请分享给周围的朋友!谢谢!

顶一下
(0)
0%
踩一下
(0)
0%
发表评论
请自觉遵守互联网相关的政策法规,严禁发布色情、暴力、反动的言论。
验证码:点击我更换图片