nagios安装

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/terry_water/article/details/37959405

参考资料:1.

yum install gd-devel
这个必须在nagios安装之前安装

/usr/sbin/useradd addcn
passwd addcn
/usr/sbin/groupadd addcn
/usr/sbin/usermod -g nagios addcn
(去掉 addcn是nginx用户)

1
官方地址  http://nagios-plugins.org/download/
http://nagios-plugins.org/download/nagios-plugins-1.4.15.tar.gz
2.
yum install perl-ExtUtils-CBuilder perl-ExtUtils-MakeMaker
3
yum install dos2unix unix2dos
dos2unix  /usr/local/nginx/sbin/nginx-fcgi.pl
chown nginx:nginx /usr/local/nginx/logs/nginx-fcgi.sock
ln -s /usr/local/nagios/share /images/nagios/nagios

报错:
/usr/local/nagios/sbin/statusmap.cgi may not exist or is not executable by this process.
Nagios常见问题1: 

It appears as though you do not have permission to view information for any of the hosts you requested 

临时解决: 

sed -i 's/use_authentication=1/use_authentication=0/g' /usr/local/nagios/etc/cgi.cfg 

yum install gd-devel
这个必须在nagios安装之前安装

地址:

http://addcn.blogbus.com/logs/110904533.html


nginx配置中加入:

 location ~ \.cgi$ 
    {
        root /usr/local/nagios/sbin;
        rewrite ^/nagios/cgi-bin/(.*)\.cgi /$1.cgi break;
        fastcgi_index index.cgi;
        fastcgi_pass    unix:/usr/local/nginx/logs/nginx-fcgi.sock;


        fastcgi_param   SCRIPT_FILENAME             /usr/local/nagios/sbin$fastcgi_script_name;
        fastcgi_param   HTTP_ACCEPT_LANGUAGE        zh-cn;
        include /usr/local/nginx/conf/fastcgi.conf;
auth_basic "Nagios Login pain";
auth_basic_user_file /usr/local/nginx/conf/htpasswd;
    }

展开阅读全文

没有更多推荐了,返回首页