ganglia安装教程

前端之家收集整理的这篇文章主要介绍了ganglia安装教程前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

ganglia 安装教程

依赖软件

  1. http://nchc.dl.sourceforge.net/project/pcre/pcre/8.32/pcre-8.32.tar.gz
  • tar xvzf pcre-8.32.tar.gz@H_404_15@

  • cd pcre-8.32@H_404_15@

  • ./configure –prefix=/usr/local@H_404_15@

  • make && make install@H_404_15@

2.http://savannah.nongnu.org/download/confuse/confuse-2.7.tar.gz@H_404_15@

  • tar xvzf confuse-2.7.tar.gz@H_404_15@

  • cd confuse-2.7@H_404_15@

  • CFLAGS=-fPIC ./configure –prefix=/usr/local –disable-nls@H_404_15@

  • make CFLAGS=-fPIC@H_404_15@

  • make CFLAGS=-fPIC install@H_404_15@

3.http://nchc.dl.sourceforge.net/project/expat/expat/2.1.0/expat-2.1.0.tar.gz@H_404_15@

  • tar -xvzf expat-2.1.0.tar.gz@H_404_15@

  • cd expat-2.1.0@H_404_15@

  • ./configure –prefix=/usr/local@H_404_15@

  • make && make install@H_404_15@

4.http://zlib.net/zlib-1.2.8.tar.gz@H_404_15@

  • tar xvzf zlib-1.2.8.tar.gz@H_404_15@

  • cd zlib-1.2.8@H_404_15@

  • CFLAGS=-fPIC ./configure –prefix=/usr/local@H_404_15@

  • make CFLAGS=-fPIC@H_404_15@

  • make CFLAGS=-fPIC install@H_404_15@

5.ftp://xmlsoft.org/libxml2/libxml2-2.7.8.tar.gz@H_404_15@

  • tar xvzf libxml2-2.7.8.tar.gz @H_404_15@

  • cd libxml2-2.7.8@H_404_15@

  • ./configure –prefix=/usr/local –with-zlib=/usr/local@H_404_15@

  • make && make install@H_404_15@

6.http://oss.oetiker.ch/rrdtool/pub/rrdtool-1.4.8.tar.gz@H_404_15@

  • tar xvzf rrdtool-1.4.8.tar.gz@H_404_15@

  • cd rrdtool-1.4.8@H_404_15@

  • export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig@H_404_15@

  • ./configure –prefix=/usr/local@H_404_15@

  • make && make install@H_404_15@

7.http://cznic.dl.sourceforge.net/project/ganglia/ganglia%20monitoring%20core/3.6.0/ganglia-3.6.0.tar.gz@H_404_15@

  • ./configure –enable-gexec –with-gMetad (gMetad节点)
  • ./configure –enable-gexec (gmond节点)@H_404_15@

  • make && make install@H_404_15@

  1. 如果安装过程中还有其他包缺失。可以执行如下命令,从本地源安装
  • yum -y install apr-devel apr-util check-devel cairo-devel pango-devel libxml2-devel rpmbuild glib2-devel dbus-devel freetype-devel fontconfig-devel gcc-c++ expat-devel python-devel libXrender-devel

ganglia配置

gMetad配置@H_404_15@

在ganglia安装目录执行如下操作@H_404_15@

  • cp -a gMetad/gMetad.init /etc/init.d/gMetad@H_404_15@

  • chkconfig –add gMetad@H_404_15@

  • chkconfig –level 345 gMetad on@H_404_15@

  • gMetad -t | tee /usr/local/etc/gMetad.conf@H_404_15@

  • mkdir -p /var/lib/ganglia/rrds@H_404_15@

  • chown nobody:nobody /var/lib/ganglia/rrds@H_404_15@

配置gMetad.conf@H_404_15@

1.修改gMetad.conf 中 data_source@H_404_15@

data_source "hadoop201" hadoop201@H_404_15@

gmond配置@H_404_15@

  • cp -a gmond/gmond.init /etc/init.d/gmond@H_404_15@

  • chkconfig –add gmond@H_404_15@

  • chkconfig –level 345 gmond on@H_404_15@

  • gmond -t | tee /usr/local/etc/gmond.conf@H_404_15@

