Jump to Navigation

260 - awstats Installation

1. Installation

# wget http://prdownloads.sourceforge.net/awstats/awstats-7.0-1.noarch.rpm

# # rpm -ihv awstats-7.0-1.noarch.rpm

Awstats has been installed in /usr/local/awstats .

2. Apache configuration

# vi /etc/httpd/conf/httpd.conf

==========================================================

From :
#AddHandler cgi-script .cgi

To :
AddHandler cgi-script .cgi .pl

==========================================================

3.Configure Awstats & Apache

# cd /usr/local/awstats/tools

# perl ./awstats_configure.pl

4. Edit the AWstats configuration file

# vi /etc/awstats/awstats.www.myserver.com.conf

=========================================================

* Specify the log name in that file.

LogFile="/var/log/httpd/access_log"

==========================================================

5. Collect the statistics

# /usr/local/awstats/wwwroot/cgi-bin/awstats.pl -config=www.myserver.com

Create/Update database for config "/etc/awstats/awstats.www.myserver.com.conf" by AWStats version 7.0 (build 1.971)
From data in log file "/var/log/httpd/access_log"...
Phase 1 : First bypass old records, searching new record...
Searching new records from beginning of log file...
Phase 2 : Now process new records (Flush history on disk after 20000 hosts)...
Jumped lines in file: 0
Parsed lines in file: 1599
 Found 0 dropped records,
 Found 0 comments,
 Found 0 blank records,
 Found 0 corrupted records,
 Found 0 old records,
 Found 1599 new qualified records.

6. Setup crontab

# crontab -e

50 * * * * /usr/local/awstats/tools/awstats_updateall.pl now

 



Main menu 2

Story | by Dr. Radut