Ganglia离线安装笔记

依赖资源:http://oss.oetiker.ch/rrdtool/pub/libs/
参考:
    http://thinkingquest.blog.163.com/blog/static/203677175201261310456643/
    http://blog.csdn.net/osoon/article/details/5526455
    http://blog.csdn.net/dumeifang/article/details/2963223
    http://www.lingzhong.cn/tech/18834.htm

1、安装pixman

    pixman-0.10.0.tar.gz
    ./configure
    make
    make install
    

2、安装cairo

    cairo-1.6.4.tar.gz
    ./configure
    
    configure: error: pixman >= 0.10.0 is required
    export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/local/share/pkgconfig:/usr/lib/pkgconfig:/usr/share/lib/pkgconfig
    
    ./configure
    make
    make install
    

3、安装pango

    pango-1.17.5.tar.gz
    ./configure
    make
    make install
    

4、安装rrdtool

    rrdtool-1.4.8.tar.gz
    ./configure --prefix=/usr/local/rrdtool-1.4.8 --datarootdir=/home/rrdtool
    make
    make install
    

5、安装ganglia

    ganglia-3.6.0.tar.gz
    
    /usr/bin/ld: cannot find -lrrd
    find / -name librrd.so
        /usr/local/rrdtool-1.4.8/lib/librrd.so
    cd /usr/lib
    ln -s /usr/local/rrdtool-1.4.8/lib/librrd.so librrd.so
    gcc -lrrd --verbose
    
    ./configure --prefix=/usr/local/ganglia  --datarootdir=/home/ganglia --with-librrd=/usr/local/rrdtool-1.4.8 --with-gmetad
    make
    make install
    

6、执行

    ./gmetad -d 3
    error while loading shared libraries: librrd.so.4
    ln -s /usr/local/rrdtool-1.4.8/lib/librrd.so.4 /usr/local/lib/librrd.so.4
    
    Going to run as user nobody Please make sure that /var/lib/ganglia/rrds exists: No such file or directory
    mkdir -p /var/lib/ganglia/rrds
    chown nobody.nobody /var/lib/ganglia/rrds
    

7、开机自启动

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

8、安装nginx + php

    1)安装nginx
        nginx-1.4.7.tar.gz
        ./configure --prefix=/usr/local/nginx \
        --pid-path=/var/run/nginx.pid \
        --error-log-path=/home/logs/nginx/error.log \
        --http-log-path=/home/logs/nginx/access.log \
        --with-http_stub_status_module
        make
        make install
        
        cp nginx.init /etc/init.d/nginx
        chmod +x /etc/init.d/nginx
        chkconfig nginx on
        chkconfig --list nginx
        
        /etc/init.d/nginx
        /bin/sh^M:bad interpreter: No such file or directory
        解决办法
        :set ff 或 :set fileformat 
        可以看到如下信息 
        fileformat=dos 或 fileformat=unix 
        利用如下命令修改文件格式 
        :set ff=unix 或 :set fileformat=unix 
        :wq (存盘退出) 
        最后再执行文件 
        
        统计
        location /nginx_status {  
            stub_status on;  
            access_log   off;  
            #allow SOME.IP.ADD.RESS;  
            #deny all;  
        } 
        
    2)安装php
    ./configure  --prefix=/usr/local/php  \
    --with-mysql=/usr/local/mysql \#设置mysql的安装路径
    --enable-fastcgi \ #开启fastcgi支持
    --enable-debug #支持调试
    make
    make install
    
    3)对接
    location ~ [^/]\.php(/|$) {
            fastcgi_split_path_info ^(.+?\.php)(/.*)$;
            if (!-f $document_root$fastcgi_script_name) {
                    return 404;
            }


            fastcgi_pass 127.0.0.1:9000;
            fastcgi_index index.php;
            include fastcgi_params;
    }

9、安装gweb

    ganglia-web-3.5.12.tar.gz
    
    tar -zxvf ganglia-web-3.5.12.tar.gz
    cd ganglia-web-3.5.12/
    vim MakeFile
        修改 GDESTDIR = /var/www/html/ganglia
        修改 APACHE_USER = apache
        x 保存
    make install
        没有报错即安装成功
    cd /var/www/html/ganglia
    vim conf_default.php
        修改 rrdtool 路径: $conf['rrdtool'] = "/usr/local/rrdtool-1.4.8/bin/rrdtool"
    
    访问:http://server-ip/ganglia
    可能存在权限问题,解决办法:
    cd /var/www/html
    chown apache:apache ganglia/

10、gstat

    cd /usr/bin
    ln -s /usr/local/ganglia/bin/gstat ./gstat
    gstat

转载于:https://www.cnblogs.com/xingxiudong/p/3986866.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值