Linux平台下构建流量和性能检测系统

pwl 2010-08-10

一. 配置被检测端(snmpd)

1.1 安装net-snmp软件包
[root@fel ~]# mount /dev/cdrom /media/
mount: block device /dev/cdrom is write-protected, mounting read-only
[root@fel ~]# cd /media/Server/
[root@fel Server]# rpm -ivh lm_sensors-2.10.0-3.1.i386.rpm
warning: lm_sensors-2.10.0-3.1.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
error: failed to stat /media/zidong: No such file or directory
Preparing...                ########################################### [100%]
   1:lm_sensors             ########################################### [100%]
[root@fel Server]# rpm -ivh net-snmp-5.3.1-14.el5.i386.rpm
warning: net-snmp-5.3.1-14.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
error: failed to stat /media/zidong: No such file or directory
Preparing...                ########################################### [100%]
   1:net-snmp               ########################################### [100%]
[root@localhost Server]# rpm -ivh net-snmp-utils-5.3.1-14.el5.i386.rpm
warning: net-snmp-utils-5.3.1-14.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing...                ########################################### [100%]
   1:net-snmp-utils         ########################################### [100%]

1.2 配置及启动SNMP服务

[root@fel Server]# vim /etc/snmp/snmpd.conf
--------------------------------------------
com2sec notConfigUser 192.168.1.3        publicsvr    //修改监听服务器地址(第41行)

access notConfigGroup ""      any       noauth    exact all none none     //将SystemView修改为all或read

view all    included .1                               80                                                   //取消第85行注释符号

---------------------------------------------
[root@fel Server]# service snmpd start                                                //启动服务
[root@fel Server]# chkconfig --level 35 snmpd on     //设置自启动

二. 配置监听服务端(cacti)

2.1 安装Apache;MySQL;PHP网站平台支持安装以下软件包(如果安装过程中严重涉及依赖关系,我们可提前安装YUM源;以下为所必须的软件包
[root@fel Server]# rpm -ivh httpd-2.2.3-6.el5.i386.rpm
[root@localhost Server]# rpm -ivh mysql-5.0.22-2.1.i386.rpm
[root@localhost Server]# rpm -ivh mysql-server-5.0.22-2.1.i386.rpm
[root@localhost Server]# rpm -ivh mysql-connector-odbc-3.51.12-2.2.i386.rpm
[root@localhost Server]# rpm -ivh php-5.1.6-5.el5.i386.rpm
[root@localhost Server]# rpm -ivh php-mysql-5.1.6-5.el5.i386.rpm
[root@localhost Server]# rpm -ivh php-common-5.1.6-5.el5.i386.rpm
[root@localhost Server]# rpm -ivh php-pdo-5.1.6-5.el5.i386.rpm

2.2 启动服务并设置自启动

[root@fel ~]# service httpd start
[root@fel ~]# service mysqld start
[root@fel ~]# chkconfig --level 35 httpd on
[root@fel ~]# chkconfig --level 35 mysqld on

2.3 编译安装rrdtool软件包

[root@localhost ~]# tar zxvf rrdtool-1.3.0.tar.gz   (下载地址http://down1.chinaunix.net/distfiles/rrdtool-1.3.0.tar.gz)
[root@localhost ~]# cd rrdtool-1.3.0
[root@fel rrdtool-1.3.0]# ./configure --prefix=/usr/local
[root@fel rrdtool-1.3.0]# make && make install

相关推荐