非固定IPで独自ドメイン運用
 Yahooカテゴリ掲載 !!  Fedoracore5リリース!! 内容順次掲載予定

あなたは proxy経由かその他のOS / その他のブラウザ をお使いですね。
SINCE 2005/06/12
LAST UPDATE 2006/7/29
TOTAL ACCESS 1190244
YESTERDAY 00318
TODAY 00100
 

 

Home
install
after install
Apache
BIND
Postfix
dovecot
SMTP-AUTH
Squid
Webalizer
awstats
blog
Virtual IP
SSL + Virtual Domain
MHonArc + NAMAZU
VNC Server
DHCP
SSH
wsftp
SquirrelMail

 

・ Awstats ( log 解析) インストール
 

                                                                                                      

[fedora@fedoracore4 ~]$ su -
[root@fedoracore4 ~]# yum install awstats
Error: Bad repository file ///etc/yum.repos.d/city-fan.repo.
Setting up Install Process
Setting up repositories
updates-released 100% |=========================| 951 B 00:01
extras 100% |=========================| 1.1 kB 00:00
base 100% |=========================| 1.1 kB 00:00
Reading repository metadata in from local files
primary.xml.gz 100% |=========================| 128 kB 00:34
http://mirror.etf.bg.ac.yu/distributions/fedora/updates/4/i386/repodata/primary.xml.gz: [Errno 4] Socket Error: timed out
Trying other mirror.
primary.xml.gz 100% |=========================| 346 kB 00:01
updates-re: ################################################## 1006/1006
Added 79 new packages, deleted 40 old in 13.08 seconds
primary.xml.gz 100% |=========================| 952 kB 00:04
extras : ################################################## 2662/2662
Added 36 new packages, deleted 4 old in 21.90 seconds
Parsing package install arguments
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Downloading header for awstats to pack into transaction set.
awstats-6.5-0.1.050822.fc 100% |=========================| 73 kB 00:01
---> Package awstats.noarch 0:6.5-0.1.050822.fc4 set to be updated
--> Running transaction check

Dependencies Resolved

=============================================================================
Package Arch Version Repository Size
=============================================================================
Installing:
awstats noarch 6.5-0.1.050822.fc4 extras 1.0 M

Transaction Summary
=============================================================================
Install 1 Package(s)
Update 0 Package(s)
Remove 0 Package(s)
Total download size: 1.0 M
Is this ok [y/N]:
y
Downloading Packages:
(1/1): awstats-6.5-0.1.05 100% |=========================| 1.0 MB 00:13
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing: awstats ######################### [1/1]

Installed: awstats.noarch 0:6.5-0.1.050822.fc4
Complete!
[root@fedoracore4 ~]# rpm -qa awstats perl    
awstatus と perl がキチンとインストールされているか確認
awstats-6.5-0.1.050822.fc4
perl-5.8.6-15
[root@fedoracore4 ~]#

UTF-8 のままだと文字化けするので、下記のように文字化け対策


[root@fedoracore4 ~]# cd /etc/awstats/
[root@fedoracore4 awstats]# wget http://www.ganaware.jp/viewcvs.cgi/conv_weblog_to_utf8/conv_weblog_to_utf8.pl
--19:40:26-- http://www.ganaware.jp/viewcvs.cgi/conv_weblog_to_utf8/conv_weblog_to_utf8.pl
=> `conv_weblog_to_utf8.pl'
www.ganaware.jp をDNSに問いあわせています... 221.249.35.2
www.ganaware.jp|221.249.35.2|:80 に接続しています... 接続しました。
HTTP による接続要求を送信しました、応答を待っています... 200 OK
長さ: 特定できません [text/html]

[ <=> ] 11,672 --.--K/s

19:40:27 (169.88 KB/s) - `conv_weblog_to_utf8.pl' を保存しました [11672]

[root@fedoracore4 awstats]# chmod +x /etc/awstats/conv_weblog_to_utf8.pl
[root@fedoracore4 awstats]#


