The statistics include: Access Overview, dynamic page requests, static page requests (such as images, style sheets, scripts, etc.), visitor rankings, guest operating systems, and visitor browsers, lailu domain name, 404 error, search crawler, search keyword, and so on.
Analyzing nginx logs is a headache. In the past, I downloaded the logs to my local computer and then opened them. I searched for the relevant access records and log information. Now, with GoAccess, you don't need to worry about it. I have also seen this software before, but how to install it is wrong, and I will solve it. The following describes the specific installation method.
First, install the necessary software environment Centos
[Root @ sd-44519 ~] # Yum-y install glib2 glib2-devel ncurses-devel GeoIP-devel
Why is the installation error in the previous tutorial? Most of them indicate that the software cannot be found in the source. In fact, this problem is caused by a wrong person who wrote the tutorial. The software name is case-sensitive. In many tutorials provided by Baidu, GeoIP is written in lower case, leading to installation errors.
If there is no error in this step, continue. If the system still prompts that there is no software in the source, it may be that the source you are using does not have a GeoIP, so you need to add other sources to solve the problem.
Use the following source for 32-bit access;
[Root @ sd-44519 ~] # Yum install http://mirrors.sohu.com/fedora-epel/6/i386/epel-release-6-8.noarch.rpm
Use the following sources for 64-bit requests;
[Root @ sd-44519 ~] # Yum install http://mirrors.ustc.edu.cn/fedora/epel/6/i386/epel-release-6-8.noarch.rpm
Install GeoIP after updating the source.
[Root @ sd-44519 ~] # Yum-y install GeoIP-devel
Second, download the GoAccess compilation
I don't know why an error occurs when I use the old version, so I use the latest version 0.9 directly.
[Root @ sd-44519 ~] # Wget http://tar.goaccess.io/goaccess-0.9.tar.gz
[Root @ sd-44519 ~] # Tar-xzvf goaccess-0.9.tar.gz
[Root @ sd-44519 ~] # Cd goaccess-0.9/
[Root @ sd-44519 goaccess-0.9] #./configure -- enable-geoip -- enable-utf8
[Root @ sd-44519] # make
[Root @ sd-44519] # make install
Now the installation has been completed. I will not talk about the specific usage, and you can search for it online, and I will list the most basic ones.
[Root @ sd-44519 wwwlogs] # goaccess-f access. log-c-
Enter your log location and replace access. log with your actual log file name.
Select NCSA format, select space, and run Enter.
Running. The execution time varies depending on the log size.
The execution result is displayed in the upper/lower key list.