tryhl 2011-05-12
1. 安装rrdtool
1.1. 安装依赖包
? 拷贝CentOS软件包
一般CentOS有两张盘,一张系统盘,另一张是软件盘。将软件盘中CentOS文件夹及以下内容拷贝到/root/下,以备使用。
? 安装zlib开发包
rpm -ivh /root/CentOS/zlib-devel-1.2.3-3.x86_64.rpm
? 安装freetype开发包:
rpm -ivh /root/CentOS/freetype-devel-2.2.1-21.el5_3.x86_64.rpm
? 安装libart开发包:
rpm -ivh /root/CentOS/libart_lgpl-devel-2.3.17-4.x86_64.rpm
? 安装libpng开发包:
rpm -ivh /root/CentOS/libpng-devel-1.2.10-7.1.el5_3.2.x86_64.rpm
1.2. 安装rrdtool
? 准备rrdtool源码包
rrdtool-1.2.27.tar
tar zxvf rrdtool-1.2.27.tar
cd rrdtool-1.2.27
? 编译安装
./configure –prefix=/usr/local/rrdtool
make
make install
? 验证是否安装成功
运行命令/usr/local/rrdtool/bin/rrdtool
如果出现以下文字说明安装成功:
? 可能出现的问题
pkg-config找不到lib包,不用纠结于pkg-config,一定是某些lib没装好。
在configure rrdtool时会提升哪些包未装好,记得安装这些lib的源码包
2. 安装ganglia
2.1. 安装依赖软件
ganglia依赖以下软件:、
expat-2.0.1.tar.gz,apr-1.3.2.tar.bz2,apr-util-1.3.2.tar.bz2, confuse-2.6.tar.gz
? 安装expat-2.0.1.tar
tar zxvf expat-2.0.1.tar.gz
./configure --prefix=/usr/local/expat
make
make install
mkdir /usr/local/expat/lib64
cp -a /usr/local/expat/lib/* /usr/local/expat/lib64/
32位操作系统不用做上面两步
? 安装apr-1.3.2.tar.bz2
tar xvjf apr-1.3.2.tar.bz2
./configure –prefix=/usr/local/apr
make
make install
? 安装apr-util-1.3.2.tar.bz2
Tar xvjf apr-1.3.2.tar.bz2
./configure –with-apr=/usr/local/apr –with-expat=/usr/local/expat
make
make install
cp /usr/local/apr/include/apr-1/* /usr/local/apr/include/
因为ganglia安装时默认会去/usr/local/apr/include下寻找apr的库文件
mkdir /usr/local/apr/lib64
cp -a /usr/local/apr/lib/* /usr/local/apr/lib64/
32位操作系统不用做上面两步
? 安装confuse-2.6.tar.gz
tar zxvf confuse-2.6.tar.gz
./configure CFLAGS=-Fpic –disable-nls –prefix=/usr/local/confuse
make
make install
mkdir /usr/local/confuse/lib64
cp -a /usr/local/confuse/lib/* /usr/local/confuse/lib64/
32位操作系统不用做上面两步