湖濱散記部落格的樹心幽徑[login][主頁]
311:20141205awstats移植

[root@localhost ~]# df
檔案系統                        1K-blocks      已用      可用 已用% 掛載點
/dev/mapper/fedora-root          51475068  44786484   4050760   92% /
devtmpfs                          4075204         0   4075204    0% /dev
tmpfs                             4080044        92   4079952    1% /dev/shm
tmpfs                             4080044       960   4079084    1% /run
tmpfs                             4080044         0   4080044    0% /sys/fs/cgro                                             up
tmpfs                             4080044   3570888    509156   88% /tmp
/dev/sda2                          487652     87662    370294   20% /boot
/dev/mapper/fedora-home         903627888   1951388 855751740    1% /home
/dev/mapper/VolGroup00-LogVol00 234218128 161928608  60193216   73% /run/media/w                                             ebadm/a324f61c-dd20-430b-bc76-ce8a1a77ceb2
[root@localhost ~]# cd  /run/media/webadm/a324f61c-dd20-430b-bc76-ce8a1a77ceb2
[root@localhost a324f61c-dd20-430b-bc76-ce8a1a77ceb2]#
[root@localhost a324f61c-dd20-430b-bc76-ce8a1a77ceb2]#
[root@localhost a324f61c-dd20-430b-bc76-ce8a1a77ceb2]# ls
bin   etc        home        media  MysqlPhpUser.inc  proc  selinux  tmp
boot  ga225data  lib         misc   net               root  srv      usr
dev   halt       lost+found  mnt    opt               sbin  sys      var
[root@localhost a324f61c-dd20-430b-bc76-ce8a1a77ceb2]# ls usr/local/awstats
docs  README.TXT  tools  wwwroot
[root@localhost a324f61c-dd20-430b-bc76-ce8a1a77ceb2]# ls usr/local/awstats -l
總計 20
drwxr-xr-x 3 root root 4096  2月 11  2009 docs
-rw-r--r-- 1 root root 6764 10月 25  2009 README.TXT
drwxr-xr-x 4 root root 4096  2月 11  2009 tools
drwxr-xr-x 7 root root 4096  2月 11  2009 wwwroot
[root@localhost a324f61c-dd20-430b-bc76-ce8a1a77ceb2]# cp -R usr/local/awstats /                                             usr/local
[root@localhost a324f61c-dd20-430b-bc76-ce8a1a77ceb2]# ls /usr/local/awstats
docs  README.TXT  tools  wwwroot
[root@localhost a324f61c-dd20-430b-bc76-ce8a1a77ceb2]# cp -R etc/awstats /etc
[root@localhost a324f61c-dd20-430b-bc76-ce8a1a77ceb2]# ls /etc/awstats
awstats.insecta.idv.tw.conf  awstats.insecta.idv.tw.conf.65
[root@localhost a324f61c-dd20-430b-bc76-ce8a1a77ceb2]# vi /usr/local/apache2/con                                             f/httpd.conf
[root@localhost a324f61c-dd20-430b-bc76-ce8a1a77ceb2]# ls /usr/local/awstats/wwwroot/cgi-bin
awredir.pl  awstats.model.conf  awstats.pl  lang  lib  plugins
[root@localhost a324f61c-dd20-430b-bc76-ce8a1a77ceb2]#  perl /usr/local/awstats/wwwroot/cgi-bin/awstats.pl -update -config=insecta.idv.tw
Error: AWStats database directory defined in config file by 'DirData' parameter (/var/lib/awstats) does not exist or is not writable.
Setup ('/etc/awstats/awstats.insecta.idv.tw.conf' file, web server or permissions) may be wrong.
Check config file, permissions and AWStats documentation (in 'docs' directory).
[root@localhost a324f61c-dd20-430b-bc76-ce8a1a77ceb2]# vi /etc/awstats/awstats.insecta.idv.tw.conf
[root@localhost a324f61c-dd20-430b-bc76-ce8a1a77ceb2]# ls /usr/local/apache2/logs/
access_log  error_log  httpd.pid
[root@localhost a324f61c-dd20-430b-bc76-ce8a1a77ceb2]# ls /usr/local/apache2/logs/ -l
總計 438604
-rw-r--r--. 1 root root  85595379 12月  5 08:31 access_log
-rw-r--r--. 1 root root 363519341 12月  5 08:31 error_log
-rw-r--r--  1 root root         4 12月  3 11:56 httpd.pid
[root@localhost a324f61c-dd20-430b-bc76-ce8a1a77ceb2]#  perl /usr/local/awstats/wwwroot/cgi-bin/awstats.pl -update -config=insecta.idv.tw
Error: AWStats database directory defined in config file by 'DirData' parameter (/var/lib/awstats) does not exist or is not writable.
Setup ('/etc/awstats/awstats.insecta.idv.tw.conf' file, web server or permissions) may be wrong.
Check config file, permissions and AWStats documentation (in 'docs' directory).
[root@localhost a324f61c-dd20-430b-bc76-ce8a1a77ceb2]#
[root@localhost a324f61c-dd20-430b-bc76-ce8a1a77ceb2]#
[root@localhost a324f61c-dd20-430b-bc76-ce8a1a77ceb2]# cp -R var/lib/awstats /var/lib
[root@localhost a324f61c-dd20-430b-bc76-ce8a1a77ceb2]#  perl /usr/local/awstats/wwwroot/cgi-bin/awstats.pl -update -config=insecta.idv.tw
Create/Update database for config "/etc/awstats/awstats.insecta.idv.tw.conf" by AWStats version 6.95 (build 1.943)
From data in log file "/usr/local/apache2/logs/access_log"...
Phase 1 : First bypass old records, searching new record...
Direct access to last remembered record is out of file.
So searching it from beginning of log file...
AWStats did not find any valid log lines that match your LogFormat parameter, in the 50th first non commented lines read of your log.
Your log file /usr/local/apache2/logs/access_log must have a bad format or LogFormat parameter setup does not match this format.
Your AWStats LogFormat parameter is:
1
This means each line in your web server log file need to have "combined log format" like this:
111.22.33.44 - - [10/Jan/2001:02:14:14 +0200] "GET / HTTP/1.1" 200 1234 "http://www.fromserver.com/from.htm" "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)"
And this is an example of records AWStats found in your log file (the record number 50 in your log):
175.42.18.34 - - [14/Oct/2014:16:35:43 +0800] "GET /lf/index.php?op=ViewArticle&articleId=28&blogId=2 HTTP/1.1" 404 210
Setup ('/etc/awstats/awstats.insecta.idv.tw.conf' file, web server or permissions) may be wrong.
Check config file, permissions and AWStats documentation (in 'docs' directory).
[root@localhost a324f61c-dd20-430b-bc76-ce8a1a77ceb2]# vi /etc/awstats/awstats.insecta.idv.tw.conf
[root@localhost a324f61c-dd20-430b-bc76-ce8a1a77ceb2]#  perl /usr/local/awstats/wwwroot/cgi-bin/awstats.pl -update -config=insecta.idv.tw
Create/Update database for config "/etc/awstats/awstats.insecta.idv.tw.conf" by AWStats version 6.95 (build 1.943)
From data in log file "/usr/local/apache2/logs/access_log"...
Phase 1 : First bypass old records, searching new record...
Direct access to last remembered record is out of file.
So searching it from beginning of log file...
AWStats did not find any valid log lines that match your LogFormat parameter, in the 50th first non commented lines read of your log.
Your log file /usr/local/apache2/logs/access_log must have a bad format or LogFormat parameter setup does not match this format.
Your AWStats LogFormat parameter is:
3
This means each line in your web server log file need to have "WebStar native log format"
And this is an example of records AWStats found in your log file (the record number 50 in your log):
175.42.18.34 - - [14/Oct/2014:16:35:43 +0800] "GET /lf/index.php?op=ViewArticle&articleId=28&blogId=2 HTTP/1.1" 404 210
Setup ('/etc/awstats/awstats.insecta.idv.tw.conf' file, web server or permissions) may be wrong.
Check config file, permissions and AWStats documentation (in 'docs' directory).
[root@localhost a324f61c-dd20-430b-bc76-ce8a1a77ceb2]# vi /etc/awstats/awstats.insecta.idv.tw.conf                           [root@localhost a324f61c-dd20-430b-bc76-ce8a1a77ceb2]#  perl /usr/local/awstats/wwwroot/cgi-bin/awstats.pl -update -config=insecta.idv.tw
Create/Update database for config "/etc/awstats/awstats.insecta.idv.tw.conf" by AWStats version 6.95 (build 1.943)
From data in log file "/usr/local/apache2/logs/access_log"...
Phase 1 : First bypass old records, searching new record...
Direct access to last remembered record is out of file.
So searching it from beginning of log file...
Phase 2 : Now process new records (Flush history on disk after 20000 hosts)...
Reverse DNS lookup for ::1 not available without ipv6 plugin enabled.



Jumped lines in file: 0
Parsed lines in file: 363982
 Found 12 dropped records,
 Found 79469 corrupted records,
 Found 0 old records,
 Found 284501 new qualified records.


select id,article_id,topic,text from lt_articles_text where article_id =311; ok. update lt_articles set num_reads=num_reads +1 where id=311; ok.