Previously, Nginx was used to do the Tomcat program load, which later needed to parse the log. View the number of visits. Then I looked it up on the internet and used it.
Reference Address: http://daliang1215.iteye.com/blog/618829
1 . Install the package required for Webalizer Yum-Y Install gd-devel.i*2 Download the Webalizer source package Tar-XVJF webalizer-2.21- Geneva-SRC.TAR.BZ2CD Webalizer-2.21- Geneva./configure--with-language=Simplfied_chinese# #在lang的目录下面有个webalizer. simplfied_chinesemake file Specifically, the format of this file is gb2312, and it's best to convert to UTF -8, (here using the Linux command file to view the encoding, iconv-f gbk-t UTF-8 file1-o file2) # #如果要指定安装目录 need to add/configure behind.--prefix= Catalog make&&Make Install3 . Copy the Webalizer profile template and establish the Webalizer statistical results input directory CP/usr/local/etc/webalizer.conf.sample/usr/local/etc/Webalizer.confmkdir/var/log/Webalizer4. In/usr/local/etc/ Modify the following parameter in the webalizer.conf file # #nginx access.log directory LogFile /usr/local/nginx/logs/Access.log # #web访问目录, log generation directory OutputDir/usr/local/nginx/HTML Incremental Yes Incrementalname/var/lib/webalizer/webalizer.current5 . Run Webalizer# #先建立一个软连接Ln-s/usr/local/etc/webalizer.conf/etc/webalizer.conf# #运行webalizer-c/etc/webalizer.conf# #定时生成日志crontab-e0 0* * * */usr/local/bin/webalizer-c/etc/webalizer.conf# #意思每天生成日志文件# # Start Timer Task service crond start# # Stop service Crond stop # #查看定时任务crontab-L# #其它问题configure:error:png library not found: Please install libpng fix yum install libpng libpng
-DEVELCONFIGURE:ERROR:GD Library not found: Please install LIBGD solve yum-Y Install GD gd-devel If no cross compiler is required, yum install gcc-c++ libstdc++-devel