Webalizer Chinese Installation resolution configuration

Source: Internet
Author: User

Previously installed in English, now replaced with Chinese
Reference Address: http://haolulu.blog.51cto.com/3164472/630894

1. Install the Webalizer required packages (need to use the relevant JPEG,png,zlib library )
Yum-y Install gd-devel.i*
Yum Install jpeg*
Yum Install png*
2. Download the Webalizer source package
2.1 Decompression
TAR-ZXVF webalizer-2.21-02-src.tar.bz2
2.2 Go to Catalog
CD webalizer-2.21-02
2.3 go to the lang directory
webalizer_lang.simplified_chinese Convert file format to utf-8 (UltraEdit I use)
2.4 Find a Chinese font and upload it to the server
Address
(I have a Chinese font uploaded to this directory from the win system)
2.5 Jump back to the lounge file directory

2.6 Modify this file graphs.c
VI GRAPHS.C
Add at the end of the document
voidGdimagestring (Gdimageptr im, gdfontptr font,intXintY, unsignedChar*s,intcolor) {gdimagestringft (IM,0, Color,"/usr/share/fonts/simfang.ttf",9,0.0, X, y+9, s);}voidGdimagestringup (Gdimageptr im, gdfontptr font,intXintY, unsignedChar*s,intcolor) {gdimagestringft (IM,0, Color,"/usr/share/fonts/simfang.ttf",9,-pi/2, X, Y9, s);} 
Note that/usr/share/fonts/simfang.ttf is the absolute location of the Chinese fonts you upload yourself.
  2.7 Compiling Webzlizer
./configure--with-language=simplified_chinese
Make
2.8 Installation
1. Upgrade to replace the original
There is a webalizer in the directory that replaces the Webalizer binaries in the directory you originally installed.
CP webalizer/usr/bin/
2. Installation
Make install
Installed by default on/usr/local/bin/webalizer (can be specified at installation location--prefix=)

3. Running Webalizer
3.1 Configuring the Webalizer.conf file
Default Read/etc/webalizer.conf
# #nginx Access.log directory (can make compressed files) LogFile          /usr/local/nginx/logs/access.log# #web访问目录, log generation directory OutputDir     /usr/local/nginx/htmlincremental     Yes
/var/lib/webalizer/webalizer.current
HostName the name of the statistic (default is host name)
   3.2 Run
/usr/bin/webalizer
3.3 Timed operation
Crontab-e
0 0 * * */usr/bin/webalizer & (log generated once a day)

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.