Steps of installation of AWstats

1)

wget awstats-6.6.1-noarch.rpm

Try wget from http://awstats.sourceforge.net/

2)

rpm -Uvh awstats-6.6.1-noarch.rpm

3)

cd /usr/local/awstats/tools/
./awstats_configure.pl

Run the config script and entry :
--> /etc/httpd/conf/httpd.conf (httpd config path)
--> www.abc.com (domain name)
--> /etc/awstats (enter for default awstat config path)

4)

vi /etc/awstats/awstats.www.abc.com.conf

--> logFile="/var/log/httpd/access_log" to set awstats config of httpd log path

5)

mkdir /var/lib/awstats

set awstats txt database directory path

6)

wget Geo-IP-PurePerl-1.18.tar.gz (or wget Geo-IPfree.tar.gz)

To make the plugin MODULES"
--> tar -zxvf Geo-IP-PurePerl-1.18.tar.gz
--> perl Makefile.pl
--> make
--> make install

7)

mkdir /usr/local/share/GeoIP

Create the folder for plugin .dat

8)

wget -N http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz
gunzip GeoIP.dat.gz
mv GeoIP.dat /usr/local/share/GeoIP

Download plug-in data for Country, can be found in www.maxmind.com

9)

wget -N http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz
gunzip GeoLiteCity.dat.gz
mv GeoLiteCity.dat /usr/local/share/GeoIP

Download plug-in data for city, can be found in www.maxmind.com

10)

vi /etc/awstats/awstats.www.abc.com.conf

uncomment and modify as below:
--> Loadplugin="LoadPlugin="geoip_city_maxmind GEOIP_STANDARD /usr/local/share/GeoIP/GeoLiteCity.dat"
--> LoadPlugin="geoip GEOIP_STANDARD /usr/local/share/GeoIP/GeoIP.dat"
--> LoadPlugin="GeoIPFree" necessary if use GeoIPfree

11)

LANG=C /usr/local/awstats/tools/awstats_updateall.pl now

or

LANG=C /usr/local/awstats/wwwroot/cgi-bin/awstats.pl -config=www.abc.com -update

Generate/Re-generate the txt database of awstats, wait long time

12)

crontab -e

--> 0 0 * * * LANG=C /usr/local/awstats/tools/awstats_updateall.pl now &> /dev/null
Set cron job for update awstats everynight

13) use htpasswd and .htaccess to protect the page with authenication

14) Check and modify httpd.conf like as this and then restart httpd

Alias /awstatsclasses "/usr/local/awstats/wwwroot/classes/" Alias /awstatscss "/usr/local/awstats/wwwroot/css/" Alias /awstatsicons "/usr/local/awstats/wwwroot/icon/" ScriptAlias /awstats "/usr/local/awstats/wwwroot/cgi-bin/" <Directory "/usr/local/awstats/wwwroot"> Options None AllowOverride None Order allow,deny Allow from all AuthType Basic AuthName "Authentication" AuthUserFile /var/www/htpass Require valid-user </Directory>

/etc/init.d/httpd reload
htpasswd -cmb /var/www/htpass admin password

15) try see the page http://www.abc.com/awstats/awstats.pl


Server is hosted by Alanstudio
Linux Operating System

Recommend screen resolution 1024 x 768 / IE / FireFox
Alan Studio © 2007 by Alan Cheung Hin Lun. All rights reserved.