Nagios Installation notes (1)

Source: Internet
Author: User

I usedNagiosFor more than a year, he is competent in daily monitoring work. It is necessary to install a Nagios system. Let's take a look at the specific process of Nagios installation!

 

Figure-Nagios

Modify yum to upgrade the server[Root @ localhost ~] # Cd/etc/yum. repos. d [root @ localhost yum. repos. d] # cp CentOS-Base.repo CentOS-Base.repo.bak [root @ localhost yum. repos. d] # wget http://centos.ustc.edu.cn/CentOS-Base.repo

--- Update the software [root @ localhost yum. repos. d] # yum update

--- Install the following essential software [root @ localhost yum. repos. d] # yum install httpd [root @ localhost yum. repos. d] # yum install gcc [root @ localhost yum. repos. d] # yum install glibc-common [root @ localhost yum. repos. d] # yum install gd-devel

--- Add nagios users and nagcmd groups

 
 
  1. [root@localhost yum.repos.d]# cd [root@localhost ~]# useradd -m nagios[root@localhost ~]# passwd nagios ---nagios[root@localhost ~]# groupadd nagcmd[root@localhost ~]# usermod -a -G nagcmd nagios[root@localhost ~]# usermod -a -G nagcmd apache  
  2.  

--- Install nagios

 
 
  1. [Root @ localhost ~] # Mkdir-p ~ /Downloads [root @ localhost ~] # Cd ~ /Downloads [root @ localhost downloads] # wget unzip downloads] # tar xzf nagios-3.2.3.tar.gz [root @ localhost downloads] # cd nagios-3.2.3 [root @ localhost nagios-3.2.3] #. /configure -- with-command-group = nagcmd -- with-gd-lib =/usr/lib -- with-gd-inc =/usr/include [root @ localhost nagios-3.2.3] # make all [root @ localhost nagios-3.2.3] # make install [root @ localhost nagios-3.2.3] # make install-init [root @ localhost nagios-3.2.3] # make install-config [root @ localhost nagios-3.2.3] # make install-commandmode
  2.  
  3. [Root @ localhost nagios-3.2.3] # cp/usr/local/nagios/etc/objects/contacts. cfg/usr/local/nagios/etc/objects/contacts. cfg. bak [root @ localhost nagios-3.2.3] # vi/usr/local/nagios/etc/objects/contacts. cfg --- modify nagiosadmin: email
  4.  
  5. [Root @ localhost nagios-3.2.3] # make install-webconf [root @ localhost nagios-3.2.3] # htpasswd-c/usr/local/nagios/etc/htpasswd. users nagiosadmin --- nagios
  6.  
  7. [Root @ localhost nagios-3.2.3] # service httpd restart
  8.  

--- Install nagios-plugins

 
 
  1. [root@localhost nagios-3.2.3]# cd ~/downloads[root@localhost downloads]# tar xzf nagios-plugins-1.4.15.tar.gz[root@localhost downloads]# cd nagios-plugins-1.4.15[root@localhost nagios-plugins-1.4.15]# ./configure --with-nagios-user=nagios --with-nagios-group=nagios[root@localhost nagios-plugins-1.4.15]# make[root@localhost nagios-plugins-1.4.15]# make install  
  2.  

--- Install nagios-snmp-plugins

 
 
  1. [root@localhost nagios-plugins-1.4.15]# cd ~/downloads[root@localhost downloads]# wget http://nagios.manubulon.com/nagios-snmp-plugins.1.1.1.tgz[root@localhost downloads]# tar xzf nagios-snmp-plugins.1.1.1.tgz[root@localhost downloads]# cd nagios_plugins[root@localhost nagios_plugins]# perl -MCPAN -e shell  
  2.  
  3. cpan> install Net::SNMP  
  4.  
  5. [root@localhost nagios_plugins]# ./install.sh  
  6.  


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.