成人免费xxxxx在线视频软件_久久精品久久久_亚洲国产精品久久久_天天色天天色_亚洲人成一区_欧美一级欧美三级在线观看

Nagios安裝筆記

運維 系統運維
我們知道Nagios是Linux/Unix上的監控系統,在用Nagios監控時你們會發現他非常好用,能幫大家不少忙,本文就給大家介紹下Nagios安裝的具體流程。

我用了Nagios有一年多,在日常的監控工作中他都能勝任,那大家安裝一個Nagios系統是必要的,讓我們來看看Nagios安裝具體過程!

 

Nagios 

圖-Nagios

  修改yum升級服務器[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

  ---更新軟件[root@localhost yum.repos.d]# yum update

  ---安裝以下必備軟件[root@localhost yum.repos.d]# yum install httpd[root@localhost yum.repos.d]# yum install gcc[root@localhost yum.repos.d]# yum install glibc glibc-common[root@localhost yum.repos.d]# yum install gd gd-devel

  ---添加nagios用戶、nagcmd組等

 

  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.  

 

  ---安裝nagios

 

  1.   [root@localhost ~]# mkdir -p ~/downloads[root@localhost ~]# cd ~/downloads[root@localhost downloads]# wget http://sourceforge.net/projects/nagios/files/nagios-3.x/nagios-3.2.3/nagios-3.2.3.tar.gz[root@localhost downloads]# wget http://sourceforge.net/projects/nagiosplug/files/nagiosplug/1.4.15/nagios-plugins-1.4.15.tar.gz[root@localhost 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 ---修改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.  

 

  ---安裝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.  

 

  ---安裝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.  

 

#p#

  ---其它設置

  [root@localhost nagios_plugins]# cd [root@localhost ~]# chkconfig --add nagios[root@localhost ~]# chkconfig nagios on[root@localhost ~]# chkconfig httpd on[root@localhost ~]# /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg

       ---檢測配置

  1. [root@localhost ~]# service nagios start  
  2.  
  3. @localhost ~]# cp /etc/sysconfig/selinux /etc/sysconfig/selinux.bak[root@localhost ~]# vi /etc/sysconfig/selinux ---SELINUX=permissive  

 

  ---安裝mysql

 

  1.   [root@localhost ~]# yum -y install mysql[root@localhost ~]# yum -y install mysql-server[root@localhost ~]# yum -y install mysql-devel[root@localhost ~]# yum -y install php-mysql  
  2.  
  3.   [root@localhost ~]# chkconfig --levels 345 mysqld on[root@localhost ~]# service mysqld start  
  4.  
  5.   [root@localhost ~]# mysqlSET PASSWORD FOR 'root'@'localhost' = PASSWORD('mysql');  
  6.  
  7.   [root@localhost yum.repos.d]# yum install php  
  8.  

 

  ---安裝cacti

 

  1.   [root@localhost ~]# wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el5.rf.i386.rpm[root@localhost ~]# rpm -Uvh rpmforge-release-0.5.2-2.el5.rf.i386.rpm[root@localhost ~]# yum install rrdtool[root@localhost ~]# yum install net-snmp net-snmp-utils net-snmp-devel  
  2.  
  3.   [root@localhost ~]# yum install cacti ---php-mysql,php-pdo,php-snmp  
  4.  
  5.   [root@localhost conf.d]# vi cacti.conf  
  6.  
  7.   Alias /cacti/ /usr/local/wwwroot/cacti/ DirectoryIndex index.php Options -Indexes AllowOverride all order deny,allow allow from all AddType application/x-httpd-php .php php_flag magic_quotes_gpc on php_flag track_vars on  
  8.  
  9.   [root@localhost ~]# mysql -u root -pMysql>create database cacti;Mysql>use cacti;Mysql>source /usr/local/wwwroot/cacti/cacti.sqlMysql>grant all privileges on cacti.* to cacti@localhost identified by 'cacti';Mysql>flush privileges;  
  10.  

 

  ---apache設置

 

  1.   [root@localhost ~]# vi /var/www/cacti/include/config.php  
  2.  
  3.   $database_type = "mysql";$database_default = "cacti";$database_hostname = "localhost";$database_username = "cacti";$database_password = "cacti";$database_port = "3306";  
  4.  

 

  ---安裝ndoutils,實現nagios采集數據寫入mysql

 

  1.   [root@localhost ~]# wget http://sourceforge.net/projects/nagios/files/ndoutils-1.x/ndoutils-1.4b9/ndoutils-1.4b9.tar.gz[root@localhost ~]# tar zxf ndoutils-1.4b9.tar.gz[root@localhost ~]# cd ndoutils-1.4b9[root@localhost ndoutils-1.4b9]# ./configure --enable-mysql --disable-pgsql --with-mysql-lib=/usr/lib/mysql[root@localhost ndoutils-1.4b9]# make[root@localhost ndoutils-1.4b9]# cp config/ndomod.cfg-sample /usr/local/nagios/etc/ndomod.cfg  
  2.  

 

