• Smokeping搭建


    Smokeping搭建

    1、安装其他源

    rpm -Uvh ftp://195.220.108.108/linux/sourceforge/i/it/itmos/rely%20on%20cnz/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm

    2、安装rrdtool与依赖库

    yum -y install perl perl-Net-Telnet perl-Net-DNS perl-LDAP perl-libwww-perl perl-RadiusPerl perl-IO-Socket-SSL perl-Socket6 perl-CGI-SpeedyCGI perl-FCGI perl-CGI-SpeedCGI perl-Time-HiRes perl-ExtUtils-MakeMaker perl-RRD-Simple rrdtool rrdtool-perl curl fping echoping  httpd httpd-devel gcc make  wget libxml2-devel libpng-devel glib pango pango-devel freetype freetype-devel fontconfig cairo cairo-devel libart_lgpl libart_lgpl-devel mod_fastcgi

    3、下载与安装smokeping

    wget http://oss.oetiker.ch/smokeping/pub/smokeping-2.6.8.tar.gz

    tar zxvf smokeping-2.6.8.tar.gz

    cd smokeping-2.6.8

    ./configure --prefix=/usr/local/smokeping

    出现问题是因为需要安装perl的模块,所以运行下面内容即可

    ./setup/build-perl-modules.sh /usr/local/smokeping/thirdparty

    ./configure --prefix=/usr/local/smokeping

    /usr/bin/gmake install

    4、配置smokeping

    (1)、创建cache、data、var目录

    cd /usr/local/smokeping

    mkdir cache data var

    (2)、在创建日志

    touch /var/log/smokeping.log

    (3)、授权

    chown apache:apache cache data var

    chown apache:apache /var/log/smokeping.log

    (4)、修改配置文件

    cd /usr/local/smokeping/htdocs/

    mv smokeping.fcgi.dist smokeping.fcgi

    cd /usr/local/smokeping/etc

    mv config.dist config

    vim config

    cgiurl   = http://some.url/smokeping.cgi 把some.url修改为你的ip或者域名

    step     = 300      从300改为60

    (5)、配置完成之后修改密码文件权限

    chmod 600 /usr/local/smokeping/etc/smokeping_secrets.dist

    (6)、修改apache的配置

    vim /etc/httpd/conf/httpd.conf

    末尾添加

    Alias /cache "/usr/local/smokeping/cache/"

    Alias /cropper "/usr/local/smokeping/htdocs/cropper/"

    Alias /smokeping "/usr/local/smokeping/htdocs/smokeping.fcgi"

    <Directory "/usr/local/smokeping">

    AllowOverride None

    Options All

    AddHandler cgi-script .fcgi .cgi

    AllowOverride AuthConfig

    Order allow,deny

    Allow from all

    AuthName "Smokeping"

    AuthType Basic

    AuthUserFile /usr/local/smokeping/htdocs/htpasswd

    Require valid-user

    DirectoryIndex smokeping.fcgi

    </Directory>

    (7)、设置登录账户与密码

    cd /usr/local/smokeping/htdocs

    设置登录账户与密码

    htpasswd -c /usr/local/smokeping/htdocs/htpasswd admin

    (8)、设置开机启动

    echo "/usr/local/smokeping/bin/smokeping --logfile=/var/log/smokeping.log 2>&1 &" >> /etc/rc.local

    chkconfig httpd on

    (9)、设置网页显示中文

    vi /usr/local/smokeping/etc/config

    *** Presentation ***

    charset = utf-8 //注:在这里添加.

    然后 yum search wqy 会出现

    复制前两个其中一个 yum install

    (10)、启动http与smokeping

    /etc/init.d/httpd start

    /usr/local/smokeping/bin/smokeping --logfile=/var/log/smokeping.log 2>&1 &

    然后访问你在config里设置的cgiurl= http://some.url/smokeping

    注意如果出现500错误就是因为没有关闭selinux的问题,关闭了就能正常打开。

    5.添加监控项目

    Config尾行添加

    vi /usr/local/smokeping/etc/config

     

    出现这种英文是正在生成图表,一般重启smokeping之后,图表就生成完成。重启没有生效等几分一般就会生成图表。一般不是报错或者搭建没成功。。。。。。。。。。。。。。。。

  • 相关阅读:
    计算机基础
    如何增加一个IT产品的用户黏性
    计算机相关专业一门课程一个案例
    【2012年6月14日】中兴发布Grand(智观)N970
    bmp格式浅析
    3Dbook的使用
    中英文翻译格式
    软件学习书籍推荐
    WEB开发基础
    PHP学习
  • 原文地址:https://www.cnblogs.com/JimGreen/p/6595087.html
Copyright © 2020-2023  润新知