RHEL7.1 compile and install Ganglia3.7.11. install the dependency yumgroupinstall-y "Developmenttools" "BasicWebServer" yuminstallpcrepcre-develapr-util-develapr-utilzlib-develzlibrrdtool-develrr
RHEL 7.1 compilation and installation of Ganglia 3.7.1
1. Install Dependencies
Yum groupinstall-y "Development tools" "Basic Web Server"
Yum install pcre-devel apr-util zlib-devel zlib rrdtool-devel rrdtool python-devel php
2. Add a user
Useradd ganglia
Passwd ganglia
3. Compile and install confuse from the source code.
Cd/usr/local/src
# Install confuse
Wget http://download.savannah.gnu.org/releases/confuse/confuse-2.7.tar.gz
Tar zxvf confuse-2.7.tar.gz
Cd confuse-2.7/
../Configure CFLAGS =-fPIC-disable-nls
Make & make install
Then compile and install ganglia
Wget http://sourceforge.net/projects/ganglia/files/ganglia%20monitoring%20core/3.7.1/ganglia-3.7.1.tar.gz/download
Mv download ganglia-3.7.1.tar.gz
Tar zxvf ganglia-3.7.1.tar.gz
Cd ganglia-3.7.1/
./Configure -- prefix =/usr/local/ganglia -- with-gmetad -- enable-gexec -- sysconfdir =/etc/ganglia -- with-python =/usr/bin/python
Make & make install
4. Configure gmetad and gmond.
Cp gmetad/gmetad. conf/etc/ganglia/
/Usr/local/ganglia/sbin/gmond-t | tee/etc/ganglia/gmond. conf
Configure gmetad first.
Vim/etc/ganglia/gmetad. conf
Data_source "my cluster" YOUR_FQDN
# Setuid_username "nobody"
Setuid_username "ganglia"
Then configure gmond.
Vim/etc/ganglia/gmond. conf
Setuid = yes
# User = nobody
User = ganglia
Udp_send_channel {
Bind_hostname = yes # Highly recommended, soon to be default.
# This option tells gmond to use a source address
# That resolves to the machine
Check the python extension of gmond to ensure that modpython. so is compiled.
Locate modpython. so
/Usr/local/ganglia/lib64/ganglia/modpython. so
# Create gmond python directory
Mkdir-p/usr/local/ganglia/lib64/ganglia/python_modules
/Usr/local/ganglia/sbin/gmond-d10
# Loaded module: python_module
# Copy python module/py. conf
Cp/usr/local/src/ganglia-3.7.1/gmond/python_modules/*. py/usr/local/ganglia/lib64/ganglia/python_modules
Cp/usr/local/src/ganglia-3.7.1/gmond/python_modules/conf. d/*. pyconf/etc/ganglia/conf. d
Configure the startup Item:
Cp gmetad/gmetad. init/etc/rc. d/init. d/gmetad
Cp gmond/gmond. init/etc/rc. d/init. d/gmond
Vim/etc/init. d/gemtad (edit these)
# GMETAD =/usr/sbin/gmetad
GMETAD =/usr/local/ganglia/sbin/gmetad
# Daemon $ GMETAD
Daemon $ GMETAD-c/etc/ganglia/gmetad. conf
Vim/etc/init. d/gmond (edit these)
# GMOND =/usr/sbin/gmond
GMOND =/usr/local/ganglia/sbin/gmond
# Daemon $ GMOND
Daemon $ GMOND-c/etc/ganglia/gmond. conf
Configure the systemd Service
Vim/usr/lib/systemd/system/gmetad. service (edit these lines)
[Service]
Type = forking
# PIDFile =/usr/local/ganglia/var/run/gmetad. pid
PIDFile =/var/run/gmetad. pid
# ExecStart =/usr/local/ganglia/sbin/gmetad -- pid-file =/usr/local/ganglia/var/run/gmetad. pid
ExecStart =/usr/local/ganglia/sbin/gmetad-c/etc/ganglia/gmetad. conf -- pid-file =/var/run/gmetad. pid
EnvironmentFile =-/etc/ganglia/default/gmetad
Vim/usr/lib/systemd/system/gmond. service (edit these lines)
[Service]
Type = forking
# PIDFile =/usr/local/ganglia/var/run/gmond. pid
PIDFile =/var/run/gmond. pid
# ExecStart =/usr/local/ganglia/sbin/gmond -- pid-file =/usr/local/ganglia/var/run/gmond. pid
ExecStart =/usr/local/ganglia/sbin/gmond-c/etc/ganglia/gmond. conf -- pid-file =/var/run/gmond. pid
Create a directory for rrdtool:
Mkdir-p/var/lib/ganglia/rrds
Chown ganglia: ganglia/var/lib/ganglia/rrds
Start the service:
Systemctl daemon-reload
Systemctl start gmetad
Systemctl start gmond
So far, netstat can see port listening, telnet localhost 8649, and xml. ps-ef confirms that gmetad and gmond are indeed running as ganglia users, "/var/lib/ganglia/rrds" directory contains file generation.
Netstat-tnlp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
Tcp 0 0 0.0.0.0: 8649 0.0.0.0: * LISTEN 18465/gmond
Tcp 0 0 0.0.0.0: 8651 0.0.0.0: * LISTEN 17783/gmetad
Tcp 0 0 0.0.0.0: 8652 0.0.0.0: * LISTEN 17783/gmetad
5. Configure ganglia-web
Wget http://sourceforge.net/projects/ganglia/files/ganglia-web/3.7.1/ganglia-web-3.7.1.tar.gz
Tar xzvf ganglia-web-3.7.1.tar.gz
Vi Makefile (Edit these)
GDESTDIR =/var/www/html/ganglia
APACHE_USER = apache
ZZ
Make install
6. Log in from the GUI.
Http: // YOUR_IP/ganglia/
You may also like the following articles about Ganglia. For more information, see:
Ganglia 3.1.x extension Python module (translated from the official wiki) http://www.linuxidc.com/Linux/2014-04/99565.htm
Use Ganglia to monitor Hadoop cluster http://www.linuxidc.com/Linux/2012-05/61349.htm
Install and configure Hadoop and Ganglia http://www.linuxidc.com/Linux/2013-06/85856.htm in Ubuntu for VMware Workstation
Build Grid http://www.linuxidc.com/Linux/2013-05/83673.htm in one of Ganglia installation deployments
Ganglia extremely simple installation tutorial yum http://www.linuxidc.com/Linux/2012-12/76536.htm
Ganglia Quick Start Guide (translated from official wiki) http://www.linuxidc.com/Linux/2013-11/92747.htm
Install Ganglia-3.6.0 monitoring Hadoop-2.2.0 and HBase-0.96.0 http://www.linuxidc.com/Linux/2014-01/95804.htm on CentOS Cluster
Ganglia installation http://www.linuxidc.com/Linux/2014-05/102024.htm in CentOS 6.5
Install Ganglia http://www.linuxidc.com/Linux/2014-08/105838.htm on Ubuntu 14.04 Server
This article permanently updates the link address: Http://www.linuxidc.com/Linux/2015-12/126199.htm