从开发网站上安装:
$ wget https://tar.goaccess.io/goaccess-1.5.tar.gz
$ tar -xzvf goaccess-1.5.tar.gz
$ cd goaccess-1.5/
$ ./configure --enable-utf8 --enable-geoip=mmdb
$ make
# make install
从github上安装:
$ git clone https://github.com/allinurl/goaccess.git
$ cd goaccess
$ autoreconf -fiv
$ ./configure --enable-utf8 --enable-geoip=mmdb
$ make
# make install
分析下网站日志:
# goaccess -f /usr/local/nginx/logs/access.log
格式选NASA就行.
生成网页:
# goaccess -f access.log --log-format=COMBINED -a >go.html
生成 json文件:
# goaccess access.log -a -d -o json > report.json