[root@fedoracore4 ~]# vi /etc/awstats/awstats.fedoracore4.conf     
awstats.fedoracore4.com.conf編集


/DNSLookup でDNSLookupを検索

# have an accurate Country report with no need of DNS Lookup.
# Possible values:
# 0 - No DNS Lookup
# 1 - DNS Lookup is fully enabled
# 2 - DNS Lookup is made only from static DNS cache file (if it exists)
# Default: 2
#
#DNSLookup=2
DNSLookup=1    DNSの逆引きを行う。



/SkipHosts でSkipHostsを検索
# Example: "127.0.0.1 REGEX[^192\.168\.] REGEX[^10\.]"
# Example: "localhost REGEX[^.*\.localdomain$]"
# Default: ""
#
#SkipHosts="127.0.0.1"

SkipHosts="127.0.0.1 fedoracore4.com 192.168.1."



/Lang= でLang=を検索
#Lang="auto"
Lang="jp"



:wq で保存

[root@fedoracore4 awstats]# /etc/init.d/httpd reload    
Apache リロード
httpd を再読み込み中:
[ OK ]
[root@fedoracore4 awstats]# /usr/share/awstats/wwwroot/cgi-bin/awstats.pl    
awstats集計開始
----- awstats 6.5 (build 1.841) (c) 2000-2005 Laurent Destailleur -----
AWStats is a free web server logfile analyzer to show you advanced web
statistics.
AWStats comes with ABSOLUTELY NO WARRANTY. It's a free software distributed
with a GNU General Public License (See LICENSE file for details).

Syntax: awstats.pl -config=virtualhostname [options]

This runs awstats in command line to update statistics of a web site, from
the log file defined in AWStats config file (with -update option), or build
a HTML report (with -output option).
First, awstats tries to read awstats.virtualhostname.conf as the config file.
If not found, awstats tries to read awstats.conf
Note 1: Config files (awstats.virtualhostname.conf or awstats.conf) must be
in /etc/awstats, /usr/local/etc/awstats, /etc or same directory than
awstats.pl script file.
Note 2: If AWSTATS_FORCE_CONFIG environment variable is defined, AWStats will
use it as the "config" value, whatever is the value on command line or URL.
See AWStats documentation for all setup instrutions.

Options to update statistics:
-update to update statistics (default)
-showsteps to add benchmark information every 8192 lines processed
-showcorrupted to add output for each corrupted lines found, with reason
-showdropped to add output for each dropped lines found, with reason
-updatefor=n to stop the update process after parsing n lines
-LogFile=x to change log to analyze whatever is 'LogFile' in config file
Be care to process log files in chronological order when updating statistics.

Options to show statistics:
-output to output main HTML report (no update made except with -update)
-output=x to output other report pages where x is:
alldomains to build page of all domains/countries
allhosts to build page of all hosts
lasthosts to build page of last hits for hosts
unknownip to build page of all unresolved IP
allemails to build page of all email senders (maillog)
lastemails to build page of last email senders (maillog)
allemailr to build page of all email receivers (maillog)
lastemailr to build page of last email receivers (maillog)
alllogins to build page of all logins used
lastlogins to build page of last hits for logins
allrobots to build page of all robots/spider visits
lastrobots to build page of last hits for robots
urldetail to list most often viewed pages
urldetail:filter to list most often viewed pages matching filter
urlentry to list entry pages
urlentry:filter to list entry pages matching filter
urlexit to list exit pages
urlexit:filter to list exit pages matching filter
osdetail to build page with os detailed versions
browserdetail to build page with browsers detailed versions
unknownbrowser to list 'User Agents' with unknown browser
unknownos to list 'User Agents' with unknown OS
refererse to build page of all refering search engines
refererpages to build page of all refering pages
keyphrases to list all keyphrases used on search engines
keywords to list all keywords used on search engines
errors404 to list 'Referers' for 404 errors
-staticlinks to have static links in HTML report page
-staticlinksext=xxx to have static links with .xxx extension instead of .html
-lang=LL to output a HTML report in language LL (en,de,es,fr,it,nl,...)
-month=MM to output a HTML report for an old month MM
-year=YYYY to output a HTML report for an old year YYYY
Those 'date' options doesn't allow you to process old log file. They only
allow you to see a past report for a chosen month/year period instead of
current month/year.

