RedHat Linux is installed by default, Yum software, but because of the reason for the activation of the authentication RedHat can not directly do yum install some software, if we need to install the software under the RedHat yum, we only use the source of Yum to change to CentOS is good, Then change all the variables in the source to the actual values so that you can use Yum to install the software we need directly.
Instructions for use
(Move the contents of the/ETC/YUM.REPOS.D to a different location and copy the downloaded. Repo into the/ETC/YUM.REPOS.D)
cd/etc/yum.repos.d/
MV redhat.repo/home/hadoop/
MV rhel-source.repo/home/hadoop/
1. Download the Centos6-base-163.repo file in the http://mirrors.163.com CentOS Help document and store it in/ETC/YUM.REPOS.D (note: Internet connection required)
Centos 5 wget Http://mirrors.163.com/.help/CentOS5-Base-163.repo
Centos 6 wget Http://mirrors.163.com/.help/CentOS6-Base-163.repo
Vi/etc/yum.repos.d/centos6-base-163.repo
Modified: (Change all $releasever to: 6)
If the baseurl=http://mirrors.163.com/centos/$releasever/updates/$basearch/
The $releasever in the change to: 6
namely: baseurl=http://mirrors.163.com/centos/6/updates/$basearch/
Save after editing, run:
Yum Clean all clears the original cache
Yum Makecache get Yum list
You will see:
Loaded Plugins:product-id, Refresh-packagekit, security, Subscription-manager
Updating certificate-based repositories.
Base | 3.7 KB 00:00
Base/group_gz | KB 00:03
base/filelists_db | 5.3 MB 00:41
.........
Omitted from the back
Install, you can try: Yum install gcc g++
It's irrelevant to the above.
d) Install package
Yum Install Rrdtool-devel
Yum Install COMPAT-EXPAT1
Yum Install httpd
Yum Install gcc g++
Yum-y Install Apr-util-devel
Yum Install Pcre-devel
Yum Install Zlib-devel
Yum instal php
Yum Install PHP-GD
Yum Install xorg-x11-server-xorg
Prepare the Environment
# lsb_release-a
[Email protected] yum.repos.d]# lsb_release-a
LSB Version::core-4.0-ia32:core-4.0-noarch:graphics-4.0-ia32:graphics-4.0-noarch:printing-4.0-ia32: Printing-4.0-noarch
Distributor Id:redhatenterpriseserver
description:red Hat Enterprise Linux Server Release 6.2 (Santiago)
release:6.2
Codename:santiago
S1, installation Gmond
Search the Gmond installation package in the local software library
[email protected] ~]# Yum search Ganglia-gmond
Loaded Plugins:fastestmirror
Loading mirror speeds from cached hostfile
* base:centos.ustc.edu.cn
* extras:centos.ustc.edu.cn
* updates:centos.ustc.edu.cn
Warning:no matches found For:ganglia-gmond
No Matches found
The search failed to display, possibly the current RPM release without the ganglia installation package.
[Email protected] ~]# RPM-UVH \
> http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
Retrieving http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
Warning:/var/tmp/rpm-tmp. L2dc50:header V3 rsa/sha256 Signature, key ID 0608b895:nokey
Preparing ... ########################################### [100%]
1:epel-release ########################################### [100%]
[Email protected] ~]#
Re-search (first execution will download epel/primary_db)
[email protected] ~]# Yum search Ganglia-gmond
Loaded Plugins:fastestmirror
Loading mirror speeds from cached hostfile
Omitted some lines ...
Ganglia-gmond.x86_64:ganglia Monitoring Daemon
Ganglia-gmond-python.x86_64:ganglia Monitor daemon python DSO and metric modules
Omitted some lines ...
[Email protected] ~]#
Installation
[email protected] ~]# Yum install ganglia-gmond-y
Yum installation automatically resolves headache-dependent package issues
S2, installation Gmetad
As described in the Gmond installation, if the local software library does not provide Gmetad, you will need to install Epel.
[email protected] ~]# Yum install ganglia-gmetad-y
You will find the following dependent packages installed:
Dependency installed:
Dejavu-fonts-common.noarch 0:2.30-2.el6 Dejavu-lgc-sans-mono-fonts.noarch 0:2.30-2.el6 Dejavu-sans-mono-fonts.noarch 0:2.30-2.el6 fontpackages-filesystem.noarch 0:1.41-1.1.el6 rrdtool.x86_64 0:1.3.8-6. El6
S3, installation Gweb
Wiki:http://sourceforge.net/apps/trac/ganglia/wiki/ganglia-web-2#installation
Before you install and configure Gweb, check that you have
Meet the following requirements:
Apache Web Server
PHP 5.2 and later
Installation and enablement of PHP JSON extensions
First install Apache and PHP 5
[[email protected] ~]# yum install httpd PHP
You will find the following dependent packages installed:
Dependency installed:
apr-util-ldap.x86_64 0:1.3.9-3.el6_0.1 httpd-tools.x86_64 0:2.2.15-29.el6.centos mailcap.noarch 0:2.1.31-2.el6 php-c li.x86_64 0:5.3.3-27.el6_5 php-common.x86_64 0:5.3.3-27.el6_5
PHP-enabled JSON extensions are required, and JSON is already included in PHP 5.2 and later.
Check the status of the JSON extension by examining the/etc/php.d/json.ini file, and if the JSON extension is enabled, the file should contain something similar to the following statement:
Extension=json.ini
Download the latest version of Gweb (https://sourceforge.net/projects/ganglia/files/gweb/)
This example is currently the latest version of 3.5.12
[Email protected] ~]# wget http://ncu.dl.sourceforge.net/project/ganglia/ganglia-web/3.5.12/ganglia-web-3.5.12.tar.gz
[Email protected] down]# TAR-ZXVF ganglia-web-3.5.12.tar.gz
[Email protected] down]# CD ganglia-web-3.5.12
Compiling makefile
[Email protected] ganglia-web-3.5.12]# vim Makefile
You can view some user default configurations:
##########################################################
# User Configurables:
##########################################################
# location where Gweb should is installed to (excluding Conf, Dwoo dirs).
Gdestdir =/usr/share/ganglia-webfrontend
# location where default Apache configuration should is installed to.
Gconfdir =/etc/ganglia-web
# Gweb Statedir (where conf dir and dwoo templates dir is stored)
Gweb_statedir =/var/lib/ganglia-web
# Gmetad RootDir (parent location of RRD folder)
Gmetad_rootdir =/var/lib/ganglia
Apache_user = Www-data
##########################################################
To modify the default configuration:
Gdestdir =/var/www/html/ganglia2
Apache_user = Apache
Note: Gdestdir and Apache_user are consistent with DocumentRoot, Apache in Apache configuration files (/etc/httpd/conf/httpd.conf)
Make install
S4, status check
Check if httpd is started:
[[Email protected] ~]# service httpd status
Start httpd:
[[Email protected] ~]# service httpd start
Check if Gmetad is started:
[[Email protected] ~]# service Gmetad status
Start Gmetad:
[[Email protected] ~]# service Gmetad start
Check if the local Gmond is started:
[[Email protected] ~]# service Gmond status
Start Gmond:
[[Email protected] ~]# service Gmond start
S5, close SELinux
If you skip this step, the following exception will appear when you open http://<server IP address>/ganglia2:
There is an error collecting ganglia data (127.0.0.1:8652): Fsockopen Error:permission denied
What is SELinux?
Http://wiki.centos.org/zh/HowTos/SELinux
To view the SELinux status:
[Email protected] ~]# Sestatus
SELinux status:enabled
SELINUXFS Mount:/selinux
Current Mode:permissive
Mode from config file:enforcing
Policy version:24
Policy from config file:targeted
To turn off SELinux:
[Email protected] ~]# Setenforce 0
Setenforce This command can instantly switch between the enforcing and Permissive modes, but these changes will not be retained when the system reboots.
To be effective after the next boot, you need to modify the selinux= behavior enforcing within the/etc/selinux/config.
S6, access ganglia monitoring platform
Http://<server IP address>/ganglia2/
The directory "/GANGLIA2" can be modified in the Ganglia-web makefile file and will need to be recompiled after modification.
Source: http://blog.csdn.net/xxd851116/article/details/21527055
Redhad Borrow CentOS Yum installation