LINUX技术讨论区
时间:2009-03-23 来源:sjhf
<link style="font-family: SimSun;" rel="File-List" href="file:///C:%5CDOCUME%7E1%5CADMINI%7E1%5CLOCALS%7E1%5CTemp%5Cmsohtml1%5C01%5Cclip_filelist.xml"><link style="font-family: SimSun;" rel="Edit-Time-Data" href="file:///C:%5CDOCUME%7E1%5CADMINI%7E1%5CLOCALS%7E1%5CTemp%5Cmsohtml1%5C01%5Cclip_editdata.mso">
CACTI网络监控安装与使用手册
一. CACTI介绍
cacti其实是一套php程序,它运用snmpget采集数据,使用rrdtool绘图,使用CACTI,能对大型网络内的PC,SERVER,网络设备的流量,内存,CUP,磁盘空间进行集中化的管理,安装和应用都比较简单。
二.CACTI的安装需求 首先,我们在安装的过程中需要具有以下安装包
操作系统:REDHAT AS4.0
数据库:Mysql4.17或以上
Web_server::apache 2.0以上版本
WEB语言:PHP4.3.10以上版本
绘图工具:RRDTOOL
数据采集:net-snmp
三.安装步骤
以下我是通过编译的办法安装所有所需的软件包,大家可能要问为什么不直接通过RPM包进行安装,因为我个人觉得,通过RPM包安装虽然快捷,不过不利于管理,因此我还是选择了编译的办法。
首先把所有的安装包下载来存放在/CACTI的目录下,便于管理安装包
下面我们开始mysql数据库的安装
命令格式如下:
cd /cacti
tar -zxvf mysql*
cd mysql*
./configure --prefix=/usr/local/mysql
Make
make install
groupadd mysql
useradd -g mysql mysql
scripts/mysql_install_db
chown -R root /usr/local/mysql
chown -R mysql /usr/local/mysql/var
chgrp -R mysql /usr/local/mysql
rm -f /etc/my.cnf
cp support-files/my-medium.cnf /etc/my.cnf
(如果不复制该文件,则无法启动mysql服务)
echo /usr/local/mysql/lib/mysql >> /etc/ld.so.conf
echo /usr/local/lib >> /etc/ld.so.conf
ldconfig –v
cp support-files/mysql.server /etc/init.d/mysql
/usr/local/mysql/bin/mysqld_safe --user=mysql &
cd /etc/rc3.d/
ln -s ../init.d/mysql S85mysql
ln -s ../init.d/mysql K85mysql
cd /etc/rc5.d/
ln -s ../init.d/mysql S85mysql
ln -s ../init.d/mysql K85mysql
cd /etc/init.d/
chmod 755 mysql
然后我们开始安装apache
命令格式如下:
cd /cacti
tar -zxvf httpd*
cd httpd*
./configure --prefix=/usr/local/http
Make
make install
cd /usr/local/http/bin
cp apachectl /etc/init.d/httpd
cd /etc/rc3.d/
ln -s ../init.d/httpd S85httpd
ln -s ../init.d/httpd K85httpd
cd /etc/rc5.d/
ln -s ../init.d/httpd S85httpd
ln -s ../init.d/httpd K85httpd
/usr/local/http/bin/apachectl start
最重要的一步,安装PHP
命令格式:
cd /cacti
tar -zxvf php*
cd php*
./configure --prefix=/usr/local/php --with-apxs2=/usr/local/http/bin/apxs --with-config-filepath=/Usr/local/php --enable-sockets --with-mysql=/usr/local/mysql --with-zlibdir=/usr/include –with-gd
Make
make install(如果编译不成功,那还需继续找原因排错,直到编译成功为止,一般不成功的原因肯定都是缺少php的依存套间或者动态连接库,再者是路径指向错误)
|