Monday, June 08, 2009

Install AWstats on CentOS 5.x

What's AWstats?
AWStats is a free powerful and featureful tool that generates advanced web, streaming, ftp or mail server statistics, graphically. This log analyzer works as a CGI or from command line and shows you all possible information your log contains, in few graphical web pages. It uses a partial information file to be able to process large log files, often and quickly. It can analyze log files from all major server tools like Apache log files (NCSA combined/XLF/ELF log format or common/CLF log format), WebStar, IIS (W3C log format) and a lot of other web, proxy, wap, streaming servers, mail servers and some ftp servers.

1. 於 搜尋並下載awstat*rpm for RHEL5.x (awstats-6.9-2.el5.rf.noarch.rpm)
2. # rpm -ivh awstat*rpm
3. 修改/etc/httpd/conf/httpd.conf:
AddHandler cgi-script .cgi .pl
4. 修改/etc/httpd/conf.d/awstats.conf :
Alias /awstats/icon/ /var/www/awstats/icon/
ScriptAlias /awstats/ /var/www/awstats/
        Options ExecCGI
        Order allow,deny
        Allow from all
#       order deny,allow
#       deny from all
#       allow from
5. 將/etc/awstats/awstats.localhost.localdomain.conf改成/etc/awstats/awstats.IPADDRESS.conf (e.g., IPADDRESS=

如此一來就馬上有資料產生了,之後就交給system crontable更新吧!

7. 開啟瀏覽器並輸入,成功的話應該會看到以下的畫面:

Note: awstats.IPADDRESS.conf 有許多參數可調整,請參考裡面的說明。

No comments: