yum -y install httpd-devel automake autoconf libtool ncurses-devel libxslt groff pcre-devel pkgconfig
yum search ganglia
yum install -y ganglia-gmetad.x86_64 ganglia-web.x86_64
rpm -qa | grep ganglia
vi /etc/ganglia/gmetad.conf
data_source "集群名称" gmetad主机名或者IP
vi /etc/httpd/conf.d/ganglia.conf
修改Deny from all 为 allow from all
yum search ganglia
yum install -y ganglia-gmond.x86_64
vi /etc/ganglia/gmond.conf
cluster {
name = "hadoop cluster"------ cluster名称,是你在gmetad.conf里配置的data_source名称
owner = "unspecified"
latlong = "unspecified"
url = "unspecified"
}
udp_send_channel {
#mcast_join = 239.2.11.71 ----- 组播
host = localhost -------------- 单播 gmeta主机的ip/主机名lboenMasterTest
port = 8649
ttl = 1
}
udp_recv_channel {
#mcast_join = 239.2.11.71
port = 8649
bind = localhost ------------- 本机的ip/hostname
}
chkconfig --add gmetad
chkconfig --add gmond
chkconfig --add httpd
永久修改(需要重启机器):vi /etc/selinux/config,把SELINUX=enforcing改成SELINUX=disable。
临时修改(无需重启机器):setenforce 0。
service gmetad start
service gmond start
service httpd start
service gmetad status -------------------验证是否启动成功
service gmond status
http://gmetad主机/ganglia