The log log analysis of the site is the necessary work that every webmaster often do, through the website log file we can analyze the major search engines on the site crawl situation. Recently my site made some adjustments, so want to see the log file, but because the site server environment is LNMP, so I found a nginx log file Analysis tool--goaccess. In this article we will share how to install Goaccess in Linux (CentOS) to analyze site logs.
Preparatory work:
System: CentOS6.5 (I built a virtual machine locally)
Web Services: Nginx
Log files: Access.log files (copy specific log files from your own environment)
Tool: Goaccess (official website: https://goaccess.io/)
Installation process:
Install some of the goacess support libraries, if there is a problem with the subsequent operation, it is most likely because some location installation, mainly including: Glib2,glib2-devel,geoip,geoip-devel,ncurses-devel,zlib, ZLIB-DEVEL,GCC.
Yum install glib2 glib2-devel geoip-devel ncurses-devel zlib zlib-devel
Yum Install Gcc-y
If it is a one-click installation, note the installation process prompts, which are not installed successfully, need to be installed separately, such as when I am operating locally, ncurses-devle, zlib, Zlib-devel installed by default, GEO-IP is not installed successfully, need to be installed separately.
650) this.width=650; "src=" Http://blog.cnezsoft.com/file-read-4093.png "width=" 645 "height=" 241 "alt=" File-read-4093.png "/>
Cd/usr/local/srcwget Http://geolite.maxmind.com/download/geoip/api/c/GeoIP-1.4.6.tar.gzwget/HTTP Geolite.maxmind.com/download/geoip/database/geolitecountry/geoip.dat.gztar XZVF GeoIP-1.4.6.tar.gzcd GeoIP-1.4.6. /configure && make && make INSTALLCD. MV geoip.dat.gz/usr/local/share/geoip/
Next we can install goaccess, here I am using the compile installation:
wget Http://tar.goaccess.io/goaccess-0.8.1.tar.gztar XZVF goaccess-0.8.1.tar.gzcd goaccess-0.8.1/./configure-- Enable-geoip--enable-utf8make && make install
Run the goaccess command to see if the installation was successful, and I am prompted with the following error when installing locally:
650) this.width=650; "src=" Http://blog.cnezsoft.com/file-read-4094.png "width=" 645 "height=" alt= " File-read-4094.png "/>
The 32-bit system uses the following command to resolve:
Ln-s/usr/local/lib/libgeoip.so*/lib/
The 64-bit system attempts to resolve using the following command:
Ln-s/usr/local/lib/libgeoip.so*/lib64/
Run the goaccess command again normally:
650) this.width=650; "src=" Http://blog.cnezsoft.com/file-read-4095.png "width=" 643 "height=" 319 "alt=" File-read-4095.png "/>
Goaccess using:
Find the directory where the log file Access.log is located, the simplest and most straightforward way to use:
Goaccess-f Access.log-c-A
Next, you will be prompted with the following interface, using the upper and lower arrow keys to select the third, with the space bar to confirm the selection, and then enter OK.
650) this.width=650; "src=" Http://blog.cnezsoft.com/file-read-4096.png "width=" 439 "height=" 297 "alt=" File-read-4096.png "/>
Of course, you can also generate HTML reports for more intuitive viewing of your data.
Goaccess-f access.log-a > report.html
This article we share how to install goaccess in the Linux system to analyze the website log, if everyone in the actual operation process encountered any problems, welcome to exchange discussions, we learn together, and common progress.
650) this.width=650; "src=" Http://blog.cnezsoft.com/1PYUj5Fg9fKFF.gif "style=" Width:1px;height:1px;border:none; " alt= "1pyuj5fg9fkff.gif"/>
This article is from the "12379180" blog, please be sure to keep this source http://12389180.blog.51cto.com/12379180/1948458
Linux system centOS6.5 using goaccess tools to analyze Nginx web logs