Chinaunix首页 | 论坛 | 博客
  • 博客访问: 5273553
  • 博文数量: 1144
  • 博客积分: 11974
  • 博客等级: 上将
  • 技术积分: 12312
  • 用 户 组: 普通用户
  • 注册时间: 2005-04-13 20:06
文章存档

2017年(2)

2016年(14)

2015年(10)

2014年(28)

2013年(23)

2012年(29)

2011年(53)

2010年(86)

2009年(83)

2008年(43)

2007年(153)

2006年(575)

2005年(45)

分类: LINUX

2009-08-16 22:21:42

rrdtool_1.3.7 安装

rrdtool 介绍
()
RRDtool是指Round Robin Database 工具(环状数据库)。Round robin是一种处理定量数据、以及当前元素指针的技术。想象一个周边标有点的圆环--这些点就是时间存储的位置。从圆心画一条到圆周的某个点的箭头--这就是指针。就像我们在一个圆环上一样,没有起点和终点,你可以一直往下走下去。过来一段时间,所有可用的位置都会被用过,该循环过程会自动重用原来的位置。这样,数据集不会增大,并且不需要维护。
RRDtool源自MRTG(多路由器流量绘图器)。MRTG是有一个大学连接到互联网链路的使用率的小脚本开始的。MRTG后来被当作绘制其他数据源的工具使用,包括温度、速度、电压、输出量等等。

参考地址
RRDtool中英文翻译使用手册


rrdtool 教學


安装注意
在安装rrdtool时需要cairo包的支持,而cairo又需要pkg-config、glib、pixman、pang、freetype、fontconfig包的支持
支持包下载地址


前面安装失败记录
http://blog.c1gstudio.com/archives/446

下载完rrdtool解压后可以查看它的安装文档

tar zxvf rrdtool-1.3.7.tar.gz
cat rrdtool-1.3.7/doc/rrdbuild.txt

开始安装
设置环境变量
安装临时目录为/tmp/rrdbuild,安装目录为/usr/local/rrdtool

export BUILD_DIR=/tmp/rrdbuild 
export INSTALL_DIR=/usr/local/rrdtool 
  
mkdir -p $BUILD_DIR 
cd $BUILD_DIR 
  
export CFLAGS="-O3 -fPIC" 
export LDFLAGS="-Wl,--rpath -Wl,${INSTALL_DIR}/lib" 
  
export PKG_CONFIG_PATH=${INSTALL_DIR}/lib/pkgconfig 
export PATH=$INSTALL_DIR/bin:$PATH 
  
export PKG_CONFIG=$INSTALL_DIR/bin/pkg-config
cd $BUILD_DIR 
  
        wget -c  
        tar zxvf rrdtool-1.3.7.tar.gz 
  
        wget 
        tar zxvf pkg-config-0.23.tar.gz 
        cd pkg-config-0.23 
        ./configure --prefix=$INSTALL_DIR 
        make 
        make install 
  
        cd $BUILD_DIR 
        wget zlib-1.2.3.tar.gz 
        tar zxvf zlib-1.2.3.tar.gz 
        cd zlib-1.2.3 
        ./configure --prefix=$INSTALL_DIR --shared 
        make 
        make install 
  
        cd $BUILD_DIR 
        wget libpng-1.2.18.tar.gz 
        tar zxvf libpng-1.2.18.tar.gz 
        cd libpng-1.2.18 
        ./configure --prefix=$INSTALL_DIR 
        make 
        make install 
  
  
        cd $BUILD_DIR 
        wget freetype-2.3.5.tar.gz 
        tar zxvf freetype-2.3.5.tar.gz 
        cd freetype-2.3.5 
        ./configure --prefix=$INSTALL_DIR CFLAGS="-O3 -fPIC" 
        make 
        make install 
  
  
        cd $BUILD_DIR 
        wget libxml2-2.6.32.tar.gz 
        tar zxvf libxml2-2.6.32.tar.gz 
        cd libxml2-2.6.32 
        ./configure --prefix=$INSTALL_DIR 
        make 
        make install 
  
  
        cd $BUILD_DIR 
        wget fontconfig-2.4.2.tar.gz 
        tar zxvf fontconfig-2.4.2.tar.gz 
        cd fontconfig-2.4.2 
        ./configure --prefix=$INSTALL_DIR --with-freetype-config=$INSTALL_DIR/bin/freetype-config 
        make 
        make install 
  
  
        cd $BUILD_DIR 
        wget pixman-0.10.0.tar.gz 
        tar zxvf pixman-0.10.0.tar.gz 
        cd pixman-0.10.0 
        ./configure --prefix=$INSTALL_DIR 
        make 
        make install 
  
  
        cd $BUILD_DIR 
        wget cairo-1.6.4.tar.gz 
        tar zxvf cairo-1.6.4.tar.gz 
        cd cairo-1.6.4 
        ./configure --prefix=$INSTALL_DIR \ 
           --enable-xlib=no \ 
           --enable-xlib-render=no \ 
           --enable-win32=no 
        make 
        make install 
  
  
        cd $BUILD_DIR 
        wget glib-2.15.4.tar.gz 
        tar zxvf glib-2.15.4.tar.gz 
        cd glib-2.15.4 
        ./configure --prefix=$INSTALL_DIR 
        make 
        make install

