ubuntu14.04系统中安装Ganglia
2016-02-24 22:15
751 查看
由于比赛项目的需要,我要在一个hadoop集群上安装Ganglia,并在主节点上监控整个集群的运行状况。
搞了一下午,找了好多资料,发现不同资料之间说法大相径庭,而且都非常复杂,最后好不容易成功安装,就把过程记录下来,希望能帮到有同样需求的朋友。
1、环境
ubuntu14.04操作系统
2、在 Ubuntu14.04 上安装 Ganglia 。
打开终端(Ctrl+Alt+T),输入以下命令:
开始的时候,我的电脑不能正常安装,报了一些错误,后来我根据终端上给出的建议,运行了如下命令:
运行该命令后再运行上述命令:
终端截图:
3、配置 Ganglia
(1)复制 Ganglia webfrontend Apache 配置:
(2)编辑 Ganglia 元守护程序的配置文件:
并做如下变化:
(4)保存并关闭文件
在vi编辑器中,使用vi命令打开编辑器后,输入i即可插入文本,当需要保存推出时可以先按Esc键,然后输入:wq!,回车即可(具体使用方法详见vi编辑器使用方法)
4、重启服务:
至此,Ganglia的安装配置完成,登录特定网页即可看到监控信息。
访问网址:http://localhost/ganglia/,得到下图所示页面:
至此,Ganglia安装大功告成!
搞了一下午,找了好多资料,发现不同资料之间说法大相径庭,而且都非常复杂,最后好不容易成功安装,就把过程记录下来,希望能帮到有同样需求的朋友。
1、环境
ubuntu14.04操作系统
2、在 Ubuntu14.04 上安装 Ganglia 。
打开终端(Ctrl+Alt+T),输入以下命令:
sudo apt-get install ganglia-monitor rrdtool gmetad ganglia-webfrontend
开始的时候,我的电脑不能正常安装,报了一些错误,后来我根据终端上给出的建议,运行了如下命令:
sudo apt-get update
运行该命令后再运行上述命令:
sudo apt-get install ganglia-monitor rrdtool gmetad ganglia-webfrontend这时候发现可以正常下载,过程中可能会出现要求apache2重启的图形对话框,直接选择yes即可(原谅我忘了截图……)
终端截图:
3、配置 Ganglia
(1)复制 Ganglia webfrontend Apache 配置:
sudo cp /etc/ganglia-webfrontend/apache.conf /etc/apache2/sites-enabled/ganglia.conf
(2)编辑 Ganglia 元守护程序的配置文件:
sudo vi /etc/ganglia/gmetad.conf 找到<code>data_source "my cluster" localhost</code><p>修改为:</p><p><code>data_source "my cluster" 50 192.168.56.10:8649</code></p>(3)编辑主节点的配置文件:
sudo vi /etc/ganglia/gmond.conf
并做如下变化:
/* If a cluster attribute is specified, then all gmond hosts are wrapped inside * of a tag. If you do not specify a cluster tag, then all will * NOT be wrapped inside of a tag. */ cluster { name = "unspecified" owner = "unspecified" latlong = "unspecified" url = "unspecified" } 修改为: cluster { name = "my cluster" owner = "unspecified" latlong = "unspecified" url = "unspecified" } /* Feel free to specify as many udp_send_channels as you like. Gmond used to only support having a single channel */ udp_send_channel { mcast_join = 239.2.11.71 port = 8649 ttl = 1 } 修改为: /* Feel free to specify as many udp_send_channels as you like. Gmond used to only support having a single channel */ udp_send_channel { # mcast_join = 239.2.11.71 host = 192.168.56.10 port = 8649 ttl = 1 } /* You can specify as many udp_recv_channels as you like as well. */ udp_recv_channel { mcast_join = 239.2.11.71 port = 8649 bind = 239.2.11.71 } 修改为: /* You can specify as many udp_recv_channels as you like as well. */ udp_recv_channel { # mcast_join = 239.2.11.71 port = 8649 #bind = 239.2.11.71 }
(4)保存并关闭文件
在vi编辑器中,使用vi命令打开编辑器后,输入i即可插入文本,当需要保存推出时可以先按Esc键,然后输入:wq!,回车即可(具体使用方法详见vi编辑器使用方法)
4、重启服务:
sudo /etc/init.d/ganglia-monitor start sudo /etc/init.d/gmetad start sudo /etc/init.d/apache2 restart5、访问gnglia webinterface
至此,Ganglia的安装配置完成,登录特定网页即可看到监控信息。
访问网址:http://localhost/ganglia/,得到下图所示页面:
至此,Ganglia安装大功告成!
相关文章推荐
- Ubuntu 默认壁纸历代记
- Ubuntu Remix Cinnamon 20.04 评测:Ubuntu 与 Cinnamon 的完美融合
- 关于Ubuntu 11.10启动提示waiting for the network configuration的问题
- 在 Ubuntu 桌面中使用文件和文件夹
- ubuntu下chrome无法同步问题解决
- 详解HDFS Short Circuit Local Reads
- Ubuntu Linux使用体验
- 使用 GNOME 优化工具自定义 Linux 桌面的 10 种方法
- 以Ubuntu 9.04为例 将工作环境迁移到 Linux
- Hadoop_2.1.0 MapReduce序列图
- 使用Hadoop搭建现代电信企业架构
- VirtualBox虚拟机XP与宿主机Ubuntu互访共享文件夹
- 从USB安装Ubuntu Server 10.04.3 图文详解
- Ubuntu 15.04 正式版发布下载
- Linux-Ubuntu 10.04安装Cadence-ic610 方法总结图解
- Apache Isis 1.4.0 发布,领域驱动开发框架
- Ubuntu 12.04和Windows 7双系统安装图解
- 开机出现:grub rescue的修复方法
- Ubuntu连接Android真机调试
- 你应该选择 Ubuntu 还是 Fedora?