一聚教程网:一个值得你收藏的教程网站

最新下载

热门教程

centos下ganglia集群中gmond的安装与配置(2)

时间:2014-04-05 编辑:简简单单 来源:一聚教程网

准备工作见上一篇文章《CentOS下ganglia之gmond的安装与配置

ganglia的安装包还是用上一篇文章提到的ganglia-3.4.0
#cd ganglia-3.4.0
#./configure –prefix=/opt/modules/ganglia –with-static-modules –enable-gexec –enable-status –with-gmetad –with-python=/usr –with-librrd=/usr/local/rrdtool –with-libexpat=/usr –with-libconfuse=/usr/local –with-libpcre=/usr/local
#make && make install
#cd gmetad
#cp gmetad.conf /opt/modules/ganglia/etc/
#cp gmetad.init /etc/init.d/gmetad

打开gmetad的配置文件,修改如下内容:
#vi /etc/init.d/gmetad

将GMETAD=/usr/bin/gmetad
改为GMETAD=/opt/modules/ganglia/sbin/gmetad
#chkconfig –add gmetad
创建rrds的目录并设置权限
#mkdir -p /var/lib/ganglia/rrds
#chown nobody:nobody /var/lib/ganglia/
配置gmetad
#vi /opt/modules/ganglia/etc/gmetad.conf
加入以下内容:
data_source "zsx" localhost:8649 xxx.xxx.xxx.xxx:8649
setuid_username "root"
rrd_rootdir "/usr/local/rrdtool"
注:data_source可以设置一个或多个,如果设置多个,cluster信息会备份到多个主机上

启动gmetad
#service gmetad start
检查gmetad是否正常启动
#netstat -tnlp |grep gmetad
如果正常的话,会有两个gmetad,分别占用8651和8652端口

 

热门栏目