64位 CentOS 5.6 中 rrdtool 的编译安装
所有包都在code.google.com或者sourceforge之类的地方寻找尽可能新的版本,名称以及md5如下:
- cgilib-0.7.tar.gz 2c7053f58dfb06f7a80a112797ed7e86
- expat-2.0.1.tar.gz ee8b492592568805593f81f8cdf2a04c
- fontconfig-2.8.0.tar.gz 77e15a92006ddc2adbb06f840d591c0e
- freetype-2.4.8.tar.gz 5d82aaa9a4abc0ebbd592783208d9c76
- gd-2.0.33.tar.gz be0a6d326cd8567e736fbc75df0a5c45
- jpegsrc.v8c.tar.gz a2c10c04f396a9ce72894beb18b4e1f9
- libart_lgpl-2.3.21.tar.gz 722471ec8ae084af4293126d06b60880
- libpng-1.5.7.tar.gz 944b56a84b65d94054cc73d7ff965de8
- libxml2-2.7.8.tar.gz 8127a65e8c3b08856093099b52599c86
- rrdtool-1.4.5.tar.gz 4d116dba9a0888d8aaac179e35d3980a
- zlib-1.2.5.tar.gz c735eab2d659a96e5a594c9e8541ad63
将以上的包放在同一个目录内,比如 /root/rrdtool/ 中
########################### START #####################################
#将以下内容保存为 install_rrdtool.sh
- #!/bin/sh
- export CFLAGS="-O3 -fPIC"
- tar zxvf zlib-1.2.5.tar.gz
- cd zlib-1.2.5
- CFLAGS="-O3 -fPIC" ./configure --prefix=/usr
- make
- make install
- cd ..
- echo
- read -n 1 -p 'Press any key to continue...'
- echo
- tar zxvf expat-2.0.1.tar.gz
- cd expat-2.0.1
- ./configure
- make
- make install
- cd ..
- echo
- read -n 1 -p 'Press any key to continue...'
- echo
- tar zxvf cgilib-0.7.tar.gz
- cd cgilib-0.7
- aclocal
- autoconf
- libtoolize --force
- automake --add-missing --foreign
- ./configure
- make
- make install
- cd ..
- echo
- read -n 1 -p 'Press any key to continue...'
- echo
- tar zxvf libpng-1.5.7.tar.gz
- cd libpng-1.5.7
- mv scripts/makefile.linux ./makefile
- make
- make install
- cd ..
- echo
- read -n 1 -p 'Press any key to continue...'
- echo
- tar zxvf freetype-2.4.8.tar.gz
- cd freetype-2.4.8
- ./configure --prefix=/usr/local/freetype
- make
- make install
- cd ..
- echo
- read -n 1 -p 'Press any key to continue...'
- echo
- tar zxvf fontconfig-2.8.0.tar.gz
- cd fontconfig-2.8.0
- ./configure --with-freetype-config=/usr/local/freetype/bin/freetype-config
- make
- make install
- cd ..
- echo
- read -n 1 -p 'Press any key to continue...'
- echo
- tar zxvf libart_lgpl-2.3.21.tar.gz
- cd libart_lgpl-2.3.21
- ./configure
- make
- make install
- cd ..
- echo
- read -n 1 -p 'Press any key to continue...'
- echo
- tar zxvf libxml2-2.7.8.tar.gz
- cd libxml2-2.7.8
- ./configure --with-zlib=/usr
- make
- make install
- cd ..
- echo
- read -n 1 -p 'Press any key to continue...'
- echo
- tar zxvf jpegsrc.v8c.tar.gz
- cd jpeg-8c/
- ./configure --prefix=/usr/local/libjpeg --enable-shared --enable-static
- make
- make install
- cd ..
- echo
- read -n 1 -p 'Press any key to continue...'
- echo
- tar zxvf gd-2.0.33.tar.gz
- cd gd-2.0.33
- ./configure --prefix=/usr/local/libgd --with-png --with-freetype=/usr/local/freetype --with-jpeg=/usr/local/libjpeg --with-xpm --enable-m4_pattern_allow
- make
- make install
- cd ..
- echo
- read -n 1 -p 'Press any key to continue...'
- echo
- tar zxvf rrdtool-1.4.5.tar.gz
- cd rrdtool-1.4.5
- ./configure --prefix=/usr/local/rrdtool --disable-python --disable-tcl
- make
- make install
- #验证
- /usr/local/rrdtool/bin/rrdtool --help
########################### END ####################################
然后执行该脚本即可
- chmod u+x install_rrdtool.sh;
- ./install_rrdtool.sh > test.log;
如果觉得烦的话,可以删掉 read -n 1 -p 'Press any key to continue...' 的部分,那样脚本就直接能运行完了。
运行完成后,rrdtool即安装完毕,可以手动进行下测试。
相关推荐
changecan 2020-11-19
ECSHOP专属建设 2020-11-13
88427810 2020-11-02
步知道 2020-10-27
Junzizhiai 2020-10-10
jackalwb 2020-10-05
小网管 2020-09-03
shiwenqiang 2020-09-14
85251846 2020-09-14
summerinsist 2020-08-21
87901735 2020-08-19
PinkBean 2020-08-11
85407718 2020-08-09
MichelinMessi 2020-07-30
suosuo 2020-07-28
CARBON 2020-07-28
lizhengfa 2020-07-27
88427810 2020-07-26