Other options:
-debug=X to add debug informations lesser than level X (speed reduced)

Now supports/detects:
Web/Ftp/Mail/streaming server log analyzis (and load balanced log files)
Reverse DNS lookup (IPv4 and IPv6) and GeoIP lookup
Number of visits, number of unique visitors
Visits duration and list of last visits
Authenticated users
Days of week and rush hours
Hosts list and unresolved IP addresses list
Most viewed, entry and exit pages
Files type and Web compression (mod_gzip, mod_deflate stats)
Screen size
Number of times site is 'added to favorites bookmarks'
Ratio of Browsers with support of: Java, Flash, RealG2 reader,
Quicktime reader, WMA reader, PDF reader
Configurable personalized reports
269 domains/countries
352 robots
5 worm's families
35 operating systems
121 browsers (482 with phone browsers database)
117 search engines (and keyphrases/keywords used from them)
All HTTP errors with last referrer
Report by day/month/year
Dynamic or static HTML or XHTML reports, static PDF reports
Indexed text or XML monthly database
And a lot of other advanced features and options...
New versions and FAQ at http://awstats.sourceforge.net
[root@fedoracore4 awstats]# ls


http://fedoracore4.com/awstats/awstats.pl へアクセスして確認

 

 

 

Squid―プロキシサーバの設定と運用       Squid: The Definitive Guide (Definitive Guides)

 

・Postfix (Mail log 解析) 設定

 

[root@fedoracore4 ~]# cp /etc/awstats/awstats.fedoracore4.com.conf /etc/awstats/awstats.postfix.conf    awstats.postfix.conf 作成
[root@fedoracore4 ~]# vi /etc/awstats/awstats.postfix.conf




/LogFile でLogfileを検索

# If there is several log files from load balancing servers :
# Example: "/pathtotools/logresolvemerge.pl *.log |"
#
#LogFile="/var/log/httpd/access_log"
LogFile="perl /usr/share/awstats/tools/maillogconvert.pl standard < /var/log/maillog |"


# Enter the log file type you want to analyze.
# Possible values:
# W - For a web log file
# S - For a streaming log file
# M - For a mail log file
# F - For a ftp log file
# Example: W
# Default: W
#
LogType=
M



/LogFormat でLogformatを検索

# Example for IIS:
# LogFormat = 2
#
#LogFormat=1
LogFormat="%time2 %email %email_r %host %host_r %method %url %code %bytesd"


/LovelForOSDLovelForOSDを検索
# Change : Effective for new updates only
# Default: 2 (0 for LevelForWormsDetection)
#
#LevelForBrowsersDetection=2 # 0 disables Browsers detection.
LevelForBrowsersDetection=0 # 2 reduces AWStats speed by 2%

LevelForOSDetection=
0          # 0 disables OS detection.
                         # 2 reduces AWStats speed by 3%
LevelForRefererAnalyze=0         # 0 disables Origin detection.
                         # 2 reduces AWStats speed by 14%
LevelForRobotsDetection=0        # 0 disables Robots detection.
                         # 2 reduces AWStats speed by 2.5%
LevelForSearchEnginesDetection=0   # 0 disables Search engines detection.
                         # 2 reduces AWStats speed by 9%
LevelForKeywordsDetection=0      # 0 disables Keyphrases/Keywords detection.
                         # 2 reduces AWStats speed by 1%
LevelForFileTypesDetection=0      # 0 disables File types detection.
                         # 2 reduces AWStats speed by 1%
LevelForWormsDetection=0        # 0 disables Worms detection.
                         # 2 reduces AWStats speed by 15%



/ShowMonthStatusShowMonthStatusを検索

# Show monthly chart
# Context: Web, Streaming, Mail, Ftp
# Default: UVPHB, Possible column codes: UVPHB
ShowMonthStats=
UHB