配置gmond.conf@H_404_15@

修改 cluster中 name 为在gMetad.conf 中的data_source@H_404_15@

 cluster {      

  name = "hadoop201"

  owner = "nobody"

  latlong = "unspecified"

  url = "unspecified"

}

Ganglia-web环境部署@H_404_15@

  • tar xvzf ganglia-web-3.6.2.tar.gz -C /var/www/html/@H_404_15@

  • cd /var/www/html/@H_404_15@

  • mv ganglia-web-3.5.12 ganglia@H_404_15@

  • chmod -R 777 /var/www/html/ganglia@H_404_15@

  • cd /var/www/html/ganglia@H_404_15@

  • cp conf_default.PHP conf.PHP@H_404_15@

  • vim conf.PHP@H_404_15@

conf.PHP中有些默认配置和以上设置不一样的需要进行修改:@H_404_15@

# 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';

问题及解决方

  1. #### 编译rrdtool 错误

/.libs/librrd.so: undefined reference to `xmlTextReaderValue@LIBXML2_2.4.30’@H_404_15@

./.libs/librrd.so: undefined reference to `xmlTextReaderNodeType@LIBXML2_2.4.30’@H_404_15@

./.libs/librrd.so: undefined reference to `xmlStrdup@LIBXML2_2.4.30’@H_404_15@

./.libs/librrd.so: undefined reference to `xmlTextReaderName@LIBXML2_2.4.30’@H_404_15@

./.libs/librrd.so: undefined reference to `xmlNewTextReaderFilename@LIBXML2_2.4.30’@H_404_15@

./.libs/librrd.so: undefined reference to `xmlStrcasestr@LIBXML2_2.4.30’@H_404_15@

./.libs/librrd.so: undefined reference to `xmlFree@LIBXML2_2.4.30’@H_404_15@

./.libs/librrd.so: undefined reference to `xmlTextReaderRead@LIBXML2_2.4.30’@H_404_15@

./.libs/librrd.so: undefined reference to `xmlFreeTextReader@LIBXML2_2.4.30’@H_404_15@

./.libs/librrd.so: undefined reference to `xmlTextReaderGetParserLineNumber@LIBXML2_2.6.17’@H_404_15@

./.libs/librrd.so: undefined reference to `xmlStrcasecmp@LIBXML2_2.4.30’@H_404_15@

ganglia编译必须依赖rrdtool,而rrdtool安装不同机器可能出现莫名的安装错误,此时如果机器可以连接网络可以使用 yum -y install rrdtool 方式安装,但此时安装后,编译ganglia时仍然无法找到rrdtool相应的库,此时可以采用如下方法,使ganglia编译安装成功:@H_404_15@

下载rrdtool-1.4.8.tar.gz ,解压后,将rrdtool-1.4.8/src/.libs 中相应库拷贝到如下目录,拷贝后可以不用再编译将rrdtool:@H_404_15@

进入rrdtool-1.4.8所在目录执行如下拷贝操作:@H_404_15@

cp src/.libs/*.so* /usr/local/lib/ @H_404_15@

cp src/.libs/*.a /usr/local/lib/@H_404_15@

cp src/.libs/*.la /usr/local/lib/@H_404_15@

cp src/rrd*.h /usr/local/include@H_404_15@

  1. #### Metad: error while loading shared libraries

Metad: error while loading shared libraries: libpcre.so.1: cannot open shared object file: No such file or directory@H_404_15@

解决方法@H_404_15@

执行如下命令: @H_404_15@

whereis libpcre.so.1
显示如下:
libpcre.so: /lib64/libpcre.so.0 /usr/local/lib/libpcre.so.1 /usr/local/lib/libpcre.so@H_404_15@

然后建立连接:
ln -s /usr/local/lib/libpcre.so /lib64/libpcre.so.1@H_404_15@

效果展示

原文链接:https://www.f2er.com/javaschema/284752.html

猜你在找的设计模式相关文章