# mkdir /var/www/html/usage
//准备页面所在的目录地址
# cd /usr/local/webalizer/etc
# cp webalizer.conf.sample webalizer.conf
# vi webalizer.conf
//需要注意的是,这里的flags要用相对路径来表示,否则国旗图案将不能够正常显示
LogFile /etc/httpd/logs/access_log
OutputDir /var/www/html/usage
PageType htm*
PageType cgi
GeoDB yes
GeoDBDatabase /usr/share/GeoDB
GeoIP yes
GeoIPDatabase /usr/share/GeoIP
CountryGraph yes
CountryFlags yes
FlagDir flags
HideURL *.gif
HideURL *.GIF
HideURL *.jpg
HideURL *.JPG
HideURL *.png
HideURL *.PNG
HideURL *.ra
# cd /etc/ld.so.conf.d
# vi webalizer.conf
/usr/local/lib/
# ldconfig
# vi /etc/httpd/conf/httpd.conf
DocumentRoot "/var/www/html/usage"
<Directory "/var/www/html/usage">
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
AuthName "Webalizer Access"
AuthType Basic
AuthUserFile /etc/httpd/conf/htpasswd.users
Require valid-user
</Directory>
# htpasswd -c /etc/httpd/conf/htpasswd.users webalizer
New password:
Re-type new password:
Adding password for user webalizer
# service httpd restart
手动运行一下webalizer:
# /usr/local/webalizer/bin/webalizer -c /usr/local/webalizer/etc/webalizer.conf
Webalizer V2.23-05 (Linux 2.6.32-220.el6.x86_64 x86_64) Simplified Chinese
使用日志文件 /etc/httpd/logs/access_log (clf)
输出结果到 /var/www/html/usage
产生报表的主机名是 'www.lingling.com'
没有找到历史信息文件...
正在生成报表 ---- 为 九月 2012
正在保存历史信息文件...
正在生成综合报表
76 条记录 共用时 1 秒, 76/sec
//可见正常的完成了日志的发布更新工作
