ganglia升级到3.6

yum安装ganglia3.1.17
# wget http://192.168.100.220/README/epel.repo
# wget http://192.168.100.220/README/rpmforge.repo
# wget http://192.168.100.220/epel/6/x86_64/epel-release-6-8.noarch.rpm
# rpm -ivh epel-release-6-8.noarch.rpm
# rpm –import /etc/pki/rpm-gpg/RPM-GPG-KEY-rpmforge
# yum install wget vim make openssh-clients -y
# yum install ganglia ganglia-devel ganglia-gmetad ganglia-gmond ganglia-web ganglia-gmond-python
# yum install httpd mysql ntpdate net-snmp yum-fastestmirror -y

在yum安装ganglia3.1.17 后升级ganglia:

# yum install –y gcc gcc-c++ libpng freetype zlib libdbi apr* libxml2-devel pkg-config glib pixman
# yum install pango pango-devel freetye-devel fontconfig cairo cairo-devel libart_lgpl libart_lgpl-devel pcre* rrdtool*
# wget http://jaist.dl.sourceforge.net/project/expat/expat/2.1.0/expat-2.1.0.tar.gz -P /usr/local/src/
# cd /usr/local/src
# tar -xf expat-2.1.0.tar.gz
# cd expat-2.1.0
# ./configure –prefix=/usr/local/expat
# make && make install
# cp -r /usr/local/expat/lib /usr/local/expat/lib64
# cd /usr/local/src
# wget http://ftp.twaren.net/Unix/NonGNU//confuse/confuse-2.7.tar.gz -P /usr/local/src/
# tar -xf confuse-2.7.tar.gz
# cd confuse-2.7
# ./configure CFLAGS=-fPIC –disable-nls –prefix=/usr/local/confuse
# make && make install
# cp -r /usr/local/confuse/lib /usr/local/confuse/lib64

# cd ganglia-3.6.0
# ./configure –with-gmetad –enable-gexec –with-libconfuse=/usr/local/confuse –with-libexpat=/usr/local/expat –prefix=/usr/local/ganglia –sysconfdir=/etc/ganglia
# yum install gettext ( 若报错的话,安装gettext )
# make && make install

# tar -xzvf ganglia-web-3.5.12.tar.gz
# cd ganglia-web-3.5.12
# vi Makefile //根据实际情况修改

# Location where gweb should be installed to (excluding conf, dwoo dirs).
GDESTDIR = /usr/share/ganglia-webfrontend

# Location where default apache configuration should be installed to.
GCONFDIR = /etc/ganglia-web

# Gweb statedir (where conf dir and Dwoo templates dir are stored)
GWEB_STATEDIR = /var/lib/ganglia-web

# Gmetad rootdir (parent location of rrd folder)
GMETAD_ROOTDIR = /var/lib/ganglia

APACHE_USER = apache 这里我修改成apache,原来是www-data
##########################################################

# make install
若报错:yum install rsync -y 即可
rsync –exclude “rpmbuild” –exclude “*.gz” –exclude “Makefile” –exclude “*debian*” –exclude “ganglia-web-3.5.12” –exclude “.git*” –exclude “*.in” –exclude “*~” –exclude “#*#” –exclude “ganglia-web.spec” –exclude “apache.conf” -a . ganglia-web-3.5.12
mkdir -p //var/lib/ganglia-web/dwoo/compiled && \
mkdir -p //var/lib/ganglia-web/dwoo/cache && \
mkdir -p //var/lib/ganglia-web && \
rsync -a ganglia-web-3.5.12/conf //var/lib/ganglia-web && \
mkdir -p //usr/share/ganglia-webfrontend && \
rsync –exclude “conf” -a ganglia-web-3.5.12/* //usr/share/ganglia-webfrontend && \
chown -R apache:apache //var/lib/ganglia-web

# ls /var/lib/ganglia-web/rrds/
# ln -s /var/lib/ganglia/rrds /var/lib/ganglia-web/
# cat <<EOF>> /etc/httpd/conf.d/ganglia.conf
Alias /ganglia-web /usr/share/ganglia-webfrontend
<Location /ganglia-web>
Order deny,allow
Allow from all
Allow from 127.0.0.1
Allow from ::1
</Location>
EOF
# service httpd restart
# vi /etc/ganglia/gmetad.conf
# vi /etc/ganglia/gmond.conf
# service gmetad restart
# service gmond restart

Print Friendly

发表评论

电子邮件地址不会被公开。 必填项已用*标注