安装过程借鉴许多博客,最后得出没有出错的流程。
一、安装依赖包:
yum -y install gccglibc glibc-common rrdtool rrdtool-devel apr apr-devel expat expat-devel pcrepcre-devel dejavu-lgc-sans-mono-fonts dejavu-sans-mono-fonts
yum -y installapr-devel apr-util check-devel cairo-devel pango-devel libxml2-devel rpmbuildglib2-devel dbus-devel freetype-devel fontconfig-devel gcc-c++ expat-devel python-devellibXrender-devel
bzip2-devel(显示没有pcre)
二、安装confuse
#tar zxvf confuse-2.7.tar.gz
#cd confuse-2.7
#./configure CFLAGS=-fPIC – disable-nls&& make && make install
rpm -ivh libconfuse-2.7-8.fc22.src.rpm
三、安装ganglia
cd /tmp/
tar zxvf ganglia.3.6.1.tar.gz
cd ganglia-3.6.1/
./configure --prefix=/usr/local/ganglia
make
make install
四、
编辑文件/usr/local/ganglia/etc/gmond.conf 修改cluster名字和组播地址
cd gmond
./gmond –t > /usr/local/ganglia/etc/gmond.conf
vi gmond.init
修改里面的GMOND 改为GMOND=/usr/local/ganglia/sbin/gmond
# cp gmond.init/etc/init.d/gmond
# chkconfig --addgmond
# chkconfig --listgmond
gmond 0:off 1:off2:on 3:on 4:on 5:on 6:off
# service gmondstart
Starting gmondstart: [ OK ] #若不成功的话,就用/usr/local/ganglia/sbin/gmond手动启动
五、
route add -host [组播地址] dev eth0
保存并重新启动gmond
telnet 127.0.0.1 8649
如果在安装过程中出现缺少相关组件的提示,则下载安装相应组件即可。
如果运行出现错误,将gmond.conf文件中的debug_level值改为5再运行
ps –ef|grepgmon,查看错误信息。