标签:
参考来源:
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
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/
/etc/gmetad.conf ganglia-3.6.0
setuid_username "nobody" data_source "ganglia.monitor" localhost
mkdir -p /var/lib/ganglia/rrds chown -R nobody:nobody /var/lib/ganglia/rrds
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
标签:
原文地址:http://www.cnblogs.com/wmx3ng/p/4335070.html