GoAccess 分析Apache日志

官方网址:https://goaccess.io/download
$ wget https://tar.goaccess.io/goaccess-1.9.4.tar.gz
$ tar -xzvf goaccess-1.9.4.tar.gz
$ cd goaccess-1.9.4/
$ ./configure --enable-utf8 --enable-geoip=mmdb
$ make
# make install

 编译过程中如果报错

configure: error:
    *** Missing development files for libmaxminddb library.

  需要安装

对于 CentOS 7 / 8 / Rocky / AlmaLinux:
sudo yum install libmaxminddb-devel
对于如果你使用的是 dnf(如 CentOS 8+ 或 Rocky Linux 8+):
sudo dnf install libmaxminddb-devel

  然后

$ ./configure --enable-utf8 --enable-geoip=mmdb
$ make
# make install

 

不启用实时服务,仅生成静态报告(最安全)

goaccess /var/log/apache2/access.log -o /var/www/html/report.html --log-format=COMBINED

  

posted @ 2025-06-18 11:55  楼前竹  阅读(18)  评论(0)    收藏  举报