1. confirm that Apache is installed:
NETSTAT-UTPLN |grep 80
2. download and unzip:
Tar zxvf awstats-7.3.tar.gz
MV Awstats-7.3/usr/local/awstats
3. Configure awstats:
Cd/usr/local/awstats/tools
chmod +x./*
./awstats_configure.pl
##### Start Configuration # # #
A. when prompted for httpd.conf input and enter continue:
/usr/local/httpd/conf/httpd.conf
B. other prompt input:y enter to continue
C. when prompted for the profile name, enter:
Http://www.gxfc.com
# # # config end # # #
4. Modify The awstats configuration file:
Vim/etc/awstats/awstats.http://www.gxfc.com.conf
Logfile= "/usr/local/httpd/logs/access_log" # # Modify the first line
: Wq
Mkdir/var/lib/awstats
5. set up scheduled tasks and restart the server:
echo "*/5 * * * */usr/local/awstats/tools/awstats_updateall.pl Now" >/var/spool/cron/root # # each 5 minute Update
/usr/local/awstats/tools/awstats_updateall.pl Now # # perform the first update
/usr/local/httpd/bin/apachectl restart
NETSTAT-UTPLN |grep 80
/etc/init.d/crond restart
Crontab-l
Chkconfig Crond on
6. Access test:
Http://http://www.gxfc.com/awstats/awstats.pl?config=http://www.gxfc.com
To write a simplified page:
Vim/usr/local/httpd/htdocs/aws.html
<meta http-equiv= "Refresh" content= "0; Url=http://http://www.gxfc.com/awstats/awstats.pl?config=http://www.gxfc.com "/>
<body></body>
: Wq
Access:
Http://http://www.gxfc.com/aws.html
This article is from the "11628205" blog, please be sure to keep this source http://11638205.blog.51cto.com/11628205/1917157
Awstats Log Analysis System Deployment (HTTPD)