FC2ブログ


全件表示TopRSSAdmin
apacheのアクセスログ解析(access_log)ツール awstats
2005 / 10 / 11 ( Tue )

下記のURLからawstatsをダウンロードする。

http://awstats.sourceforge.net/#DOWNLOAD

今回は awstats-6.4-1.noarch.rpm をダウンロードした。


■httpd.confの編集
#CustomLog logs/access_log common
CustomLog logs/access_log combined

■インストール
root# rpm -ivh awstats-6.1-1.noarch.rpm
Preparing...                ########################################### [100%]
   1:awstats                ########################################### [100%]

----- AWStats 6.1 - Laurent Destailleur -----
AWStats files have been installed in /usr/local/awstats

If first install, follow instructions in documentation
(/usr/local/awstats/docs/index.html) to setup AWStats in 3 steps:
Step 1 : Install and Setup manually or with configure.pl
Step 2 : Build/Update Statistics with awstats.pl
Step 3 : Read Statistics

root# cd /usr/local/awstats/tools
root# perl configure.pl

----- AWStats configure 1.0 (build 1.32) (c) Laurent Destailleur -----
This tool will help you to configure AWStats to analyze statistics for
one web server. You can try to use it to let it do all that is possible
in AWStats setup, however following the step by step manual setup
documentation (docs/index.html) is often a better idea. Above all if:
- You are not an administrator user,
- You want to analyze downloaded log files without web server,
- You want to analyze mail or ftp log files instead of web log files,
- You need to analyze load balanced servers log files,
- You want to 'understand' all possible ways to use AWStats...
Read the AWStats documentation (docs/index.html).

-----> Running OS detected: Linux, BSD or Unix

-----> Check for web server install
  Found Web server Apache config file '/usr/local/apache2/conf/httpd.conf'

-----> Check and complete web server config file '/usr/local/apache2/conf/httpd.conf'
  Add 'Alias /awstatsclasses "/usr/local/awstats/wwwroot/classes/"'
  Add 'Alias /awstatscss "/usr/local/awstats/wwwroot/css/"'
  Add 'Alias /awstatsicons "/usr/local/awstats/wwwroot/icon/"'
  Add 'ScriptAlias /awstats/ "/usr/local/awstats/wwwroot/cgi-bin/"'
  Add '<Directory>' directive
  AWStats directives added to Apache config file.

-----> Update model config file '/etc/awstats/awstats.model.conf'
  File awstats.model.conf updated.

-----> Need to create a new config file ?
Do you want me to build a new AWStats config/profile
file (required if first install) [y/N] ? y

-----> Define config file name to create
What is the name of your web site or profile analysis ?
Example: www.mysite.com
Example: demo
Your web site, virtual server or profile name:
> hoge.jp

-----> Create config file '/etc/awstats/awstats.hoge.jp.conf'
 Config file /etc/awstats/awstats.hoge.jp.conf created.

-----> Restart Web server with '/sbin/service httpd restart'
httpd: unrecognized service

-----> Add update process inside a scheduler
Sorry, configure.pl does not support automatic add to cron yet.
You can do it manually by adding the following command to your cron:
/usr/local/awstats/wwwroot/cgi-bin/awstats.pl -update -config=sub.epier.jp
Or if you have several config files and prefer having only one command:
/usr/local/awstats/tools/awstats_updateall.pl now
Press ENTER to continue...    [Enter]


A SIMPLE config file has been created: /etc/awstats/awstats.hoge.jp.conf
You should have a look inside to check and change manually main parameters.
You can then manually update your statistics for 'hoge.jp' with command:
> perl awstats.pl -update -config=hoge.jp
You can also read your statistics for 'hoge.jp' with URL:
> http://localhost/awstats/awstats.pl?config=hoge.jp

Press ENTER to finish...         [Enter]

■/etc/awstats/awstats.hoge.jp.confの編集

LogFile="/usr/local/apache2/logs/access_log"   →ログファイルの場所指定
DirData="/var/lib/awstats"                       →ディレクトリ作成
SkipHosts="127.0.0.1"
Lang="jp"

root# mkdir /var/lib/awstats

■実行 /usr/local/awstats/wwwroot/cgi-bin
perl awstats.pl -update -config=hoge.jp

■確認

http://localhost/awstats/awstats.pl?config=hoge.jp



21 : 24 : 56 | トラックバック(0) | コメント(0) | page top↑
<<grep でマッチしなかった行を選択するコマンド | ホーム | rpmコマンドの使い方>>
コメント
コメントの投稿














管理者にだけ表示を許可する

トラックバック
トラックバックURL
http://redhatman.jp/tb.php/62-fb02bd64
この記事にトラックバックする(FC2ブログユーザー)
| ホーム |