Ganglia 3.4安装配置简述
首先强调一下,Ganglia采用组播模式(多播模式)进行数据请求。gmetad发送一个请求到一个组播地址(239.2.11.71),由于是组播地址,所以gmetad只需发送一次请求包即可完成对所有gmond的轮询。gmond收到请求后将采集到的数据返回给gmetad。
SERVER端安装:
apache:
- wget http://labs.mop.com/apache-mirror//apr/apr-1.4.6.tar.gz
- wget http://labs.mop.com/apache-mirror//apr/apr-util-1.5.1.tar.gz
- wget http://www.fayea.com/apache-mirror/httpd/httpd-2.2.23.tar.gz
- tar -xf apr-1.4.6.tar.gz && cd apr-1.4.6
- ./configure --prefix=/usr/local/apr && make && make install
- tar -xf apr-util-1.5.1.tar.gz && cd apr-util-1.5.1
- ./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr
- make && make install
- tar -xf httpd-2.2.23.tar.gz && cd httpd-2.2.23
- ./configure --prefix=/usr/local/apache2 --enable-so --enable-mods-shared=most --with-included-apr --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util
- make && make install
- echo '/usr/local/apache2/bin/apachectl start' >>/etc/rc.d/rc.local
- 启动
- /usr/local/apache2/bin/apachectl start
php:
ganglia-web需要PHP JSON模块,该模块包含在PHP 5.2及其以上版本。PHP 5.1需要自行安装JSON模块,非常的麻烦。
- wget http://www.php.net/get/php-5.3.18.tar.gz/from/cn2.php.net/mirror
- tar -xf php-5.3.18.tar.gz && cd php-5.3.18
- ./configure --prefix=/usr/local/php-5.3 --with-apxs2=/usr/local/apache2/bin/apxs
- make && make install
vim /usr/local/apache2/conf/httpd.conf,添加如下内容:
- <FilesMatch \.php$>
- SetHandler application/x-httpd-php
- </FilesMatch>
- <FilesMatch "\.ph(p[2-6]?|tml)$">
- SetHandler application/x-httpd-php
- </FilesMatch>
- <FilesMatch "\.phps$">
- SetHandler application/x-httpd-php-source
- </FilesMatch>
01.找到<IfModule dir_module>配置段,添加index.php
重启apache,写一个index.php文件,进行测试访问:
http://SERVER/index.php
安装ganglia依赖:
libconfuse:
官方网站下载失败,下载了版本稍旧一点rpm包:ttp://pkgs.repoforge.org/libconfuse/
- wget http://pkgs.repoforge.org/libconfuse/libconfuse-2.6-2.el5.rf.x86_64.rpm
- wget http://pkgs.repoforge.org/libconfuse/libconfuse-devel-2.6-2.el5.rf.x86_64.rpm
- rpm -ivh libconfuse-*
pcre:
- wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.31.tar.gz
- tar -xf pcre-8.31.tar.gz && cd pcre-8.31
- ./configure && make && make install
- echo '/usr/local/lib' >/etc/ld.so.conf.d/libpcre.conf
- ldconfig -v
其它依赖:
- 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
rrdtool:
- wget http://oss.oetiker.ch/rrdtool/pub/rrdtool-1.4.7.tar.gz
- tar -xf rrdtool-1.4.7.tar.gz && cd rrdtool-1.4.7
- ./configure --prefix=/usr/local
- make && make install
- echo '/usr/local/lib' >/etc/ld.so.conf.d/librrd.conf
- ldconfig -v
ganglia:
- wget http://sourceforge.net/projects/ganglia/files/ganglia%20monitoring%20core/3.4.0/ganglia-3.4.0.tar.gz/download
- tar -xf ganglia-3.4.0.tar.gz && cd ganglia-3.4.0
- ./configure --prefix=/usr/local/ganglia --with-gmetad --with-librrd=/usr/local/lib --sysconfdir=/etc/ganglia
- make && make install
- cp gmond/gmond.init /etc/rc.d/init.d/gmond
- cp gmetad/gmetad.init /etc/rc.d/init.d/gmetad
- chkconfig --add gmond && chkconfig gmond on
- chkconfig --add gmetad && chkconfig gmetad on
- 修改/etc/rc.d/init.d/gmetad和/etc/rc.d/init.d/gmond,分别指定如下参数:
- GMETAD=/usr/local/ganglia/sbin/gmetad
- GMOND=/usr/local/ganglia/sbin/gmond
- mkdir -p /var/lib/ganglia/rrds
- chown nobody:nobody /var/lib/ganglia/rrds
- gmond -t |tee /etc/ganglia/gmond.conf
- vim /etc/ganglia/gmetad.conf,修改内容:
- data_source "PPS Hadoop Cluster" $SERVER:8649 //把$SERVER替换成自己的被监控服务器IP
- gridname "Hadoop"
- vim /etc/ganglia/gmond.conf,修改cluster配置段内容:
- name = "Hadoop Cluster"
相关推荐
graseed 2020-10-28
jinhao 2020-09-07
yoohsummer 2020-06-01
SXIAOYI 2020-09-16
impress 2020-02-20
chenshuixian 2013-06-01
羽化大刀Chrome 2013-05-31
kanpiaoxue 2013-06-19
quanhaoH 2013-06-17
pigsmall 2020-11-19
大数据杂谈 2020-09-26
ChinaWin 2020-08-13
mohanzb 2020-08-01
王国平 2020-06-20
kangtingting0 2020-05-20
MichelinMessi 2020-02-19
nicepainkiller 2020-01-25
hfszy0 2013-05-15
lizhenmxcz 2013-05-12