新建数据存储目录
[root@zonghe cgi]# pwd
/usr/local/tomcat6/webapps/awstats/WEB-INF/cgi
[root@zonghe cgi]# mkdir data
检查:
[root@zonghe awstats]# ls
css icon js tools WEB-INF
[root@zonghe awstats]# cd WEB-INF/cgi/
[root@zonghe cgi]# ls
awredir.pl awstats.localhost.conf awstats.pl bak.conf data lang lib plugins
在当前目录下新建data目录,不然下面步骤会报错
[root@zonghe cgi]# ./awstats.pl-config=localhost -update
Create/Update database for config"./awstats.localhost.conf" by AWStats version 7.0 (build 1.971)
From data in log file"/usr/local/tomcat6/logs/localhost_access_log.2013-07-02.log"...
Phase 1 : First bypass old records,searching new record...
Direct access after last parsed record(after line 11)
Jumped lines in file: 11
Found 11 already parsed records.
Parsed lines in file: 0
Found 0 dropped records,
Found 0 comments,
Found 0 blank records,
Found 0 corrupted records,
Found 0 old records,
Found 0 new qualified records.
会在data目录下生产相关文件
[root@zonghe cgi]# ll data/
total 8
-rw-r--r-- 1 root root 5843 Jul 2 22:28 awstats072013.localhost.txt