rrdtool1.7.0版本发布于2017年,时隔两年,rrdtool发布了新的rrdtool1.7.1版本,但1.7.1版本在make时候存在一个bug,博主已经反馈给了官方,官方表示会在1.7.2版本中修复。
网上几乎所有教程都是老版本的了,各种复制粘贴爬虫爬的,编译时叮当的报错恶心至极,所以决定发一篇rrdtool1.7.0编译的过程,其实编译过程很简单,无非就是依赖处理的问题导致报错。
当前系统环境Centos7.5,其他操作系统版本请自测
1、安装依赖
1 |
yum install gcc gcc-c++ libxml2-devel libxml2 pcre pcre-devel pango pango-devel perl perl-devel |
2、下载rrdtool1.7.0源码包编译安装
1 2 3 4 5 |
cd /usr/local/src wget http://oss.oetiker.ch/rrdtool/pub/rrdtool-1.7.0.tar.gz tar xf rrdtool-1.7.0.tar.gz cd rrdtool-1.7.0 ./configure --prefix=/usr/local/rrdtool |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
checking build system type... x86_64-pc-linux-gnu checking host system type... x86_64-pc-linux-gnu checking target system type... x86_64-pc-linux-gnu checking for gcc... gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o ...... ... that wishlist is NO JOKE. If you find RRDtool useful make me happy. Go to http://tobi.oetiker.ch/wish and place an order. -- Tobi Oetiker <tobi@oetiker.ch> ---------------------------------------------------------------- |
1 |
make |
1 2 3 4 5 6 7 8 9 10 11 |
Making all in po make[1]: Entering directory `/usr/local/src/rrdtool-1.7.0/po' make[1]: Leaving directory `/usr/local/src/rrdtool-1.7.0/po' Making all in src make[1]: Entering directory `/usr/local/src/rrdtool-1.7.0/src' ...... make[2]: Leaving directory `/usr/local/src/rrdtool-1.7.0/examples' make[1]: Leaving directory `/usr/local/src/rrdtool-1.7.0/examples' make[1]: Entering directory `/usr/local/src/rrdtool-1.7.0' make[1]: Nothing to be done for `all-am'. make[1]: Leaving directory `/usr/local/src/rrdtool-1.7.0' |
1 |
make install |
1 2 3 |
...... make[2]: Leaving directory `/usr/local/src/rrdtool-1.7.0' make[1]: Leaving directory `/usr/local/src/rrdtool-1.7.0' |
编译安装完成,默认安装目录在/usr/local/rrdtool/
附:
我这里附上一个直接yum安装rrdtool的方法(支持Centos7和Centos6)
添加whsir一键包源
1 |
rpm -ivh http://mirrors.whsir.com/centos/whsir-release-centos7-1-1.el7.noarch.rpm |
安装rrdtool(注意这里包名是wrrdtool,为了和默认的rrdtool区分)
1 |
yum install wrrdtool |
原文链接:rrdtool1.7源码包编译安装,转载请注明来源!