1.ubuntu16.04安装GoAccess
GoAccess下载地址:https://goaccess.io/download
安装步骤:
$ wget https://tar.goaccess.io/goaccess-1.3.tar.gz
$ tar -xzvf goaccess-1.3.tar.gz
$ cd goaccess-1.3/
$ ./configure --enable-utf8 --enable-geoip=legacy
$ make
# make install
Q1:在执行第四步./configure时,遇到问题:
configure: error:
*** Missing development files for the GeoIP library
解决方法:
$ wget https://github.com/maxmind/geoip-api-c/releases/download/v1.6.11/GeoIP-1.6.11.tar.gz
$ tar -xzvf GeoIP-1.6.11.tar.gz
$ cd GeoIP-1.6.11
$ ./configure
$ make
# make install
Q2:在执行第四步./configure时,遇到问题:
configure: error: *** Missing development libraries for ncursesw
解决方法:
要使用--enable-utf8,你需要安装ncursesw,下面是安装命令:
sudo apt-get install libncursesw5-dev
安装完成截图:
2.修改nginx服务器的配置文件nginx.conf
location /report.html {
alias /home/zopen/nginx/html/report.html; #指定个人配置的目录
}
如下图所示:
重新加载配置文件:
../sbin/nginx -s reload
3.打开网站,成功运行!