rrdtool 1.3.7 安裝

 備註只所以升級rrdtool版本,是因爲據說rrdtool 1.3x 以下安裝cacti會出現中文亂碼(SuSe 10 測試通過)

rrdtool 介紹

(http://www.rrdtool.org)
RRDtool是指Round Robin Database 工具(環狀數據庫)。Round robin是一種處理定量數據、以及當前元素指針的技術。想象一個周邊標有點的圓環--這些點就是時間存儲的位置。從圓心畫一條到圓周的某個點的箭頭--這就是指針。就像我們在一個圓環上一樣,沒有起點和終點,你可以一直往下走下去。過來一段時間,所有可用的位置都會被用過,該循環過程會自動重用原來的位置。這樣,數據集不會增大,並且不需要維護。
RRDtool源自MRTG(多路由器流量繪圖器)。MRTG是有一個大學連接到互聯網鏈路的使用率的小腳本開始的。MRTG後來被當作繪製其他數據源的工具使用,包括溫度、速度、電壓、輸出量等等。

參考地址
RRDtool中英文翻譯使用手冊

http://leftleg.hzpub.com/post/634/

rrdtool 教學

http://www.study-area.org/tips/rrdtool/rrdtool.html

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

http://oss.oetiker.ch/rrdtool/pub/libs/

前面安裝失敗記錄

http://blog.c1gstudio.com/archives/446

下載完rrdtool解壓後可以查看它的安裝文檔

http://oss.oetiker.ch/rrdtool/pub/rrdtool-1.3.7.tar.gz

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

開始安裝
設置環境變量
安裝臨時目錄爲/tmp/rrdbuild,安裝目錄爲/usr/local/rrdtool

  1. export BUILD_DIR=/tmp/rrdbuild
  2. export INSTALL_DIR=/usr/local/rrdtool
  3.  
  4. mkdir -p $BUILD_DIR
  5. cd $BUILD_DIR
  6.  
  7. export CFLAGS="-O3 -fPIC"
  8. export LDFLAGS="-Wl,--rpath -Wl,${INSTALL_DIR}/lib"
  9.  
  10. export PKG_CONFIG_PATH=${INSTALL_DIR}/lib/pkgconfig
  11. export PATH=$INSTALL_DIR/bin:$PATH
  12.  
  13. export PKG_CONFIG=$INSTALL_DIR/bin/pkg-config
  1. cd $BUILD_DIR
  2.  
  3.         wget -c http://oss.oetiker.ch/rrdtool/pub/rrdtool-1.3.7.tar.gz
  4.         tar zxvf rrdtool-1.3.7.tar.gz
  5.  
  6.         wget http://pkgconfig.freedesktop.org/releases/pkg-config-0.23.tar.gz
  7.         tar zxvf pkg-config-0.23.tar.gz
  8.         cd pkg-config-0.23
  9.         ./configure --prefix=$INSTALL_DIR
  10.         make
  11.         make install
  12.  
  13.         cd $BUILD_DIR
  14.         wget http://oss.oetiker.ch/rrdtool/pub/libs/zlib-1.2.3.tar.gz
  15.         tar zxvf zlib-1.2.3.tar.gz
  16.         cd zlib-1.2.3
  17.         ./configure --prefix=$INSTALL_DIR --shared
  18.         make
  19.         make install
  20.  
  21.         cd $BUILD_DIR
  22.         wget http://oss.oetiker.ch/rrdtool/pub/libs/libpng-1.2.18.tar.gz
  23.         tar zxvf libpng-1.2.18.tar.gz
  24.         cd libpng-1.2.18
  25.         ./configure --prefix=$INSTALL_DIR
  26.         make
  27.         make install
  28.  
  29.  
  30.         cd $BUILD_DIR
  31.         wget http://oss.oetiker.ch/rrdtool/pub/libs/freetype-2.3.5.tar.gz
  32.         tar zxvf freetype-2.3.5.tar.gz
  33.         cd freetype-2.3.5
  34.         ./configure --prefix=$INSTALL_DIR CFLAGS="-O3 -fPIC"
  35.         make
  36.         make install
  37.  
  38.  
  39.         cd $BUILD_DIR
  40.         wget http://oss.oetiker.ch/rrdtool/pub/libs/libxml2-2.6.32.tar.gz
  41.         tar zxvf libxml2-2.6.32.tar.gz
  42.         cd libxml2-2.6.32
  43.         ./configure --prefix=$INSTALL_DIR
  44.         make
  45.         make install
  46.  
  47.  
  48.         cd $BUILD_DIR
  49.         wget http://oss.oetiker.ch/rrdtool/pub/libs/fontconfig-2.4.2.tar.gz
  50.         tar zxvf fontconfig-2.4.2.tar.gz
  51.         cd fontconfig-2.4.2
  52.         ./configure --prefix=$INSTALL_DIR --with-freetype-config=$INSTALL_DIR/bin/freetype-config
  53.         make
  54.         make install
  55.  
  56.  
  57.         cd $BUILD_DIR
  58.         wget http://oss.oetiker.ch/rrdtool/pub/libs/pixman-0.10.0.tar.gz
  59.         tar zxvf pixman-0.10.0.tar.gz
  60.         cd pixman-0.10.0
  61.         ./configure --prefix=$INSTALL_DIR
  62.         make
  63.         make install
  64.  
  65.  
  66.         cd $BUILD_DIR
  67.         wget http://oss.oetiker.ch/rrdtool/pub/libs/cairo-1.6.4.tar.gz
  68.         tar zxvf cairo-1.6.4.tar.gz
  69.         cd cairo-1.6.4
  70.         ./configure --prefix=$INSTALL_DIR \
  71.            --enable-xlib=no \
  72.            --enable-xlib-render=no \
  73.            --enable-win32=no
  74.         make
  75.         make install
  76.  
  77.  
  78.         cd $BUILD_DIR
  79.         wget http://oss.oetiker.ch/rrdtool/pub/libs/glib-2.15.4.tar.gz
  80.         tar zxvf glib-2.15.4.tar.gz
  81.         cd glib-2.15.4
  82.         ./configure --prefix=$INSTALL_DIR
  83.         make
  84.         make install

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

  1. cd $BUILD_DIR
  2.         wget http://oss.oetiker.ch/rrdtool/pub/libs/pango-1.21.1.tar.bz2
  3.         bunzip2 pango-1.21.1.tar.bz2
  4.         tar xf pango-1.21.1.tar
  5.         cd pango-1.21.1
  6.         ./configure --prefix=$INSTALL_DIR --without-x
  7.         make
  8.         make install
  9.  
  10.         cd $BUILD_DIR/rrdtool-1.3.7
  11.         ./configure --prefix=$INSTALL_DIR --disable-tcl --disable-python

#和nagios結合時增下下面參數
–with-rrdtool=/usr/local/rrdtool/bin/rrdtool –with-perfdata-dir=/usr/local/nagios/share/perfdata

  1. Find 3rd-Party Libraries
  2. checking for cairo_font_options_create in -lcairo... no
  3. checking for pkg-config... pkg-config
  4. configure: WARNING:
  5. ----------------------------------------------------------------------------
  6. * I found a copy of pkgconfig, but there is no cairo-png.pc file around.
  7.   You may want to set the PKG_CONFIG_PATH variable to point to its
  8.   location.
  9. ----------------------------------------------------------------------------
  10.  
  11. configure: WARNING:
  12. ----------------------------------------------------------------------------
  13. * I could not find a working copy of cairo-png. Check config.log for hints on why
  14.   this is the case. Maybe you need to set LDFLAGS and CPPFLAGS appropriately
  15.   so that compiler and the linker can find libcairo and its header files. If
  16.   you have not installed cairo-png, you can get it either from its original home on
  17.  
  18.      http://cairographics.org/releases/
  19.  
  20.   You can find also find an archive copy on
  21.  
  22.      http://oss.oetiker.ch/rrdtool/pub/libs
  23.  
  24.   The last tested version of cairo-png is 1.4.6.
  25.  
  26.        LIBS=-lm
  27.    LDFLAGS=
  28.   CPPFLAGS=
  29.  
  30. ----------------------------------------------------------------------------
  31.                 
  32. checking for cairo_svg_surface_create in -lcairo... no
  33. checking for pkg-config... (cached) pkg-config

有以上信息請檢查cairo安裝和環境變量

  1. checking in... and out again
  2. ordering CD from http://tobi.oetiker.ch/wish .... just kidding ;-)
  3.  
  4. ----------------------------------------------------------------
  5. Config is DONE!
  6.  
  7.           With MMAP IO: yes
  8.       Build rrd_getopt: no
  9.        Static programs: no
  10.           Perl Modules: perl_piped perl_shared
  11.            Perl Binary: /usr/bin/perl
  12.           Perl Version: 5.8.5
  13.           Perl Options: PREFIX=$(DESTDIR)/usr/local/rrdtool LIB=$(DESTDIR)/usr/local/rrdtool/lib/perl/5.8.5
  14.           Ruby Modules:
  15.            Ruby Binary: no
  16.           Ruby Options: sitedir=$(DESTDIR)/usr/local/rrdtool/lib/ruby
  17.     Build Tcl Bindings: no
  18.  Build Python Bindings: no
  19.           Build rrdcgi: yes
  20.        Build librrd MT: yes
  21.      Link with libintl: yes
  22.  
  23.              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 
  24.  
  25. Type 'make' to compile the software and use 'make install' to
  26. install everything to: /usr/local/rrdtool.
  27.  
  28.        ... that wishlist is NO JOKE. If you find RRDtool useful
  29. make me happy. Go to http://tobi.oetiker.ch/wish and
  30. place an order.

出現以上信息表明離成功不遠了哈。

  1. make
  2.         make install

=========================
2010-7-22更新
RRDtool 1.4.4 安裝

http://blog.c1gstudio.com/archives/1057

原文鏈接http://blog.c1gstudio.com/archives/459

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章