#gconvert.c:51:2: #error GNU libiconv not in use but included iconv.h is from libiconv
需带上--with-libiconv 

cd $BUILD_DIR 
        wget pango-1.21.1.tar.bz2 
        bunzip2 pango-1.21.1.tar.bz2 
        tar xf pango-1.21.1.tar 
        cd pango-1.21.1 
        ./configure --prefix=$INSTALL_DIR --without-x 
        make 
        make install 
  
        cd $BUILD_DIR/rrdtool-1.3.7 
        ./configure --prefix=$INSTALL_DIR --disable-tcl --disable-python

#和nagios结合时增下下面参数
--with-rrdtool=/usr/local/rrdtool/bin/rrdtool --with-perfdata-dir=/usr/local/nagios/share/perfdata 

Find 3rd-Party Libraries 
checking for cairo_font_options_create in -lcairo... no 
checking for pkg-config... pkg-config 
configure: WARNING: 
---------------------------------------------------------------------------- 
* I found a copy of pkgconfig, but there is no cairo-png.pc file around. 
  You may want to set the PKG_CONFIG_PATH variable to point to its 
  location. 
---------------------------------------------------------------------------- 
  
configure: WARNING: 
---------------------------------------------------------------------------- 
* I could not find a working copy of cairo-png. Check config.log for hints on why 
  this is the case. Maybe you need to set LDFLAGS and CPPFLAGS appropriately 
  so that compiler and the linker can find libcairo and its header files. If 
  you have not installed cairo-png, you can get it either from its original home on 
  
     
  
  You can find also find an archive copy on 
  
     
  
  The last tested version of cairo-png is 1.4.6. 
  
       LIBS=-lm 
   LDFLAGS= 
  CPPFLAGS= 
  
---------------------------------------------------------------------------- 
                 
checking for cairo_svg_surface_create in -lcairo... no 
checking for pkg-config... (cached) pkg-config

有以上信息请检查cairo安装和环境变量

checking in... and out again 
ordering CD from ) 
  
---------------------------------------------------------------- 
Config is DONE! 
  
          With MMAP IO: yes 
      Build rrd_getopt: no 
       Static programs: no 
          Perl Modules: perl_piped perl_shared 
           Perl Binary: /usr/bin/perl 
          Perl Version: 5.8.5 
          Perl Options: PREFIX=$(DESTDIR)/usr/local/rrdtool
LIB=$(DESTDIR)/usr/local/rrdtool/lib/perl/5.8.5 
          Ruby Modules: 
           Ruby Binary: no 
          Ruby Options: sitedir=$(DESTDIR)/usr/local/rrdtool/lib/ruby 
    Build Tcl Bindings: no 
 Build Python Bindings: no 
          Build rrdcgi: yes 
       Build librrd MT: yes 
     Link with libintl: yes 
  
             Libraries: -lxml2 -lcairo -lcairo -lcairo -lm  -lcairo -lpng12   -lpangocairo-1.0 -lpango-1.0 -lcairo -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0  
  
Type 'make' to compile the software and use 'make install' to 
install everything to: /usr/local/rrdtool. 
  
       ... that wishlist is NO JOKE. If you find RRDtool useful 
make me happy. Go to 
place an order.

出现以上信息表明离成功不远了哈。

make 
make install
阅读(2695) | 评论(0) | 转发(0) |
0

上一篇:牛人写的 samba

下一篇:网络流量监控

给主人留下些什么吧!~~