|
1
2
|
#安装ganglia相关包yum -y install apr-devel apr-util check-devel cairo-devel pango-devel libxml2-devel rpmbuild glib2-devel dbus-devel freetype-devel fontconfig-devel gcc-c++ expat-devel python-devel libXrender-devel pcre pcre-devel |
|
1
2
3
4
5
6
7
|
tar xzf rrdtool-1.4.9.tar.gzcd rrdtool-1.4.9./configure --prefix=/opt/rrdtool-1.4.9 --disable-perlmakemake installln -s /opt/rrdtool-1.4.9/include/rrd.h /usr/include/rrd.hln -s /opt/rrdtool-1.4.9/lib/librrd.a /usr/lib/librrd.a |
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
#!/bin/sh#安装confusetar zxf confuse-2.7.tar.gzcd confuse-2.7./configure CFLAGS=-fPIC --disable-nls ;make;make install cd ..#安装gangliatar zxf ganglia-3.6.1.tar.gzcd ganglia-3.6.1#server./configure --prefix=/opt/modules/ganglia --with-static-modules --enable-gexec --enable-status --with-gmetad --with-python=/usr --with-librrd=/opt/rrdtool-1.4.9 --with-libexpat=/usr --with-libconfuse=/usr/local --with-libpcre=/usr/local#client#./configure --prefix=/opt/modules/ganglia --enable-gexec --enable-status --with-python=/usr --with-libconfuse=/usr/local --with-libexpat=/usr --with-libpcre=/usrmake; make installcd gmetadcp gmetad.conf /opt/modules/ganglia/etc/cp gmetad.init /etc/init.d/gmetadsed -i "s/^GMETAD=\/usr\/sbin\/gmetad/GMETAD=\/opt\/modules\/ganglia\/sbin\/gmetad/g" /etc/init.d/gmetadchkconfig --add gmetad#我的服务器有两块网卡,eth1使用公网地址,eth2使用局域网地址,监控服务器和被监控服务器之间的通信通过局域网地址实现以减少公网网卡的负载,使用以下命令:(此IP可以在/etc/ganglia/gmond.conf中修改)ip route add 239.2.11.71 dev eth2service gmetad start |
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
#!/bin/shtar zxf confuse-2.7.tar.gzcd confuse-2.7./configure CFLAGS=-fPIC --disable-nls ;make;make install cd ..tar zxf ganglia-3.6.1.tar.gzcd ganglia-3.6.1#server#./configure --prefix=/opt/modules/ganglia --with-static-modules --enable-gexec --enable-status --with-gmetad --with-python=/usr --with-librrd=/opt/rrdtool-1.4.5 --with-libexpat=/usr --with-libconfuse=/usr/local --with-libpcre=/usr/local#client不需要rrdtool./configure --prefix=/opt/modules/ganglia --enable-gexec --enable-status --with-python=/usr --with-libconfuse=/usr/local --with-libexpat=/usr --with-libpcre=/usrmake; make installcd gmond./gmond -t > /opt/modules/ganglia/etc/gmond.confcp gmond.init /etc/init.d/gmondsed -i "s/^GMOND=\/usr\/sbin\/gmond/GMOND=\/opt\/modules\/ganglia\/sbin\/gmond/g" /etc/init.d/gmondchkconfig --add gmondip route add 239.2.11.71 dev eth2service gmond start |
|
1
2
|
tar xzf ganglia-web-3.6.2cd ganglia-web-3.6.2 |
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
########################################################### User configurables:########################################################### 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/gangliaAPACHE_USER = apache########################################################## |
|
1
2
3
4
|
#$conf[‘gmetad_root‘] = "/var/lib/ganglia";$conf[‘rrds‘] = "${conf[‘gmetad_root‘]}/rrds";$conf[‘rrdtool‘] = "/opt/rrdtool-1.4.9/bin/rrdtool"; |
|
1
2
3
4
|
service iptables stopchkconfig iptables offservice httpd startchkconfig httpd on |
原文地址:http://blog.csdn.net/sunlei1980/article/details/46547923