Chinaunix首页 | 论坛 | 博客
  • 博客访问: 86334
  • 博文数量: 52
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: -20
  • 用 户 组: 普通用户
  • 注册时间: 2018-06-04 17:51
文章分类

全部博文(52)

文章存档

2013年(6)

2012年(3)

2011年(4)

2010年(18)

2009年(21)

我的朋友

分类: LINUX

2013-05-24 16:30:55

ganglia的安装配置

安装依赖包
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
yum list |grep libconfuse
yum install libconfuse
yum install libconfuse-devel
###########以上如果没有#########
wget
tar zxf confuse-2.7.tar.gz
cd confuse-2.7
./configure CFLAGS=-fPIC --disable-nls ;make;make install
############rrdtoll的安装###############
wget
tar zxvf rrdtool.tar.gz
cd rrdtool-1.4.7/
./configure --prefix=/usr/local/rrdtool
make -j8
make install
###############ganglia的安装###############
wget
tar zxvf ganglia-3.3.2.tar.gz
cd ganglia-3.3.2
./configure --prefix=/usr/local/ganglia --with-static-modules --enable-gexec --enable-status --with-gmetad --with-librrd=/usr/local/rrdtool/
make -j8
make install
mkdir -p /var/www/html/ganglia/
cp -a web/* /var/www/html/ganglia/
cp gmetad/gmetad.init /etc/init.d/gmetad
cp gmond/gmond.init /etc/init.d/gmond
###############修改执行文件的目录############
vim /etc/init.d/gmetad
vim /etc/init.d/gmond

###########html下的配置文件修改#######
cp conf_default.php.in conf_default.php
vim conf_default.php
########################文内容###########
# Where gmetad stores the rrd archives.
$conf['gmetad_root'] = "/var/www/html/ganglia";
$conf['rrds'] = "/var/lib/ganglia/rrds";

# Where Dwoo (PHP templating engine) store compiled templates
$conf['dwoo_compiled_dir'] = "${conf['gmetad_root']}/dwoo/compiled";
$conf['dwoo_cache_dir'] = "${conf['gmetad_root']}/dwoo/cache";

# Where to store web-based configuration
$conf['views_dir'] = $conf['gmetad_root'] . '/conf';
$conf['conf_dir'] = $conf['gmetad_root'] . '/conf';

# Where to find filter configuration files, if not set filtering
# will be disabled
#$conf['filter_dir'] = "${conf['gmetad_root']}/filters";

# Leave this alone if rrdtool is installed in $conf['gmetad_root'],
# otherwise, change it if it is installed elsewhere (like /usr/bin)
$conf['rrdtool'] = "/usr/local/rrdtool/bin/rrdtool";
#######################################
mkdir /usr/local/ganglia/dwoo
mkdir /usr/local/ganglia/dwoo/compiled
mkdir /usr/local/ganglia/dwoo/cache
mkdir /var/lib/ganglia/rrds
mkdir -p /var/lib/ganglia/rrds
chown nobody.nobody /var/lib/ganglia/rrds
/etc/init.d/gmetad start
/usr/local/ganglia/sbin/gmond -t |tee /usr/local/ganglia/etc/gmond.conf
/etc/init.d/gmond start
vim gmetad.conf
#################内容############
data_source "hadoop" localhost #192.168.1.240:8649
################################
vim gmond.conf
################################内容#################
globals {
  daemonize = yes
  setuid = yes
  user = nobody
  debug_level = 0
  max_udp_msg_len = 1472
  mute = no
  deaf = no
  allow_extra_data = yes
  host_dmax = 86400 /*secs. Expires (removes from web interface) hosts in 1 day */
  host_tmax = 20 /*secs */
  cleanup_threshold = 300 /*secs */
  gexec = no
  send_metadata_interval = 0 /*secs */
}

/*
 * The cluster attributes specified will be used as part of the
 * tag that will wrap all hosts collected by this instance.
 */
cluster {
  name = "hadoop"
  owner = "nobody"
  latlong = "unspecified"
  url = "unspecified"
}

/* The host section describes attributes of the host, like the location */
host {
  location = "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 {
  #bind_hostname = yes # Highly recommended, soon to be default.
                       # This option tells gmond to use a source address
                       # that resolves to the machine's hostname.  Without
                       # this, the metrics may appear to come from any
                       # interface and the DNS names associated with
                       # those IPs will be used to create the RRDs.
  #mcast_join = 192.168.1.240
#  mcast_join = 1921.68.1.240
  #host = 192.168.1.240
  port = 8649
  ttl = 1
}

/* You can specify as many udp_recv_channels as you like as well. */
udp_recv_channel {
#  mcast_join = 192.168.1.240
  port = 8649
  bind = 192.168.1.240
}
#######################################################


客户装把ganglia安装就可以了不用安装rrdtool,只配置gmond文件的cluster的name和端口和服务器端配置起来就OK

阅读(1446) | 评论(0) | 转发(0) |
0

上一篇:coreseek安装

下一篇:GIT版本库安装

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