分布式系统, 未分类

ganglia安装配置

2010年7月27日 阅读(45)

参考:
http://twiki.ihep.ac.cn/twiki/bin/view/GangliaMonitoring/GangliaInstall
http://blog.52ak.cn/article.asp?id=4
http://hi.baidu.com/chenghui2050/blog/item/e6377e9519e72f017bf480b3.html
第一步:下载所需套件
1)ganglia-3.1.0.tar.gz
 http://sourceforge.net/project/showfiles.php?group_id=43021&package_id=35280&release_id=616721
2)confuse-2.6
 http://bzero.se/confuse/
3)expat-2.0.1.tar.gz
 http://sourceforge.net/project/showfiles.php?group_id=10127
4)apr-1.3.2.tar.bz2与apr-util-1.3.2.tar.bz2
 http://apr.apache.org/download.cgi
5)rrdtool-1.2.27.tar.gz
 ftp://ftp.pucpr.br/rrdtool/rrdtool-1.2.27.tar.gz

第二步:安装所下载的软件

1)安装expat-2.0.1.tar.gz
 tar xvzf expat-2.0.1.tar.gz
 cd expat*;./configure –prefix=/usr/local/apr;make;make install
2)安装confuse-2.6
./configure –prefix=/usr/local/confuse-2.6 CFLAGS=-fPIC –disable-nls;make;make install
3)安装apr
tar xvjf apr-1.3.2.tar.bz2
 cd apr-1.3.2;./configure –prefix=/usr/local/apr;make;make install
安装apr-util-1.3.2.tar.bz2
 tar xvjf apr-util-1.3.2.tar.bz2
 cd apr-util-1.3.2;./configure –with-apr=/usr/local/apr –with-expat=/usr/local/expat
 make;make install
 cp /usr/local/apr-1.3.2/include/apr-1/* /usr/local/apr-1.3.2/include/目录,因为ganglia安装时默认会去/usr/local/apr/include下寻找apr的库文件。
4)安装rrdtool-1.2.27.tar.gz
 tar xvzf rrdtool-1.2.27.tar.gz
 cd rrdtool-1.2.27;./configure –prefix=/usr/local/rrdtool
 make;make install
5)cp /usr/local/apr/bin/apr-1* /usr/local/bin/拷过这个后 OK否则会编译出问题
报错如下:
Checking for apr
checking for apr-1-config… no
configure: error: apr-1-config binary not found in pat

6)安装ganglia
./configure –with-librrd=/opt/rrdtool-1.4.4 –with-gmetad –prefix=/usr/local/ganglia –with-libconfuse=/usr/local/confuse-2.6

7)make;make install
error:/usr/bin/ld: cannot find -lpython2.5,解决方法首先在系统中find,找到后然后建立软链接

[root@localhost ganglia-3.1.1]# find / -name "*python2.5*"
/opt/rrdtool-1.4.4/lib/python2.5
/usr/ali/bin/python2.5-config
/usr/ali/bin/python2.5
/usr/ali/lib/libpython2.5.so
/usr/ali/lib/python2.5
/usr/ali/lib/python2.5/config/libpython2.5.a
/usr/ali/lib/libpython2.5.so.1.0
/usr/ali/include/python2.5
/usr/local/lib/python2.5

[root@localhost ganglia-3.1.1]# ln -s /usr/ali/lib/libpython2.5.so /usr/lib/libpython2.5.so

8)error: Failed dependencies:
在 rpm -ivh linuxqq-v1.0.2-beta1.i386.rpm后面加上 –nodeps –force这两个参数即可

9)安装amon amon-devel

 amond -f /usr/local/etc/gmond.conf -k start

10)There was an error collecting ganglia data (127.0.0.1:8652): fsockopen error: Connection refused
说明gmetad有问题,查看是否启动成功,或者重启一下该服务。

11)图形无法显示

首先保证已安装rrdtool,php-gd
检查selinux是否开启,如果开启将其关闭
查看下./web下的php.conf,中的define("RRDTOOL", "/usr/bin/rrdtool");
查找你的rrdtool路径,如果不是/usr/bin/rrdtool,则修改成你的rrdtool

12)测试gmond和gmetad是否运行中
client:telnet localhost 8649
server:telnet localhost 8651
server:telnet localhost 8650
看是否返回xml文档内容,如果返回说明成功。

You Might Also Like