ubuntu16.04安装GoAccess
GoAccess下载地址:https://goaccess.io/download
安装步骤:
安装nginx:(上传源码包):
[root@localhost ~]# systemctl stop firewalld
[root@localhost ~]# setenforce 0
[root@localhost ~]# yum -y install gcc gcc-c++ pcre-devel zlib-devel
[root@localhost ~]# tar zxf nginx-1.12.2.tar.gz
[root@localhost ~]# cd nginx-1.12.2
[root@localhost nginx-1.12.2]# ./configure --prefix=/usr/local/nginx
[root@localhost nginx-1.12.2]# make && make install
[root@localhost nginx-1.12.2]# /usr/local/nginx/sbin/nginx
[root@localhost ~]# ps -ef | grep nginx
安装goaccess:
[root@localhost ~]# yum -y install gcc gcc-c++ pcre-devel zlib-devel glib2 glib2-devel ncurses ncurses-devel GeoIP GeoIP-devel
[root@localhost ~]# wget https://tar.goaccess.io/goaccess-1.4.tar.gz
[root@localhost ~]# tar zxf goaccess-1.4.tar.gz
[root@localhost ~]# cd goaccess-1.4
[root@localhost goaccess-1.4]# ./configure --enable-utf8 --enable-geoip=legacy
[root@localhost goaccess-1.4]# make && make install
操作:
[root@localhost ~]# goaccess /usr/local/nginx/logs/access.log
开启goaccess:
[root@localhost goaccess-1.4]# mkdir /usr/local/nginx/html/nginx_log
[root@localhost goaccess-1.4]# goaccess /usr/local/nginx/logs/access.log -o /usr/local/nginx/html/nginx_lo