资讯

精准传达 • 有效沟通

从品牌网站建设到网络营销策划,从策略到执行的一站式服务

编译安装nagios

#安装nagios

创新互联建站公司2013年成立,先为东丰等服务建站,东丰等地企业,进行企业商务咨询服务。为东丰企业网站制作PC+手机+微官网三网同步一站式服务解决您的所有建站问题。

useradd -s /sbin/nologin nagios

mkdir /usr/local/nagios

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

tar zxvf nagios.tar.gz

cd nagios

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

make all

make install

make install-init

make install-commandmode

make install-config

#安装nagios插件

tar zxvf nagios-plugins.tar.gz

cd nagios-plusing

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

make

make install

#安装apapche

tar zxvf httpd.tar.gz

cd httpd

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

make

make install

#安装php

yum --disablerepo=\* --enablerepo=c5-media -y install libxml2-devel

tar zxvf php.tar.gz

cd php

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

make 

make install

#修改apache配置文件

User nagios

Group nagios

DirectoryIndex index.html index.php

AddType application/x-httpd-php .php

 

ScriptAlias /nagios/cgi-bin "/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

 

Alias /nagios "/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

 

 

#创建认证文件

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

//创建一个nagios的用户

 

#启动相关服务

service nagios start

/usr/local/apache2/bin/apachectl start

 

#访问管理页面

http://ip/nagios


新闻标题:编译安装nagios
本文路径:http://cdkjz.cn/article/gdcogo.html
多年建站经验

多一份参考,总有益处

联系快上网,免费获得专属《策划方案》及报价

咨询相关问题或预约面谈,可以通过以下方式与我们联系

大客户专线   成都:13518219792   座机:028-86922220