nginx重新整理——————分析log数据[六]

前言

简单介绍一下goaccess。

正文

安装:

yum install epel-release
yum install GeoIP GeoIP-devel GeoIP-data
yum install libncursesw5-dev ncurses-libs ncurses-devel

然后:

$ wget http://tar.goaccess.io/goaccess-1.2.tar.gz
$ tar -xzvf goaccess-1.2.tar.gz
$ cd goaccess-1.2/
$ ./configure --enable-utf8 --enable-geoip=legacy
$ make
# make install

启动:

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

后台运行的方式:

读取所有日志文件有了,就剩让他在后台安安静静的运行了

需要用到tmux

安装:

yum install tmux
运行:

tmux     #运行tumx,运行后在其中直接输入如下命令行即可
goaccess access.log -o /var/www/html/report.html --log-format=COMBINED --real-time-html
后台运行:

退出tumx,按下Tumx的PREFIX键(默认是Ctrl+B),按下之后松开再次按d,即可离开Tmux开始后台执行

结束运行:

ps -ef | grep goaccess
kill xxxx   #直接杀掉相应的进程即可

效果:

下一节介绍https的配置。

posted @ 2022-05-02 00:01  敖毛毛  阅读(39)  评论(0编辑  收藏  举报