zoukankan      html  css  js  c++  java
  • 在线安装Ganglia3.6.0,nginx+php搭建gweb,绝对通过

    环境:CentOS6.5 minimal
    目标:安装Ganglia核心组件(gmond, gmetad, gmetric, gstat, libganglia)、Ganglia web

    准备

    yum增加 epel 源
        rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
    下载
        http://ganglia.info/ 

    安装依赖包

        yum install gcc apr apr-devel libconfuse libconfuse-devel expat-devel pcre pcre-devel  –y
        假设需安装gmetad
        yum install rrdtool rrdtool-devel -y
        假设安装gweb
        yum install rsync -y

    安装gmond

        tar -zxvf ganglia-3.6.0.tar.gz
        cd ganglia-3.6.0/
        ./configure
        make && make install
        

    安装gmetad

        ./configure --with-gmetad
         make && make install

    配置gmond、gmetad服务

        cp gmetad/gmetad.init /etc/init.d/gmetad
        chkconfig --add gmetad

        cp gmond/gmond.init /etc/init.d/gmond
        chkconfig --add gmond

        vim /etc/init.d/gmond
        改动例如以下(find / =name 'gmond'搜索之):
        GMOND=/usr/local/sbin/gmond

        vim /etc/init.d/gmetad
        改动例如以下(find / =name 'gmetad'搜索之):
        GMETAD=/usr/local/sbin/gmetad

        为维护方便,改动配置路径:
        mkdir -p /etc/ganglia
        ln -s /usr/local/etc/gmetad.conf /etc/ganglia/gmetad.conf
        gmond -t > /usr/local/etc/gmond.conf
        ln -s /usr/local/etc/gmond.conf /etc/ganglia/gmond.conf
        

    安装PHP

        PHP5.3
        yum install php-fpm php-common php-devel php-mysqlnd php-mbstring php-mcrypt -y

        PHP5.5
        yum --enablerepo=remi,remi-php55 install php-fpm php-common php-devel php-mysqlnd php-mbstring php-mcrypt

        安装一个就可以

        chkconfig php-fpm on

    安装Nginx

        yum install nginx -y
        chkconfig nginx on

    Nginx配置php

        cd /etc/nginx/conf.d/
        mv default.conf defalut.conf.orig
        vim /etc/nginx/conf.d/defalut.conf
        新增例如以下代码:
    location ~ .php$ {
      root              /var/www;
      fastcgi_pass  127.0.0.1:9000;
      fastcgi_index   index.php;           
      fastcgi_param SCRIPT_FILENAME  $document_root/$fastcgi_script_name;           
      include           fastcgi_params;       
    }

    启动服务

        service gmond start
        service gmetad start
        service php-fpm start
        service nginx start

    測试PHP+Nginx

        cd /var/www
        vim test.php
    <?php
    phpinfo();
    ?>
        
        訪问:http//<php server ip>/test.php,出现例如以下界面即为调试成功
        

    安装Ganglia Web

        tar -zxvf ganglia-web-3.5.12.tar.gz
        cd ganglia-web-3.5.12/
        vim Makefile
    GDESTDIR = /var/www/ganglia
    APACHE_USER = apache                    # 与 /etc/php-fpm.d/www.conf 中user保持一致
        make install

        Nginx新增ganglia文件文件夹訪问配置
        vim /etc/nginx/conf.d/defalut.conf
    location /ganglia {
       root   /var/www;
       index  index.html index.htm index.php;
    }    

        cd /var/www
        chown apache:apache ganglia/

        mkdir -p /var/lib/ganglia/rrds
        chown nobody:nobody /var/lib/ganglia/rrds
        

    訪问Ganglia Web

        http://<ganglia server ip >/ganglia
        呈现例如以下界面:

    (完)
查看全文
  • 相关阅读:
    turtle 绘制爱心
    数据库总结
    anconda安装使用
    爬虫之存储库MongoDB
    【python】代码换行的几种方法
    【python】 合并列表的方法
    【notebook】常用在线notebook总结
    【PDF】PDF无法注释的一种解决方案
    【课程】MIT深度学习课程:架起理论与实践的桥梁
    【今日CV 视觉论文速览】Thu, 21 Feb 2019
  • 原文地址:https://www.cnblogs.com/ldxsuanfa/p/10651300.html
  • Copyright © 2011-2022 走看看