通過文章,我們對Nagios的安裝都有了自己的心得,希望你們趕快去裝一個Nagios,真的非常好用。

【編輯推薦】

  1. Suse 9 安裝Nagios過程
  2. Nagios擴展的主機和服務監測
  3. Nagios編譯安裝之配置Apache服務
  4. Nagios的配置文件
  5. Nagios插件plugins配置和安裝

 

責任編輯:趙鵬 來源: 網絡轉載
相關推薦

2010-05-31 12:22:13

Nagios pnp

2011-11-08 21:58:01

Nagios 配置 流

2011-03-31 16:05:18

Redhat配置nagios

2011-08-22 12:25:02

nagios

2011-03-21 15:35:01

Nagiosnagios-plug安裝

2010-05-31 10:22:31

Nagios pnp

2011-03-28 15:22:00

nagios

2011-03-28 13:27:36

RHELnagios

2011-03-23 09:07:38

Nagios安裝

2011-03-22 13:28:00

Nagios安裝

2010-05-31 11:10:37

Nagios pnp

2011-03-23 13:32:14

配置Nagios系統

2011-03-31 16:05:18

Redhat配置nagios

2011-03-22 10:54:01

2011-03-28 09:21:08

RedhatNagios

2011-03-28 12:42:26

nagios

2010-05-31 10:00:14

Nagios安裝

2011-03-21 14:53:26

Ubuntu安裝Nagios

2011-08-22 15:03:17

nagios

2011-03-22 13:37:29

Nagios安裝
點贊
收藏

51CTO技術棧公眾號

主站蜘蛛池模板: 久久综合久色欧美综合狠狠 | 精品国产一区二区三区久久 | 亚洲国产精品99久久久久久久久 | 99久久久久久99国产精品免 | 免费成人高清在线视频 | 国产大学生情侣呻吟视频 | 欧美日韩在线一区二区三区 | 午夜精品久久 | 久久精品久久久久久 | 狠狠入ady亚洲精品经典电影 | 午夜色婷婷 | 中文字幕在线视频精品 | 99re6在线视频 | 精品日韩一区二区 | 亚洲国产精品久久久久久 | 福利视频亚洲 | 日韩爱爱网 | 亚洲福利视频一区二区 | 成人av电影免费在线观看 | 国产精品一区一区 | 中文字幕在线免费观看 | 色婷婷av一区二区三区软件 | 国产精品视频免费观看 | 亚洲成人一区二区在线 | 91电影 | 91精品国产乱码麻豆白嫩 | 一区二区三区欧美在线观看 | 国产精品国产a | 999久久久久久久久6666 | 欧美毛片免费观看 | 久久精品亚洲 | 久久久国产精品入口麻豆 | 无毛av| 亚洲精品视频导航 | 久久久久久久久久久91 | 中文av电影| 亚洲精品亚洲人成人网 | 日韩精品一区二区三区 | 国产精品区二区三区日本 | 日本天天操 | 国产欧美精品区一区二区三区 |