analog のインストール

Debian TS-WXL

Web アクセス解析のために、 analog をインストールする

analog パッケージのインストール

tswxl:~# apt-cache search analog
analog - web server log analyzer
tswxl:~# apt-get install analog
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libshadow-ruby1.8 irb1.8 libnet-ssleay-perl rdoc libruby ruby1.8 ruby facter rdoc1.8 host libruby1.8 libopenssl-ruby1.8 libreadline-ruby1.8
  libopenssl-ruby libxmlrpc-ruby libnet-libidn-perl
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  libfreetype6 libgd2-noxpm libjpeg62 libpng12-0
Suggested packages:
  rmagic libfreetype6-dev libgd-tools
The following NEW packages will be installed:
  analog libfreetype6 libgd2-noxpm libjpeg62 libpng12-0
0 upgraded, 5 newly installed, 0 to remove and 0 not upgraded.
Need to get 2196kB of archives.
After this operation, 6504kB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 lenny/main libfreetype6 2.3.7-2+lenny1 [353kB]
Get:2 lenny/main libjpeg62 6b-14 [88.7kB]
Get:3 lenny/main libpng12-0 1.2.27-2+lenny3 [163kB]
Get:4 lenny/main libgd2-noxpm 2.0.36~rc1~dfsg-3+lenny1 [221kB]
Get:5 lenny/main analog 2:6.0-17~lenny1 [1372kB]
Fetched 2196kB in 14s (150kB/s)
Preconfiguring packages ...
Selecting previously deselected package libfreetype6.
(Reading database ... 19645 files and directories currently installed.)
Unpacking libfreetype6 (from .../libfreetype6_2.3.7-2+lenny1_armel.deb) ...
Selecting previously deselected package libjpeg62.
Unpacking libjpeg62 (from .../libjpeg62_6b-14_armel.deb) ...
Selecting previously deselected package libpng12-0.
Unpacking libpng12-0 (from .../libpng12-0_1.2.27-2+lenny3_armel.deb) ...
Selecting previously deselected package libgd2-noxpm.
Unpacking libgd2-noxpm (from .../libgd2-noxpm_2.0.36~rc1~dfsg-3+lenny1_armel.deb) ...
Selecting previously deselected package analog.
Unpacking analog (from .../analog_2%3a6.0-17~lenny1_armel.deb) ...
Processing triggers for man-db ...
Setting up libfreetype6 (2.3.7-2+lenny1) ...
Setting up libjpeg62 (6b-14) ...
Setting up libpng12-0 (1.2.27-2+lenny3) ...
Setting up libgd2-noxpm (2.0.36~rc1~dfsg-3+lenny1) ...
Setting up analog (2:6.0-17~lenny1) ...

analog.cfg の修正

tswxl:~# cd /etc/
tswxl:/etc# mv analog.cfg{,.orig}
tswxl:/etc# cp analog.cfg{.orig,}
tswxl:/etc# vi analog.cfg

analog の実行

tswxl:/etc# analog
analog.cfg に OUTFILE が書いてあるので、画面には何も出ず



ソースを見ると、/analog/analogo.png とか、/analog/barb1.png とか。

/analog って何処にインストールされた?

tswxl:/etc# cd /var/www/
tswxl:/var/www# ls

こうなったら、find 。強引。パッケージの情報見ろよ

tswxl:/# find . -type d -name analog -print
tswxl:/# ls /var/cache/analog/
tswxl:/# ls /usr/share/analog/  images  lang
tswxl:/# ls /usr/share/analog/images/
analogo.gif  bara8.gif   barb8.gif   barc8.gif   bard8.gif   bare8.gif   barf8.gif   barg8.gif   barh8.gif   bari8.gif   barj8.gif  sq8.png
analogo.png  bara8.png   barb8.png   barc8.png   bard8.png   bare8.png   barf8.png   barg8.png   barh8.png   bari8.png   barj8.png  sq9.png
bara1.gif    barb1.gif   barc1.gif   bard1.gif   bare1.gif   barf1.gif   barg1.gif   barh1.gif   bari1.gif   barj1.gif   html2.gif  sqg.png
bara1.png    barb1.png   barc1.png   bard1.png   bare1.png   barf1.png   barg1.png   barh1.png   bari1.png   barj1.png   html2.png
bara16.gif   barb16.gif  barc16.gif  bard16.gif  bare16.gif  barf16.gif  barg16.gif  barh16.gif  bari16.gif  barj16.gif  sq0.png
bara16.png   barb16.png  barc16.png  bard16.png  bare16.png  barf16.png  barg16.png  barh16.png  bari16.png  barj16.png  sq1.png
bara2.gif    barb2.gif   barc2.gif   bard2.gif   bare2.gif   barf2.gif   barg2.gif   barh2.gif   bari2.gif   barj2.gif   sq2.png
bara2.png    barb2.png   barc2.png   bard2.png   bare2.png   barf2.png   barg2.png   barh2.png   bari2.png   barj2.png   sq3.png
bara32.gif   barb32.gif  barc32.gif  bard32.gif  bare32.gif  barf32.gif  barg32.gif  barh32.gif  bari32.gif  barj32.gif  sq4.png
bara32.png   barb32.png  barc32.png  bard32.png  bare32.png  barf32.png  barg32.png  barh32.png  bari32.png  barj32.png  sq5.png
bara4.gif    barb4.gif   barc4.gif   bard4.gif   bare4.gif   barf4.gif   barg4.gif   barh4.gif   bari4.gif   barj4.gif   sq6.png
bara4.png    barb4.png   barc4.png   bard4.png   bare4.png   barf4.png   barg4.png   barh4.png   bari4.png   barj4.png   sq7.png
/usr/share/analog/images/ のようだ。


tswxl:/# ln -s !$ /home/httpd/html/analog
ln -s /usr/share/analog/images/ /home/httpd/html/analog

もう一度OUTFILE を見る


cron に登録

tswxl:~# crontab -e
2 0 * * * nice /usr/bin/analog 2>/dev/null 1>/dev/null

So So

Yahoo ショッピング
Livedoor デパート

第三世代 LinkStation ハックキット(2)
LinkStation/玄箱 をハックしよう

OSC 用に記念撮影

Copyright (C) 2003-2010 Yasunari Yamashita. All Rights Reserved.
yasunari @ 山下康成@京都府向日市