Installation Nagios details and precautions

Source: Internet
Author: User
Tags php source code

This article is mainly for the installation of source code, please note.

First step: Pre-Installation preparation, first install the required dependency package (yum-y install gcc glibc glibc-common gd gd-devel)

Step two: Install Apache source code, (./configure--prefix=/usr/local/apache2; Make and make install), install Apr if prompted for a missing APR, and then specify the installation path for APR when installing Apache (--WITH-APR=/USR/LOCAL/APR).

The second part: Install PHP source code, (./configure--prefix=/usr/local/php--with-apxs2=/usr/local/apache2/bin/apxs), This step is to add PHP-supported modules to the Apache modules directory. then make; Make install

Step three: Prepare to install Nagios (add user useradd nagios;passwd Nagios).

Fourth step: Start installing Nagios

(1)./configure--with-command-group=nagcmd
(2) Make All;make install;make install-config;make install-commandmode;make install-webconf
(3) Htpasswd-c/usr/local/nagios/etc/htpasswd.users nagiosadmin (this user is your credentials to log in to Nagios)

Fifth step: Need to include in Apache config file (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
</Directory>

#作用: The path and CGI path used to log in to Nagios

Note: (You will need to add AddType application/x-httpd-php. php in Apache; index.php after index.html;

The goal is to enable Apache to support PHP)

Note: (In addition, the user and group in Apache are changed to Nagios)

Sixth Step: Install Nagios-plugins

./configure--with-nagios-user=nagios--with-nagios-group=nagios; make; Make install
The installation is now almost there. Restart Apache and Nagios; enter Http://your Server/nagios in the browser;

Enter your username and password to be OK.

This article is from the Linux shell blog, so be sure to keep this source http://madaqiang.blog.51cto.com/7955196/1559277

Installation Nagios details and precautions

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.