参考博客 www.cnblogs.com/atomicbomb/p/6726119.html
操作系统 centos7 机器两台
一、 配置软件环境
操作步骤: 使用yum安装方式安装所需基础依赖包,然后下载源码进行编译安装。
(1) 源码包准备
(2)执行编译安装
#!/bin/bash sudo yum install perl-ExtUtils-Embed -y basedir=/home/zheng/ganglia #expat cd $basedir [ -d expat- ] && .tar.bz2 cd expat- # have bug ./configure --prefix=/opt/local/expat && make && sudo make install cd /opt/local/expat if [ ! -d lib64 ] ; then sudo makedir lib64 && sudo cp -a -f lib/* lib64 fi #apr cd $basedir [ -d apr-1.6.2 ] && rm -rf apr-1.6.2 tar zxvf apr-1.6.2.tar.gz && cd apr-1.6.2 ./configure --prefix=/opt/local/apr && make && sudo make install cd /opt/local/apr/include/apr-1/ sudo cp -R ./* ../../include/ sudo mkdir lib64 && sudo cp -R lib/* lib64/ #apr-util cd $basedir [ -d apr-util-1.6.0 ] && rm -rf apr-util-1.6.0 tar zxvf apr-util-1.6.0.tar.gz cd apr-util-1.6.0 ./configure --prefix=/opt/local/apr-util --with-apr=/opt/local/apr --with-expat=/opt/local/expat make && sudo make install #confuse cd $basedir [ -d confuse-2.7 ] && rm -rf confuse-2.7 tar zxvf confuse-2.7.tar.gz cd confuse-2.7 ./configure CFLAGS=-fPIC --disable-nls --prefix=/opt/local/confuse && make && sudo make install cd /opt/local/confuse && sudo rm -rf lib64 && sudo mkdir lib64 && sudo cp -R lib/* lib64 #pcre cd $basedir [ -d pcre-8.38 ] && rm -rf pcre-8.38 tar zxvf pcre-8.38.tar.gz cd pcre-8.38 ./configure --prefix=/opt/local/pcre && make && sudo make install cd /opt/local/pcre sudo mkdir lib64 && sudo cp -R lib/* lib64/ # rrdtool cd $basedir [ -d rrdtool-1.7.0 ] && rm -rf rrdtool-1.7.0 tar xvf rrdtool-1.7.0.tar.tar cd rrdtool-1.7.0 ./configure --prefix=/opt/local/rrdtool --disable-tcl make && sudo make install
二、 配置 gmetad
三、配置 gmond
四、搭建web环境