A preparatory work
1.0 Note: Before installing, make sure your system time is correct, and if not, sync it up quickly.
The code is as follows |
Copy Code |
#ntpdate ntp.fudan.edu.cn |
1.1 First need to install some dependent libraries
The code is as follows |
Copy Code |
#yum install-y gcc gcc-c++ libpng freetype zlib libdbi apr.* apr-util libxml2 libxml2-devel pkg-config glib Pixman Pango Pango-devel freetye-devel fontconfig Cairo cairo-devel LIBART_LGPL |
1.2 Installing RRDtool and configuring environment variables
The code is as follows |
Copy Code |
#wget http://oss.oetiker.ch/rrdtool/pub/rrdtool-1.4.5.tar.gz #tar XVF rrdtool-1.4.5.tar.gz #cd rrdtool-1.4.5 #./configure–prefix=/usr/local/rrdtool–enable-shared #make www.111cn.net #make Install |
To add a rrdtool command to a configuration environment:
The code is as follows |
Copy Code |
#vi/etc/profile Export path= $PATH:/usr/local/rrdtool/bin #source/etc/profile |
1.3 Installing expat and other required packages
The code is as follows |
Copy Code |
#yum-y install expat expat-devel pcre Pcre-devel |
For 64-bit operating systems, manual copy of the dynamic link library is required under LIB64
The code is as follows |
Copy Code |
#mkdir/usr/local/expat/lib64 #cp-a/usr/local/expat/lib/*/usr/local/expat/lib64/ |
1.4 Installing APR and Apr-util
The code is as follows |
Copy Code |
#wget http://mirror.bit.edu.cn/apache/apr/apr-1.4.6.tar.gz #tar ZXF apr-1.4.6.tar.gz #cd apr-1.4.6 #./configure && make && make install |
1.5 Installation Confuse
The code is as follows |
Copy Code |
#wget http://download.savannah.gnu.org/releases/confuse/confuse-2.7.tar.gz #tar ZXF confuse-2.7.tar.gz #cd confuse-2.7 #./configure cflags=-fpic–disable-nls && make && make install |
II Installation and Configuration Gmond
2.1 Installation Gmond
If only install the monitored client, is not cluster, that only need to install Gmond can.
First download the ganglia source file. What I'm downloading here is ganglia-3.4.0.tar.gz.
The code is as follows |
Copy Code |
#tar XVF ganglia-3.4.0.tar.gz #cd ganglia-3.4.0 #./configure–prefix=/opt/modules/ganglia–enable-gexec–enable-status–with-python=/usr–with-libapr=/usr/local/ Apr/bin/apr-1-config–with-libconfuse=/usr/local–with-libexpat=/usr–with-libpcre=/usr
|
Note that 64-bit machines may have problems with LUA or other installation packages, and if there are problems, add the –disable-lua parameter
If you are always prompted for aclocal problems when make, reinstall Aclocal, and then execute the following command
The code is as follows |
Copy Code |
#aclocal #autoconf |
2.2 Configuration Gmond
The code is as follows |
Copy Code |
#mkdir/opt/modules/ganglia/etc #cd Gmond #./gmond-t >/opt/modules/ganglia/etc/gmond.conf #cp Gmond.init/etc/init.d/gmond # Vi/etc/init.d/gmond Will Gmond=/usr/bin/gmond Change to Gmond=/opt/modules/ganglia/sbin/gmond #chkconfig –add Gmond #service Gmond Start www.111cn.net |
Then modify the gmond.conf configuration file and join your cluster
The code is as follows |
Copy Code |
#vi/opt/modules/ganglia/etc/gmond.conf
|
The revised content is as follows:
code is as follows |
copy code |
cluster { & nbsp Name = "ZSX" owner = "Nobody" Latlong = "unspecified" URL = "job.scol.com.cn" } H OST { location = "DB2" udp_send_channel{ mcast_join=xxx.xxx.xxx.xxx port=8649< br> ttl=1 } #service gmond restart |