CentOS 6.4 minimal installation before Ganglia Installation

Source: Internet
Author: User
Tags rrd rrdtool

Description

The ganglia project is really useful for Cluster Monitoring. Unfortunately, there are too many dependencies to install it.

The following uses the CentOS6.4 minimal system as the initial environment. After installing the system, only the NIC service system is enabled as the installation environment for ganglia,


1. Install the server
1. Install Dependencies
Yum-y install apr-devel apr-util check-devel cairo-devel pango-devel libxml2-devel rpmbuild glib2-devel kernel-devel freetype-devel fontconfig-devel gcc-c ++ expat-devel python -devel libXrender-devel perl-ExtUtils-CBuilder perl-ExtUtils-MakeMaker make rsync wget
2. install apache Components
Install apr-1.4.6
Wget http://apache.etoak.com//apr/apr-1.4.6.tar.gz
Tar-xf apr-1.4.6.tar.gz & cd apr-1.4.6
./Configure -- prefix =/usr/local/apr & make install & cd ..
Install apr-util-1.5.2
Wget http://apache.etoak.com//apr/apr-util-1.5.2.tar.gz
Tar-xf apr-util-1.5.2.tar.gz & cd apr-util-1.5.2
./Configure -- prefix =/usr/local/apr-util -- with-apr =/usr/local/apr & make install & cd ..
Install httpd-2.2.24
Wget http://mirror.esocc.com/apache//httpd/httpd-2.2.24.tar.gz
Tar-xf httpd-2.2.24.tar.gz & cd httpd-2.2.24
. /Configure -- prefix =/usr/local/apache2 -- enable-so -- enable-mod-shared = most -- with-supported ded-apr -- with-apr =/usr/local/apr -- with-apr-util =/usr/local/apr-util & make install & cd ..
# Write httpd to the startup script and start it (optional)
Echo '/usr/local/apache2/bin/apachectl start'>/etc/rc. d/rc. local &/usr/local/apache2/bin/apachectl start
3. install and configure php
Install
Wget http://www.php.net/get/php-5.3.18.tar.gz/from/cn2.php.net/mirror
Tar-xf php-5.3.18.tar.gz & cd php-5.3.18
./Configure -- prefix =/usr/local/php -- with-apxs2 =/usr/local/apache2/bin/apxs & make install & cd ..
Configure php in httpd
Modify the/usr/local/apache2/conf/httpd. conf configuration file
Add content
<FilesMatch \. php $>
SetHandler application/x-httpd-php
</FilesMatch>
<FilesMatch "\. ph (p [2-6]? | Tml) $ ">
SetHandler application/x-httpd-php
</FilesMatch>
<FilesMatch "\. phps $">
SetHandler application/x-httpd-php-source
</FilesMatch>
Modify content
Add index. php In <IfModule dir_module>
4. Install libconfuse
Wget http://pkgs.repoforge.org/libconfuse/libconfuse-2.6-2.el5.rf.x86_64.rpm
Wget http://pkgs.repoforge.org/libconfuse/libconfuse-devel-2.6-2.el5.rf.x86_64.rpm
Rpm-ivh libconfuse -*
5. Install pcre
Wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.31.tar.gz
Tar-xf pcre-8.31.tar.gz & cd pcre-8.31
./Configure & make install & cd ..
Echo '/usr/local/lib'>/etc/ld. so. conf. d/libpcre. conf & ldconfig-v
6. Install rrdtool
Wget http://oss.oetiker.ch/rrdtool/pub/rrdtool-1.4.7.tar.gz
Tar-xf rrdtool-1.4.7.tar.gz & cd rrdtool-1.4.7
./Configure -- prefix =/usr/local & make install & cd ..
Echo '/usr/local/lib'>/etc/ld. so. conf. d/librrd. conf & ldconfig-v
7. Install the ganglia background service and set
Install
Wget http://sourceforge.net/projects/ganglia/files/ganglia%20monitoring%20core/3.4.0/ganglia-3.4.0.tar.gz/download
Tar-xf ganglia-3.4.0.tar.gz & cd ganglia-3.4.0
. /Configure -- prefix =/usr/local/ganglia -- with-gmetad -- with-librrd =/usr/local/lib -- sysconfdir =/etc/ganglia & make install & cd ..
Run gmond and gmetad as services and add them to startup (optional)
Copy to the service and set the startup
Cp ganglia-3.4.0/gmond. init/etc/rc. d/init. d/gmond
Cp ganglia-3.4.0/gmetad. init/etc/rc. d/init. d/gmetad
Chkconfig -- add gmond & chkconfig gmond on
Chkconfig -- add gmetad & chkconfig gmetad on
Modify service configuration information
Modify the/etc/rc. d/init. d/gmetad file to change the GMETAD variable to: GMETAD =/usr/local/ganglia/sbin/gmetad
And change the gmond variable to: GMOND =/usr/local/ganglia/sbin/GMOND in the/etc/rc. d/init. d/gmond file.
Set the storage location of rrd
Mkdir-p/var/lib/ganglia/rrds
Chown nobody: nobody/var/lib/ganglia/rrds
Generate a gmond configuration file and modify the configuration information (optional)
/Usr/local/ganglia/sbin/gmond-t | tee/etc/ganglia/gmond. conf
Modify the content of the cluster configuration segment, for example, name = "Cluster ". It can be left unchanged by default.
Modify gmetad configurations (optional)
Modify the configuration file/etc/ganglia/gmetad. conf
Change the data_source configuration name and server name to your own. Default
Open the comment before gridname and change it to your own name, for example, "cluster ". Default
8. install and configure ganglia web Client
Download and decompress
Wget http://sourceforge.net/projects/ganglia/files/ganglia-web/3.5.4/ganglia-web-3.5.4.tar.gz/download
Tar-xf ganglia-web-3.5.4.tar.gz
Cp-r ganglia-webpage-3.5.4/usr/local/apache2/htdocs/ganglia
Modify Makefile file and install
Cd/usr/local/apache2/htdocs/ganglia
Modify the GDESTDIR and APACHE_USER parameters in Makefile, and then execute make install to install
GDESTDIR =/usr/local/apache2/htdocs/ganglia
APACHE_USER = daemon
Make install
Modify the php configuration file
Cp conf_default.php conf. php
Modify the conf. php file
If you set the storage location of rrd according to the above settings, you can skip the changes to $ conf ['gmetad _ root'] and $ conf ['rrds, otherwise, change to the corresponding location.
$ Conf ['rdtool'] = "/usr/local/bin/rrdtool ";
$ Conf ['external _ location'] = http: // localhost/ganglia;
$ Conf ['case _ sensitive_hostnames '] = false;
9. Start ganglia
Start or restart httpd
/Usr/local/apache2/bin/apachectl start
Start gmetad
Service gmetad start
Start gmond
Service gmond start
Ii. Install the client
1. Install Dependencies
Yum-y install apr-devel apr-util
2. Install libconfuse
Same as server
3. Install pcre
Same as server
4. install and configure ganglia
Install
Tar-xf ganglia-3.4.0.tar.gz & cd ganglia-3.4.0
./Configure -- prefix =/usr/local/ganglia -- sysconfdir =/etc/ganglia & make install & cd ..
Configuration
Copy server configurations
Scp ip:/etc/rc. d/init. d/gmond/etc/rc. d/init. d/gmond
Mkdir/etc/ganglia
Scp ip:/etc/ganglia/gmond. conf/etc/ganglia
Add gmond to the service and start it on
Cp ganglia-3.4.0/gmond. init/etc/rc. d/init. d/gmond
Chkconfig -- add gmond & chkconfig gmond on
5. Start the ganglia Client
/Etc/init. d/gmond start
Iii. Special Requirements
If your server has two NICs, eth0 uses the public network address and eth1 uses the LAN address, the communication between your monitoring server and the monitored server you want to use the LAN address to reduce the load on the Internet Nic, you can use the following command
Ip route add 239.2.11.71 dev eth1
Because 239.2.11.71 is the default multi-point transmission channel of ganglia, you need to add a route so that it can pass through eth1, that is, the Intranet Nic. For the address 239.2.11.71, you can go to/etc/ganglia/gmond. modify in conf

Use Ganglia to monitor Hadoop Clusters

Install and configure Hadoop and Ganglia in Ubuntu of VMware Workstation

Create a Grid

Ganglia installation tutorial yum

Ganglia Quick Start Guide (translated from the official wiki)

Install Ganglia-3.6.0 monitoring Hadoop-2.2.0 and HBase-0.96.0 on CentOS Cluster

  • 1
  • 2
  • Next Page

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.