RHEL 7.1 compilation and installation of Ganglia 3.7.1

Source: Internet
Author: User
Tags rrdtool

RHEL 7.1 compilation and installation of Ganglia 3.7.1

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:

Expand the Python module under Ganglia 3.1.x (translated from the official wiki)

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

Install Ganglia on CentOS 6.5

Install Ganglia on Ubuntu 14.04 Server

This article permanently updates the link address:

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.