zoukankan      html  css  js  c++  java
  • Installing AWstats 6.6

     AWStats 是一个免费的强大而有个性的工具,带来先进的网络,流量,FTP或邮件服务器统计图. 它能分析日志文件来自从各大服务器工具 ,如 Apache日志档案 (NCSA combined or common), WebStar, IIS (W3C),Proxy、Wap、流量服务器、邮件服务器和一些FTP服务器.

           AWStats官方网址:http://awstats.sourceforge.net/

           从官方网站下载AWStats,目前最新版本是6.6.


    # tar zxvf awstats-6.6.tar.gz
    # mv awstats-6.6 awstats
    # mv awstats /home/10235/        // 将awstats目录移动到网站根目录下
    # cd /home/10235/awstats/tools
    # perl awstats_configure.pl                       //配置awstats  

    //awststs默认安装在/usr/local/awstats下 不使用其默认目录
    Do you want to continue setup from this NON standard directory [yN] ? y   

    //输入你的web server的配置文件路径 使用none跳过设置
    Config file path (’none’ to skip web server setup):     
    > none

    Do you want me to build a new AWStats config/profile
    file (required if first install) [y/N] ? y

    Your web site, virtual server or profile name:
    www.10235.com

    //直接回车 使用默认路径 /etc/awstats
    Directory path to store config file(s) (Enter for default):      
    > /etc/awstats

    # vi /usr/local/etc/awstats/awstats.www.10235.com.conf //修改默认配置文件

        //指定日志路径 %YYYY-24%MM-24%DD代表今天20070513 %YYYY-24%MM-24%DD-24 代表昨天20070512
        LogFile=”/var/log/www/10235.%YYYY-24%MM-24%DD”    
        
         //指定日志类型 W - web log M - mail log F - ftp log S - streaming log
        LogType=W

        //指定日志格式 1 - Apache combined logs 2 - IIS
        LogFormat=1

        //站点绑定域名和站点别名
        SiteDomain=”www.10235.com
        HostAliases=”10235.com blog.10235.com

         //日志分析结果输出目录 确保该目录有写权限
        DirData=”/home/www/10235/awstats/dirdata”

         //是否允许通过浏览器更新分析
        AllowToUpdateStatsFromBrowser=1

    # crontab -e               //设定计划任务,每59分钟更新一次分析结果

    59 * * * * /home/10235/awstats/wwwroot/cgi-bin/awstats.pl -update -config=www.10235.com

        访问: http://10235.com/awstats/wwwroot/cgi-bin/awstats.pl?config=www.10235.com

    补充:配置Geo-IP

    Geo-IP C-API (http://www.maxmind.com/download/geoip/api/c/GeoIP-1.4.2.tar.gz )
    Geo-IP Perl-API ( http://www.maxmind.com/download/geoip/api/perl/Geo-IP-1.27.tar.gz )
    Geo::IPfree ( http://search.cpan.org/author/GMPASSOS/Geo-IPfree-0.2/ )

    //安装 Geo-IP C-API:
    # tar xzvf GeoIP-1.4.2.tar.gz
    # cd GeoIP-1.4.2
    # ./configure
    # make
    # make install

    //安装 Geo-IP Perl-API:
    # tar xzvf Geo-IP-1.27.tar.gz
    # cd Geo-IP-1.27
    # perl MakeFile.PL
    # make
    # make install

    //安装 Geo::IPfree
    # tar xzvf Geo-IPfree-0.2.tar.gz
    # cd Geo-IPfree-0.2
    # perl MakeFile.PL
    # make
    # make install

    # vi /etc/awstats/awstats.yourdomain.conf
       LoadPlugin=”geoipfree”

    更新统计和配置,在国家或地区ip那边,就能显示正确的国家国旗图标。

  • 相关阅读:
    前端入门21-JavaScript的ES6新特性
    redis 数据库安装和基本使用
    django 与 Vue 的结合使用说明
    websocket 与 tornado 的结合
    tornado 模板引擎
    tornado 初解
    ajax post 提交数据和文件
    Session Cookies随笔
    爬虫 scrapy 笔记
    绘制验证码 刷新验证码
  • 原文地址:https://www.cnblogs.com/myphoebe/p/2230046.html
Copyright © 2011-2022 走看看