Nagios monitoring network server and network service installation

Source: Internet
Author: User

NagiosThe installation is relatively simple, and the complex is the setting of settings and configuration parameters. But you need to relax. After all, we need to fix it, right? Let's get started:

1: Get the latest installation package

:Http://www.nagios.org/download

2: log on to the server as root

The latest version is 2.5:

1) nagios, Version 2.5:

Fetch http://superb-west.dl.sourceforge.net/sourceforge/nagios/nagios-2.5.tar.gz

Or

Wget http://superb-west.dl.sourceforge.net/sourceforge/nagios/nagios-2.5.tar.gz

2) obtain the nagios plugin version 1.4.3:

Http://surfnet.dl.sourceforge.net/sourceforge/nagiosplug/nagios-plugins-1.4.3.tar.gz

3) obtain the image library file:

Http://dl.sf.net/nagios/imagepak-base.tar.gz

4) NRPE, version 2.5.2

Http://ufpr.dl.sourceforge.net/sourceforge/nagios/nrpe-2.5.2.tar.gz

5) NSCA, version 2.6

Http://kent.dl.sourceforge.net/sourceforge/nagios/nsca-2.6.tar.gz

3: switch to the root user

Sudo su

4: Extract

Tar zxvf nagios-2.5.tar.gz

5. Create a user running nagios

Adduser nagios

6: Create a folder for installing nagios

Make the folder owner nagios: nagios

Mkdir/usr/local/nagios

Chown nagios. nagios/usr/local/nagios

7. Confirm the web Server user

Some commands may be executed through the web interface. You must determine which user the web server runs, usually apache:

Grep "^ User"/usr/local/apache2/conf/httpd. conf

8: Create a command file group

This new group will include apache users and nagios users.

 
 
  1. pw groupadd nagcmd    
  2. pw usermod apache -G nagcmd    
  3. pw usermod nagios -G nagcmd    
  4. ----------------------------------   
  5. cat /etc/group   
  6. nagcmd:*:9007:apache,nagios   
  7. ----------------------------------  

9: run the configuration script and install nagios

 
 
  1. cd nagios-2.5   
  2. ./configure --prefix=/usr/local/nagios --with-gd-lib=/usr/local/lib --with-gd-inc=/usr/local/include   
  3. ---------------------------------   
  4. *** Configuration summary for nagios 2.5 07-13-2006 ***:   
  5.  
  6. General Options:   
  7. -------------------------   
  8.     Nagios executable: nagios   
  9.     Nagios user/group: nagios,nagios   
  10.     Command user/group: nagios,nagios   
  11.         Embedded Perl: no   
  12.         Event Broker: yes   
  13.     Install ${prefix}: /usr/local/nagios   
  14.           Lock file: ${prefix}/var/nagios.lock   
  15.       Init directory: /usr/local/etc/rc.d   
  16.             Host OS: freebsd6.0   
  17.  
  18. Web Interface Options:   
  19. ------------------------   
  20.           HTML URL: http://localhost/nagios/   
  21.             CGI URL: http://localhost/nagios/cgi-bin/   
  22. Traceroute (used by WAP): /usr/sbin/traceroute   
  23.  
  24.  
  25. Review the options above for accuracy. If they look okay,   
  26. type 'make all' to compile the main program and CGIs.   
  27. ---------------------------------   
  28. make all    
  29. make install    
  30. make install-init    
  31. make install-commandmode    
  32. make install-config  

10: Install nagios-plugins

 
 
  1. tar zxvf nagios-plugins-1.4.3.tar.gz   
  2. cd nagios-plugins-1.4.3   
  3. ./configure --prefix=/usr/local/nagios-plugins    
  4. make all    
  5. make install   

After the installation is complete, a libexec directory will be generated in/usr/local/nagios-plugins, and all the directories will be moved to the/usr/local/nagios directory.

Mv/usr/local/nagios-plugins/libexec // usr/local/nagios/

11: Installation of imagepak-base.tar.gz

Tar-xvzf imagepak-base.tar.gz

Decompress the package to the base directory.

Mv base/usr/local/nagios/share/images/logos/

The nagios installation process ends now. You must be careful and accurate in your operations. If you are not familiar with nagios, we recommend that you first take a look at the nagios network server monitoring and network service concepts to make the service configuration more smooth. If your host is ready for the above work, we will start to configure nagios. For more information, see troubleshooting and configuration.

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.