客户端安装ganglia
1.搜索 本地yum 源是否 提供gangalia
[root@bogon lib]# yum search ganglia-gmond
2.添加本地软件库yum源
rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
3.安装gmond
yum install -y ganglia-gmond
4.添加开机启动
[root@localhost ~]# chkconfig gmond on
5.更改配置
vim /etc/ganglia/gmond.conf
name = "db"
# mcast_join = 239.2.11.71
host = 10.10.3.140
port = 8656
附上脚本
#!/bin/bash
#yum install ganglia-gmond
key=/root/.ssh/niu_rsa
input_ip=root@$1
dir=/etc/ganglia/
ip=10.10.4.69
#updata epel-release
ssh -i $key $input_ip "rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm"
# yum ganglia-gmond
ssh -i $key $input_ip "yum -y install ganglia-gmond"
#change gmond.conf
ssh -i $key $input_ip "sed -i 's/name = \"unspecified\"/name = \"db\"/g'" $dir/gmond.conf
ssh -i $key $input_ip "sed -i '50a host = '$ip''" $dir/gmond.conf
ssh -i $key $input_ip "sed -i 's/mcast_join/#mcast_join/g'" $dir/gmond.conf
ssh -i $key $input_ip "sed -i 's/bind = 239.2.11.71/#bind =239.2.11.71/g'" $dir/gmond.conf
#chkconfig
ssh -i $key $input_ip "/etc/init.d/gmond start && chkconfig gmond on"