Webalizer安装使用指南

| No Comments | No TrackBacks

Webalizer 的配置不是很困难,但是对于新手来说,安装起来却十分的麻烦,本文将
详细叙述安装过程,帮你一步一步走向成功!
Webalizer 吹牛在一台 200 Mhz 的普通 Pentium 机器上处理一万条记录只需要一秒
钟,但是在我的赛扬机器上可没有那么快。大概是我做了 IP 地址的反向解析的缘故。但
是,不论速度如何,我认为 Webalizer 尽管不能和某些商业软件的界面媲美, 但是和其
他的开源软件比起来,其统计能力要强得多。

一、安装
Webalizer 需要用到相关的 jpeg, png 和 zlib库,这些库一般不缺省安装,因此初
学者会感到难于下手。由于这些库具有相关性,因此下面的安装步骤不能颠倒:

1、 jpeg 库的安装
从 http://www.ijg.org/ 下载 jpeg 库,解开压缩文件后,进入到这个目录:

./configure
  make
  make install
  cd ..

2、zlib 库的安装

从 http://www.info-zip.org/pub/infozip/zlib/ 下载 zlib 库后,

gunzip zlib*.tar.gz
  tar -xvpf zlib-1.1.3.tar
  mv zlib-1.1.3 zlib
  cd zlib
  ./configure
  make
  make test
  make install
  cd ..

3、libpng 库的安装

从 http://www.libpng.org/ 下载 libpng 后:

gunzip libpng*.tar.gz
  tar -xvpf libpng-1.0.10.tar
  mv libpng-1.0.10 libpng
  cd libpng
  cp scripts/makefile.linux makefile
  make
  make test
  make install
  cd ..

你还可以从 http://www.freetype.org/download.html 选择下载 freetype 字库,但是这个步骤不是必须的。

cd freetype*
  make setup
  make
  make install
  cd ..

下面我们就可以开始安装 gd 库了:

从 http://www.boutell.com/gd/ g下载 d-1.8.4.tar.gz :

cd gd-1.8.4

#如果需要使用 Xpm 或者 TrueType 支持,在 make 之前修改 Makefile。
#陈绪:需要运行./configure
make

#很多人会经历找不到 gd.h 的问题,建议你在硬盘上搜索老的 gd.h 版本,然后

make install

接下来,我们就可以开始安装 Webalizer 了,从 http://www.mrunix.net/webalizer/ 下载后:

cd webalizer-2.01-06
  ./configure
  make
  make install

如果不是通过源码编译的方法来安装 Webalizer 的话,你需要备份 /etc/webalizer.conf。

如果需要使用 DNS 反向解析功能的话,我们还需要安装 Berkeley DB。具体的安装可以参考文档:DNS.README。

二、配置:

一个普通的配置文件为:

HideReferrer www.freelamp.com
  Incremental yes
  PageType htm*
  PageType cgi
  PageType php
  PageType pl
  IgnoreHist no
  CountryGraph yes
  IndexAlias index.cgi
  IndexAlias index.php
  HideReferrer Direct Request
  HideURL *.gif
  HideURL *.GIF
  HideURL *.jpg
  HideURL *.JPG
  HideURL *.png
  HideURL *.PNG
  GroupURL /cgi-bin/* CGI Scripts
  GroupURL ../misc/* Images
  GroupReferrer yahoo.com/ Yahoo!
  GroupReferrer excite.com/ Excite
  GroupReferrer infoseek.com/ InfoSeek
  GroupReferrer webcrawler.com/ WebCrawler
  GroupReferrer google.com/ Google
  GroupReferrer lycos.com/ Lycos
  GroupReferrer metacrawler.com/ Metacrawler
  GroupAgent MSIE Internet Exploder
  GroupAgent Mozilla Netscape
  GroupShading yes
  MangleAgents 3

然后我们运行

/usr/local/bin/webalizer -Q -c /root/webalizer.conf -n www.freelamp.com -o /home/freelamp/public_html/log/ /home/freelamp/logs/freelamp.log
/usr/local/bin/webalizer -Q -c /etc/webalizer.conf -n tackle.prc.sun.com -o /usr/local/apache/htdocs/log/ /usr/local/apache/logs/access_log
把这句话写入 crontab ,我们就能从http://www.freelamp.com/log/ 看到日志统计结果了。



No TrackBacks

TrackBack URL: http://www.wujianrong.com/mt-tb.cgi/776

Leave a comment

About this Entry

This page contains a single entry by kevinwu published on June 28, 2006 4:27 PM.

安装webalizer was the previous entry in this blog.

Webalizer 网站流量分析软件快速配置教程 is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.