码迷,mamicode.com
首页 > 系统相关 > 详细

1、Cacti配置安装、监控Cisco交换机

时间:2016-11-07 02:52:49      阅读:261      评论:0      收藏:0      [点我收藏+]

标签:1、cacti配置安装、监控cisco交换机

1、实验拓扑

技术分享


2、安装Cacti


2.1、安装相关软件

[root@CentOS6 ~]# yum install -y httpd php php-mysql php-snmp mysql-server php-pdo net-snmp net-snmp-libs  net-snmp-utils  net-snmp-devel  ruby ruby-devel  gcc


[root@CentOS6 ~]# vim /etc/snmp/snmpd.conf 

62行的systemview改为all

修改前 access  notConfigGroup ""      any       noauth    exact  systemview none none

修改后 access  notConfigGroup ""      any       noauth    exact  all none none


85行的#号去掉

修改前 #view all    included  .1                               80

修改后 view all    included  .1                               80


启动相关服务

[root@CentOS6 ~]# service snmpd start

[root@CentOS6 ~]# service httpd start

[root@CentOS6 ~]# service mysqld start


设置开启启动

[root@CentOS6 ~]# chkconfig snmpd on

[root@CentOS6 ~]# chkconfig httpd on

[root@CentOS6 ~]# chkconfig mysqld on



2.2、安装第三方yum源和RRDtool

[root@CentOS6 ~]#rpm -ivh ftp://ftp.pbone.net/mirror/ftp5.gwdg.de/pub/opensuse/repositories/home:/smite:/repo-repo/CentOS_CentOS-6/i686/rpmforge-release-0.5.3-1.1.i686.rpm

[root@CentOS6 ~]# yum -y install rrdtool-* 


2.3、CACTI安装

[root@CentOS6 ~]# mkdir cacti

[root@CentOS6 ~]# cd cacti/

[root@CentOS6 cacti]# wget http://www.cacti.net/downloads/cacti-0.8.8h.tar.gz

[root@CentOS6 cacti]# tar -zxvf cacti-0.8.8h.tar.gz -C /var/www/html/

[root@CentOS6 cacti]# cd /var/www/html/

[root@CentOS6 html]# mv cacti-0.8.8h/ cacti


2.4、MYSQL配置

[root@CentOS6 html]# useradd cacti

[root@CentOS6 html]# echo "cacti" | passwd --stdin cacti


[root@CentOS6 html]# mysql

mysql> create database cacti;

mysql> grant all privileges on cacti.* to cacti@localhost identified by ‘cacti‘;

mysql> grant all privileges on cacti.* to cacti@192.168.137.3 identified by ‘cacti‘; 

mysql> flush privileges; 

mysql> \q


2.5、CACTI配置

[root@CentOS6 html]# crontab -e

*/1 * * * * php /var/www/html/cacti/poller.php >/dev/null 2>&1


[root@CentOS6 html]# mysql -ucacti -pcacti cacti </var/www/html/cacti/cacti.sql

[root@CentOS6 html]#  cd /var/www/html/cacti/ 

[root@CentOS6 cacti]# chown -R root.root *


[root@CentOS6 cacti]# vim /var/www/html/cacti/include/config.php

$database_type = "mysql";

$database_default = "cacti";

$database_hostname = "localhost";

$database_username = "cacti";

$database_password = "cacti";

$database_port = "3306";

$database_ssl = false;


2.6、同步时钟

[root@CentOS6 ~]# yum -y install ntp

[root@CentOS6 ~]# ln -sf /usr/share/zoneinfo/Asia/Shanghai    /etc/localtime


[root@CentOS6 ~]# crontab -e

*/1 * * * * php /var/www/html/cacti/poller.php >/dev/null 2>&1

*/1 * * * * /usr/sbin/ntpdate asia.pool.ntp.org >/dev/null 2>&1


3、配置交换机

en

conf t

interface Vlan1

ip address 192.168.137.2 255.255.255.0

no shut

ip route 0.0.0.0 0.0.0.0 192.168.137.1

snmp-server community cacti RO


4、cacti初始化

技术分享

技术分享

技术分享

技术分享

技术分享


5、caci监控交换机端口流量

技术分享

技术分享

技术分享

技术分享

技术分享

技术分享

技术分享

技术分享

技术分享



本文出自 “开源殿堂” 博客,请务必保留此出处http://kaiyuandiantang.blog.51cto.com/10699754/1870059

1、Cacti配置安装、监控Cisco交换机

标签:1、cacti配置安装、监控cisco交换机

原文地址:http://kaiyuandiantang.blog.51cto.com/10699754/1870059

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!