GoAccess is a tool used to collect access logs of ApacheWeb servers. it is fast and can generate real-time statistical reports. $ Yuminstallglib2glib2-develglibcmakegeoipncurses-devel $ wgethttp: sourceforgene GoAccess is a tool used to count access logs on Apache Web servers. it is fast and generates real-time statistical reports.
$ Yum install glib2 glib2-devel glibc make geoip ncurses-devel
$ Wget http://sourceforge.net/projects/goaccess/files/0.5/goaccess-0.5.tar.gz/download
$ Sudo tar-vzxf goaccess-0.5.tar.gz
$ Cd goaccess-0.5/
$ Sudo./configure -- enable-geoip -- enable-utf8
$ Sudo make
$ Sudo make install
Use goaccess
$ Goaccess-f/var/logs/nginx/access. log-
Or
$ Zcat/var/logs/nginx/access. log. *. gz | goaccess
Or
$ Zcat-f/var/logs/nginx/access. log * | goaccess
Problem 1: "configure: error: *** glib2 not found!" is reported during compilation !" Error:
# Wget http://ftp.acc.umu.se/pub/GNOME/sources/glib/2.16/glib-2.16.0.tar.gz
# Tar zxvf glib-2.16.0.tar.gz
# Cd glib-2.16.0/
#./Configure
# Make
# Make install
# Echo "/usr/local/lib/">/etc/ld. so. conf. d/glib2-i386.conf
# Ldconfig
# Export PKG_CONFIG_PATH =/usr/local/lib/pkgconfig:/usr/lib/pkgconfig
Problem 1: fixed the "'Arg _ MAX 'not declared" error when glib2 was installed above:
Tester. o-MD-MP-MF. deps/gtester. Tpo-c-o gtester. o gtester. c
Gtester. c: In the 'launch _ test_binary 'function:
Gtester. c: 276: Error: 'Arg _ MAX 'is not declared (used for the first time in this function)
Gtester. c: 276: Error: (even if it appears multiple times in a function, each undeclared identifier
Gtester. c: 276: Error: only one report is reported in the function .)
Gtester. c: 276: Warning: unused variable 'argv'
Method 1: Add # define ARG_MAX 4096 to usr/include/limits. h.
Method 2: Add a line in apue.2e/include/apue. h: # define ARG_MAX 4096
Open apue.2e/threadctl/getenv3.c (including getenv1.c) and add a line: # include "apue. h"
Method 2 has not been tested by myself.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.