### [筆記] CentOS 6.6 + CACTI 0.8.8b

2015-06-09 工作筆記

這幾天弄了一台香港的VPS 想說看看對看影片有沒有幫助

VPN 設定好之後，想看看在看影片時，流量可以到多少

之前就有用過cacti ，感覺還不錯，裝起來也很容易，就想說來裝裝看

沒想到在 centos 6.6 上安裝碰到一堆問題….

在安裝好之後，如果有碰到這樣的錯誤

> RRDTool Command: > >

    /usr/bin/rrdtool graph -

    >
    > –imgformat=PNG

    >
    > –start=‘-86400’

    >
    > –end=‘-300’

    >
    > –title=‘Localhost - Traffic’

    >
    > –rigid

    >
    > –base=‘1000’

    >
    > –height=‘120’

    >
    > –width=‘500’

    >
    > –alt-autoscale-max

    >
    > –lower-limit=‘0’

    >
    > –vertical-label=‘bits per second’

    >
    > –slope-mode

    >
    > –font TITLE:10:

    >
    > –font AXIS:7:

    >
    > –font LEGEND:8:

    >
    > –font UNIT:7:

    >
    > DEF:a=‘/var/www/html/cacti-0.8.8b/rra/localhost_traffic_in_8.rrd’:‘traffic_in’:AVERAGE

    >
    > DEF:b=‘/var/www/html/cacti-0.8.8b/rra/localhost_traffic_in_8.rrd’:‘traffic_out’:AVERAGE

    >
    > CDEF:cdefa=‘a,8,’

    >
    > CDEF:cdefe=‘b,8,’

    >
    > AREA:cdefa#00CF00FF:‘Inbound’

    >
    > GPRINT:cdefa:LAST:’ Current:%8.2lf %s’

    >
    > GPRINT:cdefa:AVERAGE:‘Average:%8.2lf %s’

    >
    > GPRINT:cdefa:MAX:‘Maximum:%8.2lf %s\n’

    >
    > LINE1:cdefe#002A97FF:‘Outbound’

    >
    > GPRINT:cdefe:LAST:‘Current:%8.2lf %s’

    >
    > GPRINT:cdefe:AVERAGE:‘Average:%8.2lf %s’

    >
    > GPRINT:cdefe:MAX:‘Maximum:%8.2lf %s\n’

> > RRDTool Says: > >

    ERROR: opening ‘/var/www/html/cacti-0.8.8b/rra/localhost_traffic_in_8.rrd’: No such file or directory
    >
    >
    >

本來是參考 http://nbaiwan.blog.51cto.com/6286161/1167355 這篇

但是裡面的指令我執行起來會發生錯誤

去看了一下 yum 裡面就有類似的package

只要簡單一行 yum install php-pear-Net-UserAgent-Detect.noarch

補上這個package ，然後重起 httpd service

cacti 的圖形就正確了！

但是，大陸影片還是一堆不能看，我放棄了…

認命點，都放到百度雲盤，再下載回來看吧…

comments powered by Disqus
© 2017 by Lednerb
Bilberry Hugo Theme