[Stick to the top] install Nagios on pure Ubuntu and use

Source: Internet
Author: User
Tags fully qualified domain name

I. installation environment

System ubuntu-12.04.1-desktop-amd64.iso

2. Virtual Machine vmware workstation 8.0.4 build-744019

3. Remote tool xshell4

Ii. Installation Steps

1. APT-Get Install SSH 2. Create nagiios users and user groupsRoot @ Ubuntu :~ # Useradd-S/sbin/nologin Nagios
Root @ Ubuntu :~ # Mkdir/usr/local/Nagios

Root @ Ubuntu :~ # Chown-r Nagios. Nagios/usr/local/Nagios 3. Enable the sendmail service 4. Compile and install Nagios
CD/usr/local/src # Switch to the software installation directory # upload all the installation files

Tar-zxvf nagios-3.2.0.tar.gz

CD nagios-3.2.0/

./Configure -- prefix =/usr/local/Nagios

Make all

Make install # Install the main program and CGI and HTML files

Make install-init # create a Nagios STARTUP script in the/etc/rc. d/init. d directory

Make install-commandmode # configure Directory Permissions

Make install-config # installation example file # Set apt-Get install chkconfig $ sudo ln-S/usr/lib/insserv/sbin/insserv

Chkconfig -- add Nagios

Chkconfig -- level 35 Nagios on

Chkconfig -- list Nagios
5. Install the Nagios pluginTar-xzvf nagios-plugins-1.4.14.tar.gz

CD nagios-plugins-1.4.14/

./Configure -- prefix =/usr/local/Nagios

Make

Make install

6. install and configure ApacheTar-xzvf httpd-2.0.63.tar.gz

CD httpd-2.0.63/

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

Make

Make install

7. install PHPApt-Get install libxml2 apt-Get install libxml2-dev./configure -- prefix =/usr/local/PHP -- with-apxs2 =/usr/local/apache2/bin/apxs

Apt-Get install libxml2-dev

./Configure -- prefix =/usr/local/PHP -- with-apxs2 =/usr/local/apache2/bin/apxs

Make

Make install 8. Configure ApacheUser Nagios

Group Nagios # setting for Nagios

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>

Loadmodule php5_module modules/libphp5.so

Addtype application/X-httpd-PHP. php. phtml

Addtype applicatoin/X-httpd-PHP-source. PHPs 9. Generate Password/Usr/local/apache2/bin/htpasswd-C/usr/local/Nagios/etc/htpasswd Nagios 10. Start Apache
/Usr/local/apache2/bin/apachectl start Possible problems 1. An error is reported during PHP make.Configure: Error: xml2-config not found. Please check your libxml2 installation. APT-Get install libxml2 apt-Get install libxml2-dev 2. httpd: cocould not determine the server's fully qualified domain name, using 127.0.1.1 for servernameModify the httpd. conf file and remove the comment to # servername.

VI/usr/local/apache2/CONF/httpd. conf 3. You don't have permission to access/Nagios/on this server
This is a parsing error. You need to check tail-F/usr/local/apache2/logs/error_log for specific analysis. This may be a configuration file or permission issue. the error message attempt to invoke directory as Script:/usr/local/Nagios/share/the original share directory cannot be configured with ScriptAlias, but can only be configured with alias

All jar packages required during installation

 

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.