安装ganglia

#安装ganglia

yum install zlib-devel freetype-devel libart_lgpl-devel libpng-devel rrdtool expat apr apr-util gcc-c++ rrdtool-devel  apr-devel apr-util-devel

#安装libconfuse

wget http://download.savannah.gnu.org/releases/confuse/confuse-2.7.tar.gz
tar xvfz confuse-2.7.tar.gz
cd confuse-2.7
./configure CFLAGS=-fPIC
make
make install

#安装ganglia
./configure –with-gmetad –with-python –enable-gexec –with-libconfuse=/usr/local/confuse –with-libexpat=/usr/local/expat  –sysconfdir=/etc/ganglia
make
make install

#创建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”

#启动 gmetad
cp -f gmetad/gmetad.init /etc/init.d/gmetad
cp -f /usr/local/sbin/gmetad /usr/sbin/gmetad
chkconfig –add gmetad
service gmetad start

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

#客户端配置 gmond节点
cp -f gmond/gmond.init /etc/init.d/gmond
cp -f /usr/local/sbin/gmond /usr/sbin/gmond
chkconfig –add gmond
gmond –default_config > /etc/ganglia/gmond.conf
#修改/etc/ganglia/gmond.conf配置文件:
cluster {
name=”suc”
owner=”apache”
latlong=”unspecified”
url=”unspecified”
}

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

ganglia-web可以允许在web中浏览数据,是使用php写的,网上大多数文章写的放在apache httpd中运行,实际上nginx一样可以运行。

发表评论?

0 条评论。

发表评论


注意 - 你可以用以下 HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>