zoukankan      html  css  js  c++  java
  • goaccess的安装和使用

    一.简介
    1.goaccess用于分析apache和nginx日志的强大工具


    2.官网:
    https://goaccess.io

    二.安装
    1.下载goaccess的安装包
    wget http://tar.goaccess.io/goaccess-1.1.1.tar.gz

    2.如果需要启用geoip,则1.1的版本,需要geoip.1.4.7的版本,编译安装geoip.1.4.7

    cd /usr/local/src
    wget http://geolite.maxmind.com/download/geoip/api/c/GeoIP-1.4.7.tar.gz
    wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz

    tar xzvf GeoIP-1.4.7.tar.gz
    cd GeoIP-1.4.7
    ./configure && make && make install
    mv GeoIP.dat.gz /usr/local/share/GeoIP/


    3.编译安装goaccess

    tar -xzvf goaccess-0.8.1.tar.gz
    cd goaccess-0.8.1/
    tar -xzvf goaccess-1.1.1.tar.gz
    cd goaccess-1.1.1/
    ./configure --enable-geoip --enable-utf8
    make
    make install

    如果出现
    goaccess: error while loading shared libraries: libGeoIP.so.1
    错误

    ln -s /usr/local/lib/libGeoIP.so* /lib64/


    三.使用
    1.简单使用
    goaccess -f access.log

    2.使用指定的配置文件
    wget -O .goaccessrc https://raw.githubusercontent.com/allinurl/goaccess/master/config/goaccess.conf --no-check-certificate

    vi .goaccessrc
    选择和编辑合适的date-format,log-format,time-format

    goaccess -f access.log -d -a -p ~/.goaccessrc

    输出到文件便于web查看

    goaccess -f access.log -d -a -p ~/.goaccessrc > log.html

    更多详细的使用:https://goaccess.io/man

  • 相关阅读:
    poj 2251
    poj 1321
    poj 2777
    poj 3468
    poj 2318
    javascript
    buhui
    swift 构造器
    mac上不了网
    字体
  • 原文地址:https://www.cnblogs.com/itfenqing/p/6194051.html
Copyright © 2011-2022 走看看