# Show days of month chart
# Context: Web, Streaming, Mail, Ftp
# Default: VPHB, Possible column codes: VPHB
ShowDaysOfMonthStats=
HB

# Show days of week chart
# Context: Web, Streaming, Mail, Ftp
# Default: PHB, Possible column codes: PHB
ShowDaysOfWeekStats=
HB

# Show hourly chart
# Context: Web, Streaming, Mail, Ftp
# Default: PHB, Possible column codes: PHB
ShowHoursStats=
HB

# Show domains/country chart
# Context: Web, Streaming, Mail, Ftp
# Default: PHB, Possible column codes: PHB
ShowDomainsStats=
0

# Show hosts chart
# Context: Web, Streaming, Mail, Ftp
# Default: PHBL, Possible column codes: PHBL
ShowHostsStats=
HBL

# Show authenticated users chart
# Context: Web, Streaming, Ftp
# Default: 0, Possible column codes: PHBL
ShowAuthenticatedUsers=0

# Show robots chart
# Context: Web, Streaming
# Default: HBL, Possible column codes: HBL
ShowRobotsStats=0

# Show worms chart
# Context: Web, Streaming
# Default: 0 (If set to other than 0, see also LevelForWormsDetection), Possible column codes: HBL
ShowWormsStats=0

# Show email senders chart (For use when analyzing mail log files)
# Context: Mail
# Default: 0, Possible column codes: HBML
ShowEMailSenders=
HBML

# Show email receivers chart (For use when analyzing mail log files)
# Context: Mail
# Default: 0, Possible column codes: HBML
ShowEMailReceivers=HBML

# Show session chart
# Context: Web, Streaming, Ftp
# Default: 1, Possible column codes: None
ShowSessionsStats=
0

# Show pages-url chart.
# Context: Web, Streaming, Ftp
# Default: PBEX, Possible column codes: PBEX
ShowPagesStats=0

# Show file types chart.
# Context: Web, Streaming, Ftp
# Default: HB, Possible column codes: HBC
ShowFileTypesStats=0

# Show file size chart (Not yet available)
# Context: Web, Streaming, Mail, Ftp
# Default: 1, Possible column codes: None
ShowFileSizesStats=0

# Show operating systems chart
# Context: Web, Streaming, Ftp
# Default: 1, Possible column codes: None
ShowOSStats=0

# Show browsers chart
# Context: Web, Streaming
# Default: 1, Possible column codes: None
ShowBrowsersStats=0

# Show screen size chart
# Context: Web, Streaming
# Default: 0 (If set to 1, see also MiscTrackerUrl), Possible column codes: None
ShowScreenSizeStats=0

# Show origin chart
# Context: Web, Streaming
# Default: PH, Possible column codes: PH
ShowOriginStats=0

# Show keyphrases chart
# Context: Web, Streaming
# Default: 1, Possible column codes: None
ShowKeyphrasesStats=0

# Show keywords chart
# Context: Web, Streaming
# Default: 1, Possible column codes: None
ShowKeywordsStats=0

# Show misc chart
# Context: Web, Streaming
# Default: a (See also MiscTrackerUrl parameter), Possible column codes: anjdfrqwp
ShowMiscStats=0

# Show http errors chart
# Context: Web, Streaming
# Default: 1, Possible column codes: None
ShowHTTPErrorsStats=0

# Show smtp errors chart (For use when analyzing mail log files)
# Context: Mail
# Default: 0, Possible column codes: None
ShowSMTPErrorsStats=
1

:wq で保存


[root@fedoracore4 awstats]# /etc/init.d/httpd reload    Apache リロード
httpd を再読み込み中:
[ OK ]
[root@fedoracore4 awstats]# /usr/share/awstats/wwwroot/cgi-bin/awstats.pl -config=postfix

http://fedoracore4.com/awstats/awstats.pl?config=postfix へアクセスして確認

 

 

 



Linux Users Ring

[ 自宅サーバーWebRing |ID=280 前後5表示乱移動サイト一覧 ]

Copyright (c) 2005 - Fedoracore4.com - All rights reserved