Webalizer Analysis Nginx Basic configuration

Source: Internet
Author: User

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

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.