在redhat as4 上安装rrdtool
1.设置变量:
#mkdir /opt/rrdtool-1.4.4
export INSTALL_DIR=/opt/rrdtool-1.4.4
尝试安装:
wget http://oss.oetiker.ch/rrdtool/pub/rrdtool-1.4.4.tar.gz
gunzip -c rrdtool-1.4.4.tar.gz | tar xf -
cd rrdtool-1.4.4
./configure --prefix=$INSTALL_DIR && make && make install
Ok, this was very optimistic. This try will probably have ended with
configure complaining about several missing libraries.
2.若失败,尝试安装依赖包:
2.1 先设置变量:
export PKG_CONFIG_PATH=${INSTALL_DIR}/lib/pkgconfig
export PATH=$INSTALL_DIR/bin:$PATH
export LDFLAGS="-Wl,--rpath -Wl,${INSTALL_DIR}/lib"
2.2 安装 pkgconfig
wget http://pkgconfig.freedesktop.org/releases/pkg-config-0.23.tar.gz
gunzip -c pkg-config-0.23.tar.gz | tar xf -
cd pkg-config-0.23
./configure --prefix=$INSTALL_DIR CFLAGS="-O3 -fPIC"
$MAKE
$MAKE install
安装完之后,再设置变量:
export PKG_CONFIG=$INSTALL_DIR/bin/pkg-config
2.3 安装 zlib
wget http://oss.oetiker.ch/rrdtool/pub/libs/zlib-1.2.3.tar.gz
gunzip -c zlib-1.2.3.tar.gz | tar xf -
cd zlib-1.2.3
env CFLAGS="-O3 -fPIC" ./configure --prefix=$INSTALL_DIR --shared
$MAKE
$MAKE install
2.4 安装 libpng
wget http://oss.oetiker.ch/rrdtool/pub/libs/libpng-1.2.18.tar.gz
gunzip -c libpng-1.2.18.tar.gz | tar xf -
cd libpng-1.2.10
env CFLAGS="-O3 -fPIC" ./configure --prefix=$INSTALL_DIR
$MAKE
$MAKE install
2.5 安装 freetype
wget http://oss.oetiker.ch/rrdtool/pub/libs/freetype-2.3.5.tar.gz
gunzip -c freetype-2.3.5.tar.gz | tar xf -
cd freetype-2.3.5
./configure --prefix=$INSTALL_DIR CFLAGS="-O3 -fPIC"
$MAKE
$MAKE install
2.6 安装 LibXML2
wget http://oss.oetiker.ch/rrdtool/pub/libs/libxml2-2.6.32.tar.gz
gunzip -c libxml2-2.6.32.tar.gz | tar xf -
cd libxml2-2.6.32
./configure --prefix=$INSTALL_DIR CFLAGS="-O3 -fPIC"
$MAKE
$MAKE install
2.7 安装 fontconfig
wget http://oss.oetiker.ch/rrdtool/pub/libs/fontconfig-2.4.2.tar.gz
gunzip -c fontconfig-2.4.2.tar.gz | tar xf -
cd fontconfig-2.4.2
./configure --prefix=$INSTALL_DIR CFLAGS="-O3 -fPIC" --with-freetype-config=$INSTALL_DIR/bin/freetype-config
$MAKE
$MAKE install
2.8 安装 Pixman
wget http://oss.oetiker.ch/rrdtool/pub/libs/pixman-0.10.0.tar.gz
gunzip -c pixman-0.10.0.tar.gz | tar xf -
cd pixman-0.10.0
./configure --prefix=$INSTALL_DIR CFLAGS="-O3 -fPIC"
$MAKE
$MAKE install
2.9 安装 Cairo
wget http://oss.oetiker.ch/rrdtool/pub/libs/cairo-1.6.4.tar.gz
gunzip -c cairo-1.6.4.tar.gz | tar xf -
cd cairo-1.6.4
./configure --prefix=$INSTALL_DIR \
--enable-xlib=no \
--enable-xlib-render=no \
--enable-win32=no \
CFLAGS="-O3 -fPIC"
$MAKE
$MAKE install
configure: error: pixman >= 0.10.0 is required
从pixman安装包内复制pixman-1.pc 至 /usr/lib/pkgconfig/
然后在进行cairo的安装
2.10 安装 Glib
wget http://oss.oetiker.ch/rrdtool/pub/libs/glib-2.15.4.tar.gz
gunzip -c glib-2.15.4.tar.gz | tar xf -
cd glib-2.15.4
./configure --prefix=$INSTALL_DIR CFLAGS="-O3 -fPIC"
$MAKE
$MAKE install
2.11 安装 Pango
wget http://oss.oetiker.ch/rrdtool/pub/libs/pango-1.21.1.tar.bz2
bunzip2 -c pango-1.21.1.tar.bz2 | tar xf -
cd pango-1.21.1
./configure --prefix=$INSTALL_DIR CFLAGS="-O3 -fPIC" --without-x
$MAKE
$MAKE install
2.12 再次尝试安装rrdtool
./configure --prefix=$INSTALL_DIR --disable-tcl --disable-python
若在此遇到I found a copy of pkgconfig, but there is no cairo-png.pc file around.的错误,则先export PKG_CONFIG_PATH=${INSTALL_DIR}/lib/pkgconfig即可。
$MAKE clean
$MAKE
若在此遇到cc1: invalid option `tune=pentium4'错误则可修改./rrdtool-1.4.4/bindings/perl-shared/Makefile文件,
去掉-mtune=pentium4,然后继续运行make,注意 不要make clean再make。
$MAKE install
至此成功安装完毕。
1.设置变量:
#mkdir /opt/rrdtool-1.4.4
export INSTALL_DIR=/opt/rrdtool-1.4.4
尝试安装:
wget http://oss.oetiker.ch/rrdtool/pub/rrdtool-1.4.4.tar.gz
gunzip -c rrdtool-1.4.4.tar.gz | tar xf -
cd rrdtool-1.4.4
./configure --prefix=$INSTALL_DIR && make && make install
Ok, this was very optimistic. This try will probably have ended with
configure complaining about several missing libraries.
2.若失败,尝试安装依赖包:
2.1 先设置变量:
export PKG_CONFIG_PATH=${INSTALL_DIR}/lib/pkgconfig
export PATH=$INSTALL_DIR/bin:$PATH
export LDFLAGS="-Wl,--rpath -Wl,${INSTALL_DIR}/lib"
2.2 安装 pkgconfig
wget http://pkgconfig.freedesktop.org/releases/pkg-config-0.23.tar.gz
gunzip -c pkg-config-0.23.tar.gz | tar xf -
cd pkg-config-0.23
./configure --prefix=$INSTALL_DIR CFLAGS="-O3 -fPIC"
$MAKE
$MAKE install
安装完之后,再设置变量:
export PKG_CONFIG=$INSTALL_DIR/bin/pkg-config
2.3 安装 zlib
wget http://oss.oetiker.ch/rrdtool/pub/libs/zlib-1.2.3.tar.gz
gunzip -c zlib-1.2.3.tar.gz | tar xf -
cd zlib-1.2.3
env CFLAGS="-O3 -fPIC" ./configure --prefix=$INSTALL_DIR --shared
$MAKE
$MAKE install
2.4 安装 libpng
wget http://oss.oetiker.ch/rrdtool/pub/libs/libpng-1.2.18.tar.gz
gunzip -c libpng-1.2.18.tar.gz | tar xf -
cd libpng-1.2.10
env CFLAGS="-O3 -fPIC" ./configure --prefix=$INSTALL_DIR
$MAKE
$MAKE install
2.5 安装 freetype
wget http://oss.oetiker.ch/rrdtool/pub/libs/freetype-2.3.5.tar.gz
gunzip -c freetype-2.3.5.tar.gz | tar xf -
cd freetype-2.3.5
./configure --prefix=$INSTALL_DIR CFLAGS="-O3 -fPIC"
$MAKE
$MAKE install
2.6 安装 LibXML2
wget http://oss.oetiker.ch/rrdtool/pub/libs/libxml2-2.6.32.tar.gz
gunzip -c libxml2-2.6.32.tar.gz | tar xf -
cd libxml2-2.6.32
./configure --prefix=$INSTALL_DIR CFLAGS="-O3 -fPIC"
$MAKE
$MAKE install
2.7 安装 fontconfig
wget http://oss.oetiker.ch/rrdtool/pub/libs/fontconfig-2.4.2.tar.gz
gunzip -c fontconfig-2.4.2.tar.gz | tar xf -
cd fontconfig-2.4.2
./configure --prefix=$INSTALL_DIR CFLAGS="-O3 -fPIC" --with-freetype-config=$INSTALL_DIR/bin/freetype-config
$MAKE
$MAKE install
2.8 安装 Pixman
wget http://oss.oetiker.ch/rrdtool/pub/libs/pixman-0.10.0.tar.gz
gunzip -c pixman-0.10.0.tar.gz | tar xf -
cd pixman-0.10.0
./configure --prefix=$INSTALL_DIR CFLAGS="-O3 -fPIC"
$MAKE
$MAKE install
2.9 安装 Cairo
wget http://oss.oetiker.ch/rrdtool/pub/libs/cairo-1.6.4.tar.gz
gunzip -c cairo-1.6.4.tar.gz | tar xf -
cd cairo-1.6.4
./configure --prefix=$INSTALL_DIR \
--enable-xlib=no \
--enable-xlib-render=no \
--enable-win32=no \
CFLAGS="-O3 -fPIC"
$MAKE
$MAKE install
configure: error: pixman >= 0.10.0 is required
从pixman安装包内复制pixman-1.pc 至 /usr/lib/pkgconfig/
然后在进行cairo的安装
2.10 安装 Glib
wget http://oss.oetiker.ch/rrdtool/pub/libs/glib-2.15.4.tar.gz
gunzip -c glib-2.15.4.tar.gz | tar xf -
cd glib-2.15.4
./configure --prefix=$INSTALL_DIR CFLAGS="-O3 -fPIC"
$MAKE
$MAKE install
2.11 安装 Pango
wget http://oss.oetiker.ch/rrdtool/pub/libs/pango-1.21.1.tar.bz2
bunzip2 -c pango-1.21.1.tar.bz2 | tar xf -
cd pango-1.21.1
./configure --prefix=$INSTALL_DIR CFLAGS="-O3 -fPIC" --without-x
$MAKE
$MAKE install
2.12 再次尝试安装rrdtool
./configure --prefix=$INSTALL_DIR --disable-tcl --disable-python
若在此遇到I found a copy of pkgconfig, but there is no cairo-png.pc file around.的错误,则先export PKG_CONFIG_PATH=${INSTALL_DIR}/lib/pkgconfig即可。
$MAKE clean
$MAKE
若在此遇到cc1: invalid option `tune=pentium4'错误则可修改./rrdtool-1.4.4/bindings/perl-shared/Makefile文件,
去掉-mtune=pentium4,然后继续运行make,注意 不要make clean再make。
$MAKE install
至此成功安装完毕。