1.     下载ganglia源码包并解压

wget
http://sourceforge.net/projects/ganglia/files/ganglia%20monitoring%20core/3.1.1%20%28Wien%29/ganglia-3.1.1.tar.gz/download?use_mirror=jaist
tar -zxvf ganglia-3.1.1.tar.gz

2.     安装ganglia(安装gmetad和gmond)

cd ganglia-3.1.1

在需要web frontend的机器上安装gmetad,configure参数为:

./configure --with-gmetad --enable-gexec

gmetad依赖g++、rrdtool-devel、apr-devel、libconfuse、libexpat包,先安装上述依赖包:

yum install gcc-c++
yum install rrdtool-devel
yum install apr-devel

yum安装libconfuse、libexpat失败后解决方案:

安装libconfuse:

wget http://download.savannah.gnu.org/releases/confuse/confuse-2.7.tar.gz
tar zxvf confuse-2.6.tar.gz
./configure CFLAGS=-fPIC --disable-nls--prefix=/usr/local/confuse
make
make install

64bit机器需要拷贝动态链接库:

mkdir -p /usr/local/confuse/lib64
cp -a -f /usr/local/confuse/lib/* /usr/local/confuse/lib64/

安装libexpat:

wget http://downloads.sourceforge.net/project/expat/expat/2.0.1/expat-2.0.1.tar.gz?use_mirror=cdnetworks-kr-2
tar zxvf expat-2.0.1.tar.gz
./configure --prefix=/usr/local/expat
make
make install

64bit机器需要拷贝动态链接库:

mkdir /usr/local/expat/lib64
cp -a /usr/local/expat/lib/* /usr/local/expat/lib64/

安装完依赖包后,执行./configure命令:

./configure --with-gmetad --enable-gexec--with-libconfuse=/usr/local/confuse --with-libexpat=/usr/local/expat

出现如图所示的界面时则ganglia安装成功:

按照提示make ganglia:

make
make install

在make的过程中可能会出现类似“mod_python.c:48:20: error: Python.h: No such file or directory”的错误,此时需要安装python:

yum install python-devel

安装python完成后再进行make即可

3.     服务器端配置gmetad

创建rrdtool数据目录:

mkdir -p /var/lib/ganglia/rrds
mkdir -p /var/lib/ganglia/dwoo
chown -R apache:apache /var/lib/ganglia

修改/etc/ganglia/gmetad.conf文件:

vim /etc/ganglia/gmetad.conf
data_source "suc" localhost
setuid_username "apache"

注意:若配置文件中data_source和setuid_username被“#”注释需要去掉注释

cp gmetad/gmetad.init /etc/init.d/gmetad
mkdir /etc/ganglia
cp gmetad/gmetad.conf /etc/ganglia/
cp -f gmetad /usr/sbin/gmetad
chkconfig --add gmetad

启动gmetad服务:

service gmetad start

若显示“Starting GANGLIA gmetad: [确定]”则表示gmetad运行正常

通过telnet localhost 8651验证gmetad是否正常

4.     本机客户端配置gmond

cp -f gmond/gmond.init /etc/init.d/gmond
cp -f gmond /usr/sbin/gmond
chkconfig --add gmond
gmond --default_config > /etc/ganglia/gmond.conf

修改/etc/ganglia/gmond.conf配置文件:

cluster {
name="suc" //和gmetad.conf配置文件对应
owner="apache" //和gmetad.conf配置文件对应
latlong="unspecified"
url="unspecified"
}

启动gmond服务:

service gmond start

若显示“Starting GANGLIA gmond: [确定]”则表示gmond运行正常

通过telnet localhost 8649验证gmond是否正常

5.     服务器端配置web

yum install php-common php-cli php php-gd httpd
mkdir /var/www/html/ganglia
cp -a -f web/* /var/www/html/ganglia

重启http服务:

service httpd restart

6.     打开浏览器查看ganlia web界面信息

http://localhost:/ganglia

显示如图所示则表示ganglia完全安装成功:

实验环境:CentOS6.0 x86_64

CentOS安装配置ganglia的更多相关文章

  1. 阿里云服务器Linux CentOS安装配置(零)目录

    阿里云服务器Linux CentOS安装配置(零)目录 阿里云服务器Linux CentOS安装配置(一)购买阿里云服务器 阿里云服务器Linux CentOS安装配置(二)yum安装svn 阿里云服 ...

  2. 阿里云服务器Linux CentOS安装配置(九)shell编译、打包、部署

    阿里云服务器Linux CentOS安装配置(九)shell编译.打包.部署 1.查询当前目录以及子目录下所有的java文件,并显示查询结果 find . -name *.java -type f - ...

  3. 阿里云服务器Linux CentOS安装配置(八)nginx安装、配置、域名绑定

    阿里云服务器Linux CentOS安装配置(八)nginx安装.配置.域名绑定 1.安装nginx yum -y install nginx 2.启动nginx service nginx star ...

  4. 阿里云服务器Linux CentOS安装配置(七)域名解析

    阿里云服务器Linux CentOS安装配置(七)域名解析 1.购买域名 登录阿里云,左侧菜单点击[域名],然后[域名注册],完成域名购买.(一般首年45元) 2.添加域名解析 在域名列表里点击你的域 ...

  5. 阿里云服务器Linux CentOS安装配置(六)resin多端口配置、安装、部署

    阿里云服务器Linux CentOS安装配置(六)resin多端口配置.安装.部署 1.下载resin包 http://125.39.66.162/files/2183000003E08525/cau ...

  6. 阿里云服务器Linux CentOS安装配置(五)jetty配置、部署

    阿里云服务器Linux CentOS安装配置(五)jetty配置.部署 1.官网下载jetty:wget http://repo1.maven.org/maven2/org/eclipse/jetty ...

  7. 阿里云服务器Linux CentOS安装配置(四)yum安装tomcat

    阿里云服务器Linux CentOS安装配置(四)yum安装tomcat 1.yum -y install tomcat  执行命令后,会帮你把jdk也安装好 2.tomcat安装目录:/var/li ...

  8. 阿里云服务器Linux CentOS安装配置(三)yum安装mysql

    阿里云服务器Linux CentOS安装配置(三)yum安装mysql 1.执行yum安装mysql命令:yum -y install mysql-server mysql-devel 2.启动mys ...

  9. 阿里云服务器Linux CentOS安装配置(二)yum安装svn

    阿里云服务器Linux CentOS安装配置(二)yum安装svn 1.secureCRT连接服务器 2.先创建一个文件夹,用来按自己的习惯来,用来存放数据 mkdir /data 3.yum安装sv ...

随机推荐

  1. paip输入法编程之生活用高频字,以及汉字分级

    paip输入法编程之生活用高频字 作者Attilax ,  EMAIL:1466519819@qq.com  来源:attilax的专栏 地址:http://blog.csdn.net/attilax ...

  2. Oracle11.2.0.4 RAC安装文档

    1 环境配置 参考官方文档<Grid Infrastructure Installation Guide for Linux> 1.1 软件环境 操作系统: [root@howe1 ~]# ...

  3. ubuntu中安装eclipse

    1.下载eclipse安装包 http://mirror.neu.edu.cn/eclipse/technology/epp/downloads/release/kepler/SR2/eclipse- ...

  4. PHP 中数组函数 isset 效率比 array_key_exists 更高

    PHP 中数组函数 isset 效率比 array_key_exists 更高 PHP 浏览:4194 2014年04月05日 isset 和 array_key_exists 函数都可以用来测试数组 ...

  5. python代码风格规范

    类注释模板: :: class AnotherClass: """ 类注释 """ def method(self, arg1, arg2, ...

  6. Hdu1096

    #include <stdio.h> int main() { int T,n; ; while(scanf("%d",&T)!=EOF){ while(sca ...

  7. Qt编程之信号与槽-------unresolved external symbol "public: virtual struct QMetaObject const * __thiscall XX::metaObject(void)const

    原因是加入Q_OBJECT这个macro的类,被编译的时候就要用到moc这个命令,所以在VS2010中,没有加入此命令的应用,当然会出错了.所以解决办法是加,或者如果你不使用信号槽可以直接删除. 当要 ...

  8. linux下能ping ip不能ping域名详解

    今天在开发的同事来说,内网不能通过域名访问自己的服务器!然后做了下面的测试发现这样的问题: [root@itmop ~]# ping www.downcc.com ping: unknown host ...

  9. 转:C# 定时任务实现

    原文地址:http://blog.csdn.net/Netself/article/details/5766398 C#实现的定时任务类,核心代码如下: 以下代码可直接封装成 TimerTask.dl ...

  10. eclipsecdt添加自动补全功能

    自动代码补全完全是一个改善生活质量的功能呀!cdt拥有自动代码补全功能,只是我们没有打开而已 1. 绑定快捷方式 1. windows -> preferences ->general-& ...