Chinaunix首页 | 论坛 | 博客
  • 博客访问: 20731
  • 博文数量: 2
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 10
  • 用 户 组: 普通用户
  • 注册时间: 2013-08-29 21:14
文章分类

全部博文(2)

文章存档

2013年(2)

我的朋友

分类: 系统运维

2013-08-29 21:20:43

继上一篇继续写到ganglia被监控机部署脚本,环境还是和上篇文章说的一样。被监控节点的机器软件包都是已经安装系统时全部安装的。当然我的iptables和selinux都是默认关闭的!
直接运行如下脚本即可!
[root@slave2 ~]# more beijiankong.sh
#!/bin/bash
#####################################################################################################################
mkdir /root/software
cd /root/sofeware
wget
tar zxvf expat-2.0.1.tar.gz
cd expat-2.0.1
./configure --prefix=/usr/local/expat
make && make install
mkdir /usr/local/expat/lib64
cp -a /usr/local/expat/lib/* /usr/local/expat/lib64/
#####################################################################################################################
cd /root/software
wget
tar zxvf apr-1.4.6.tar.gz
cd apr-1.4.6
./configure --prefix=/usr/local/apr
make && make install
cd /root/software
wget
tar zxvf apr-util-1.4.1.tar.gz
cd apr-util-1.4.1
./configure --with-apr=/usr/local/apr --with-expat=/usr/local/expat
make && make install
cp -f /usr/local/apr/include/apr-1/* /usr/local/apr/include/
mkdir -p /usr/local/apr/lib64
cp -a -f /usr/local/apr/lib/* /usr/local/apr/lib64/
#####################################################################################################################
cd /root/software
wget
tar zxvf confuse-2.7.tar.gz
cd confuse-2.7
./configure CFLAGS=-fPIC --disable-nls --prefix=/usr/local/confuse
make && make install
mkdir -p /usr/local/confuse/lib64
cp -a -f /usr/local/confuse/lib/* /usr/local/confuse/lib64/
#####################################################################################################################
cd /root/software
wget
tar zxvf ganglia-3.1.7.tar.gz
cd ganglia-3.1.7
./configure --prefix=/usr/local/ganglia --with-libapr=/usr/local/apr --with-libexpat=/usr/local/expat --with-libconfuse=/usr/local/confuse --enable-gexec --enable-status -sysconf
dir=/etc/ganglia
make && make install
cp gmond/gmond.init /etc/rc.d/init.d/gmond
cp -f /usr/local/ganglia/sbin/gmond /usr/sbin/gmond
gmond -t | tee /etc/ganglia/gmond.conf
sed -i 's/unspecified/Hadoop/' /etc/ganglia/gmond.conf       红色字体为你的源,根据自行修改!
/etc/init.d/gmond start
#####################################################################################################################
看如下图:我已经加了两个节点到了监控集群,一个是namenode,一个是datanode,目前看我的集群中一共三台机器,测试浏览器输入地址/ganglia
阅读(2433) | 评论(0) | 转发(0) |
0

上一篇:【原创】ganglia监控hadoop集群

下一篇:没有了

给主人留下些什么吧!~~