在一些监控软件中需要借助rrdtool绘图,然后安装rrdtool这个画图工具的时候经常报错,下面就简单说明下安装步骤(RHEL5.5 32bit)。
1. 下载并安装pkg-config
- export PREFIX=/usr/local/rrdtool
- export CFLAGS=“-O3 -fPIC”
- export LDFLAGS=“-Wl,–rpath -Wl,${PREFIX}/lib”
- export PKG_CONFIG_PATH=${PREFIX}/lib/pkgconfig
- tar zxvf pkg-config-0.23.tar.gz
- cd pkg-config-0.23
- ./configure –prefix=$PREFIX
- make && make install
- cd ..
2. 下载并安装zlib、libpng、freetype、libxml2、fontconfig
- tar zxvf zlib-1.2.3.tar.gz
- cd zlib-1.2.3
- ./configure –prefix=$PREFIX
- make && make install
- cd ..
- tar zxvf libpng-1.2.18.tar.gz
- cd libpng-1.2.18
- ./configure –prefix=$PREFIX
- make && make install
- cd ..
- tar zxvf freetype-2.3.5.tar.gz
- cd freetype-2.3.5
- ./configure –prefix=$PREFIX
- make && make install
- cd ..
- tar zxvf libxml2-2.6.3.tar.gz
- cd libxml2-2.6.3
- ./configure –prefix=$PREFIX
- make && make install
- cd ..
- tar zxvf fontconfig-2.4.2.tar.gz
- cd fontconfig-2.4.2
- ./configure –prefix=$PREFIX –with-freetype-config=$PREFIX/bin/freetype-config –with-expat-lib=/usr/lib
- make && make install
- cd ..
3. 下载并安装pixman、cairo、glib、pango
- tar zxvf pixman-0.10.0.tar.gz
- cd pixman-0.10.0
- ./configure –prefix=$PREFIX
- make && make install
- cd ..
- tar zxvf cairo-1.6.4.tar.gz
- cd cairo-1.6.4
- ./configure –prefix=$PREFIX –enable-xlib=no –enable-xlib-render=no –enable-win32=no
- make && make install
- cd ..
- tar zxvf glib-2.15.4.tar.gz
- cd glib-2.15.4
- ./configure –prefix=$PREFIX
- make && make install
- cd ..
- tar zxvf pango-1.21.1.tar.gz
- cd pango-1.21.1
- ./configure –prefix=$PREFIX –without-x
- make && make install
- cd ..
4. 下载并安装rrdtool
- tar xzvf rrdtool-1.3.8.tar.gz
- cd rrdtool-1.3.8
- ./configure –prefix=$PREFIX
- make && make install
- cd ..