Apacheの出力したアクセスログ解析ソフト Webalizerのインストールログです。
ものすごい昔に書いたテキストなんですが・・・。ログ解析していたら検索してやってきてくれた方がいたようなので、Blogの方にも載せなおします。
でも、最終更新日が2001/12/19なので、最初に書いたのはもっと前・・・。はてさて、お役に立ちますかどうか。
本家URLのDOWNLOADページから
ftp://ftp.mrunix.net/pub/webalizer/webalizer-2.01-06-src.tgz
をDL.
●zlib compression library.
●PNG (portable network graphics) library
の二つが必要。
zlibはたぶんインストール済みと山勘でPNGのみを探しに行く。
libpngのインストール
http://www.libpng.org/pub/png/libpng.html
からソースをDLしてくる。
# tar xvzf libpng-1.0.8.tar.gz
# cd libpng-1.0.8
# cd scripts
# cp makefile.linux ../Makefile
# cd ..
# make test
libpng passes test
#make
#su
#make install
webalizerのインストール
# tar xvzf webalizer-2.01-06-src.tgz
# cd webalizer-2.01-06
# ./configure
configure: error: gd library not found… please install gd.
あれれん、gdが無いって言われています。MRTGのときに入れたはずだ。。。
とおもったけど、あれからHDDがクラッシュしていましたな。。。
gdのインストール
http://www.boutell.com/gd/
ftp://ftp.boutell.com/pub/boutell/gd/gd-1.8.3.tar.gz
ここからGDをもってくる。
# make
# su
# make install
気を取り直して
webalizerのインストール
# ./configure
ok
# make
# su
# make install
設定ファイルの書換え
# cp sample.conf lowtech.conf
# vi lowtech.conf
# /usr/local/bin/webalizer -c lowtech.conf
/usr/local/bin/webalizer: error in loading shared libraries: libpng.so.2: cannot open shared object file : No such file or directory
と怒られる。
webalizer-2.01-09-src.tgzでretry
gd-1.8.4.tar.gz
#tar xvzf gd-1.8.4.tar.g
#cd gd-1.8.4
#./configure
#make
#su
Password
#make install
# tar xvzf webalizer-2.01-9-src.tgz
# cd webalizer-2.01-9
# ./configure
# make
(略)
gcc -L/usr/lib -o webalizer webalizer.o hashtab.o linklist.o preserve.o parser.
o output.o dns_resolv.o graphs.o -lgd -lpng -lz -lm
graphs.o: In function `year_graph6x’:
graphs.o(.text+0xd1f): undefined reference to `gdImagePng’
graphs.o: In function `month_graph6′:
graphs.o(.text+0x1a23): undefined reference to `gdImagePng’
graphs.o: In function `day_graph3′:
graphs.o(.text+0x2020): undefined reference to `gdImagePng’
graphs.o: In function `pie_chart’:
graphs.o(.text+0x25ad): undefined reference to `gdImagePng’
collect2: ld returned 1 exit status
make: *** [webalizer] Error 1
再び失敗.
GDライブラリとインクルードファイルが
/usr/local/lib
/usr/local/include
に入っているのだが,
/usr/lib
/usr/include
を参照していたために,古いライブラリを参照してしまっていた.
よってMakefileを直接編集.
# make
# su
# make install
GOOD!!
ためしにtest.confと言うコンフィグファイルをサンプルから作成.
# webalizer -c ./test.conf
うまくいきました.
Popular Posts:
- None Found