我们专注攀枝花网站设计 攀枝花网站制作 攀枝花网站建设
成都网站建设公司服务热线:400-028-6601

网站建设知识

十年网站开发经验 + 多家企业客户 + 靠谱的建站团队

量身定制 + 运营维护+专业推广+无忧售后,网站问题一站解决

编译安装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://mswzjz.cn/article/gdcogo.html

其他资讯