自拍偷在线精品自拍偷,亚洲欧美中文日韩v在线观看不卡

Nagios安裝筆記

運(yùn)維 系統(tǒng)運(yùn)維
我們知道Nagios是Linux/Unix上的監(jiān)控系統(tǒng),在用Nagios監(jiān)控時(shí)你們會發(fā)現(xiàn)他非常好用,能幫大家不少忙,本文就給大家介紹下Nagios安裝的具體流程。

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

 

Nagios 

圖-Nagios

  修改yum升級服務(wù)器[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#

  ---其它設(shè)置

  [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設(shè)置

 

  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,實(shí)現(xiàn)nagios采集數(shù)據(jù)寫入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擴(kuò)展的主機(jī)和服務(wù)監(jiān)測
  3. Nagios編譯安裝之配置Apache服務(wù)
  4. Nagios的配置文件
  5. Nagios插件plugins配置和安裝

 

責(zé)任編輯:趙鵬 來源: 網(wǎng)絡(luò)轉(zhuǎn)載
相關(guān)推薦

2010-05-31 12:22:13

Nagios pnp

2011-11-08 21:58:01

Nagios 配置 流

2010-05-31 10:22:31

Nagios pnp

2011-03-28 15:22:00

nagios

2011-03-21 15:35:01

Nagiosnagios-plug安裝

2011-03-31 16:05:18

Redhat配置nagios

2011-08-22 12:25:02

nagios

2011-03-23 09:07:38

Nagios安裝

2011-03-28 13:27:36

RHELnagios

2010-05-31 11:10:37

Nagios pnp

2011-03-22 13:28:00

Nagios安裝

2011-03-22 10:54:01

2011-03-28 09:21:08

RedhatNagios

2011-03-28 12:42:26

nagios

2011-03-23 13:32:14

配置Nagios系統(tǒng)

2011-03-31 16:05:18

Redhat配置nagios

2011-03-25 17:35:12

SuseNagios

2011-03-21 13:01:56

LinuxNagios安裝

2013-12-13 17:04:37

運(yùn)維監(jiān)控Nagios

2011-04-01 15:42:13

CactiNagios
點(diǎn)贊
收藏

51CTO技術(shù)棧公眾號