在一些监控软件中需要借助rrdtool绘图,然后安装rrdtool这个画图工具的时候经常报错,下面就简单说明下安装步骤(RHEL5.5 32bit)。
1. 下载并安装pkg-config:http://pkgconfig.freedesktop.org/releases/pkg-config-0.23.tar.gz
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:http://sourceforge.net/projects/libpng/files/libpng12/older-releases/1.2.18/libpng-1.2.18.tar.gz/download、freetype:http://sourceforge.net/projects/freetype/files/freetype2/2.3.5/freetype-2.3.5.tar.gz、libxml2:http://xmlsoft.org/sources/old/libxml2-2.6.3.tar.gz、fontconfig:http://www.freedesktop.org/software/fontconfig/release/fontconfig-2.4.2.tar.gz
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:http://cairographics.org/releases/pixman-0.10.0.tar.gz、cairo:http://cairographics.org/releases/cairo-1.6.4.tar.gz、glib:http://ftp.gnome.org/pub/gnome/sources/glib/2.15/glib-2.15.4.tar.gz、pango:http://ftp.gnome.org/pub/GNOME/sources/pango/1.21/pango-1.21.1.tar.gz
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:http://oss.oetiker.ch/rrdtool/pub/rrdtool-1.3.8.tar.gz
tar xzvf rrdtool-1.3.8.tar.gz
cd rrdtool-1.3.8
./configure --prefix=$PREFIX
make && make install
cd ..