码迷,mamicode.com
首页 > 其他好文 > 详细

CentOS6.5安装ganglia3.6

时间:2015-03-13 15:56:21      阅读:140      评论:0      收藏:0      [点我收藏+]

标签:

参考来源:

1.http://yhz.me/blog/Install-Ganglia-On-CentOS.html

2.http://blog.csdn.net/sdlyjzh/article/details/26560585

安装基本的php,curl,尽量装吧,相关的都安装好.

更新源

yum install wget gcc make rsync

wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo
rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm

yum makecache

安装依赖包

  • apr-devel

    yum install apr-devel
    
  • zlib

    yum install zlib-devel
    
  • libConfuse

    http://www.nongnu.org/confuse/
    
    yum install libconfuse-devel
    
  • expat

    http://expat.sourceforge.net
    
    yum install expat-devel
    
  • pcre

    yum install pcre-devel
    
  • RRD

    http://oss.oetiker.ch/rrdtool
    
    yum install rrdtool rrdtool-devel
    

安装Ganglia

http://ganglia.info/

wget http://sourceforge.net/projects/ganglia/files/ganglia%20monitoring%20core/3.6.0/ganglia-3.6.0.tar.gz/download -O ~/ganglia-3.6.0.tar.gz

tar zxvf ganglia-3.6.0.tar.gz
cd ganglia-3.6.0

./configure --prefix=/usr/local/ganglia-3.6.0 --enable-gexec --enable-status --with-gmetad --with-librrd --with-libconfuse --with-zlib
make
make install

配置

设置软链接

ln -s /usr/local/ganglia-3.6.0/sbin/gmond /usr/bin/gmond
安装好后,声明Gmond配置文件,并修改:

gmond --default_config > /usr/local/ganglia-3.6.0/etc/gmond.conf
cluster {
    name = "ganglia.monitor"
    owner = "unspecified"
    latlong = "unspecified"
    url = "unspecified"
}

udp_send_channel {
    host = ganglia.monitor
    port = 8649
    ttl = 1
}

udp_recv_channel {
    port = 8649
}
tcp_accept_channel {
    port = 8649
}

 我们可以把Gmond添加到启动脚本

cp -f  ganglia-3.6.0/gmond/gmond.init  /etc/init.d/gmond 

vi /etc/init.d/gmond

GMOND=/usr/local/ganglia-3.6.0/sbin/gmond 

 


 服务器端安装配置

vi /usr/local/ganglia-3.6.0/etc/gmetad.conf 

setuid_username "nobody"
data_source "ganglia.monitor" localhost
设置RRD存储
mkdir -p /var/lib/ganglia/rrds
chown -R nobody:nobody /var/lib/ganglia/rrds
安装Web
yum install php-common php-cli php php-gd httpd  
下载
wget http://sourceforge.net/projects/ganglia/files/ganglia-web/3.5.12/ganglia-web-3.5.12.tar.gz/download -O ~/ganglia-web-3.5.12.tar.gz tar zxvf ganglia-web-3.5.12.tar.gz cd ganglia-web-3.5.12
修改Makefile
vi Makefile 
# Location where gweb should be installed to (excluding conf, dwoo dirs).
GDESTDIR = /var/www/html/ganglia

# Location where default apache configuration should be installed to.
GCONFDIR = /etc/ganglia-web

# Gweb statedir (where conf dir and Dwoo templates dir are stored)
GWEB_STATEDIR = /var/lib/ganglia-web

# Gmetad rootdir (parent location of rrd folder)
GMETAD_ROOTDIR = /var/lib/ganglia

APACHE_USER = apache
安装
make install
防火墙规则设置
iptables -I INPUT 3 -p tcp -m tcp --dport 80 -j ACCEPT
iptables -I INPUT 3 -p udp -m udp --dport 8649 -j ACCEPT

service iptables save
service iptables restart
关闭selinux
vi /etc/selinux/config
SELINUX=disabled
setenforce 0

 

 



CentOS6.5安装ganglia3.6

标签:

原文地址:http://www.cnblogs.com/wmx3ng/p/4335070.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!