发布时间:2015-05-27 19:10:03作者:知识屋
gmetad配置
在ganglia安装目录执行如下操作
cp -a gmetad/gmetad.init /etc/init.d/gmetad chkconfig –add gmetad chkconfig –level 345 gmetad on gmetad -t | tee /usr/local/etc/gmetad.conf mkdir -p /var/lib/ganglia/rrds chown nobody:nobody /var/lib/ganglia/rrds
配置gmetad.conf
1.修改gmetad.conf 中 data_source
data_source "hadoop201" hadoop201
gmond配置
cp -a gmond/gmond.init /etc/init.d/gmond chkconfig –add gmond chkconfig –level 345 gmond on gmond -t | tee /usr/local/etc/gmond.conf
配置gmond.conf
修改 cluster中 name 为在gmetad.conf 中的data_source
cluster { name = "hadoop201" owner = "nobody" latlong = "unspecified" url = "unspecified"}
Ganglia-web环境部署
tar xvzf ganglia-web-3.6.2.tar.gz -C /var/www/html/ cd /var/www/html/ mv ganglia-web-3.5.12 ganglia chmod -R 777 /var/www/html/ganglia cd /var/www/html/ganglia cp conf_default.php conf.php vim conf.php
conf.php中有些默认配置和以上设置不一样的需要进行修改:
# Gmetad-webfrontend version. Used to check for updates.#$conf['gweb_root'] = "/var/www/html/ganglia";$conf['gweb_confdir'] = "/var/www/html/ganglia";include_once $conf['gweb_root'] . "/version.php";## 'readonly': No authentication is required. All users may view all resources. No edits are allowed.# 'enabled': Guest users may view public clusters. Login is required to make changes. # An administrator must configure an authentication scheme and ACL rules.# 'disabled': Guest users may perform any actions, including edits. No authentication is required.$conf['auth_system'] = 'readonly';## The name of the directory in "./templates" which contains the# templates that you want to use. Templates are like a skin for the# site that can alter its look and feel.#$conf['template_name'] = "default";## If you installed gmetad in a directory other than the default# make sure you change it here.## Where gmetad stores the rrd archives.$conf['gmetad_root'] = "/var/lib/ganglia";$conf['rrds'] = "${conf['gmetad_root']}/rrds";# Where Dwoo (PHP templating engine) store compiled templates$conf['dwoo_compiled_dir'] = "${conf['gweb_confdir']}/dwoo/compiled";$conf['dwoo_cache_dir'] = "${conf['gweb_confdir']}/dwoo/cache";# Where to store web-based configuration$conf['views_dir'] = $conf['gweb_confdir'] . '/conf';$conf['conf_dir'] = $conf['gweb_confdir'] . '/conf';
问题及解决方式
编译rrdtool 错误
/.libs/librrd.so: undefined reference to xmlTextReaderValue@LIBXML2_2.4.30'
./.libs/librrd.so: undefined reference toxmlTextReaderNodeType@LIBXML2_2.4.30’
./.libs/librrd.so: undefined reference to xmlStrdup@LIBXML2_2.4.30'
./.libs/librrd.so: undefined reference toxmlTextReaderName@LIBXML2_2.4.30’
./.libs/librrd.so: undefined reference to xmlNewTextReaderFilename@LIBXML2_2.4.30'
./.libs/librrd.so: undefined reference toxmlStrcasestr@LIBXML2_2.4.30’
./.libs/librrd.so: undefined reference to xmlFree@LIBXML2_2.4.30'
./.libs/librrd.so: undefined reference toxmlTextReaderRead@LIBXML2_2.4.30’
./.libs/librrd.so: undefined reference to xmlFreeTextReader@LIBXML2_2.4.30'
./.libs/librrd.so: undefined reference toxmlTextReaderGetParserLineNumber@LIBXML2_2.6.17’
./.libs/librrd.so: undefined reference to `xmlStrcasecmp@LIBXML2_2.4.30’
ganglia编译必须依赖rrdtool,而rrdtool安装不同机器可能出现莫名的安装错误,此时如果机器可以连接网络可以使用 yum -y install rrdtool 方式安装,但此时安装后,编译ganglia时仍然无法找到rrdtool相应的库,此时可以采用如下方法,使ganglia编译安装成功:
下载rrdtool-1.4.8.tar.gz ,解压后,将rrdtool-1.4.8/src/.libs 中相应库拷贝到如下目录:
home/hadoop/为我本机rrdtool-1.4.8所在路径:
cp /home/hadoop/rrdtool-1.4.8/src/.libs/.so /usr/local/lib/
cp /home/hadoop/rrdtool-1.4.8/src/.libs/*.a /usr/local/lib/
cp /home/hadoop/rrdtool-1.4.8/src/.libs/*.la /usr/local/lib/
cp /home/hadoop/rrdtool-1.4.8/src/rrd*.h /usr/local/include
linux一键安装web环境全攻略 在linux系统中怎么一键安装web环境方法
Linux网络基本网络配置方法介绍 如何配置Linux系统的网络方法
Linux下DNS服务器搭建详解 Linux下搭建DNS服务器和配置文件
对Linux进行详细的性能监控的方法 Linux 系统性能监控命令详解
linux系统root密码忘了怎么办 linux忘记root密码后找回密码的方法
Linux基本命令有哪些 Linux系统常用操作命令有哪些
Linux必学的网络操作命令 linux网络操作相关命令汇总
linux系统从入侵到提权的详细过程 linux入侵提权服务器方法技巧
linux系统怎么用命令切换用户登录 Linux切换用户的命令是什么
在linux中添加普通新用户登录 如何在Linux中添加一个新的用户
2012-07-10
CentOS 6.3安装(详细图解教程)
Linux怎么查看网卡驱动?Linux下查看网卡的驱动程序
centos修改主机名命令
Ubuntu或UbuntuKyKin14.04Unity桌面风格与Gnome桌面风格的切换
FEDORA 17中设置TIGERVNC远程访问
StartOS 5.0相关介绍,新型的Linux系统!
解决vSphere Client登录linux版vCenter失败
LINUX最新提权 Exploits Linux Kernel <= 2.6.37
nginx在网站中的7层转发功能