hyperestrailerを使ってみる
【1】hyperestrailerのインストール
http://wiki.unshiu.jp/dev-documment/full-text-search#TOC-qdbm-
▼QDBM
# wget http://qdbm.sourceforge.net/qdbm-1.8.77.tar.gz
# tar xvfz qdbm-1.8.77.tar.gz
# cd qdbm-1.8.77 ; pwd
# ./configure --enable-zlib
# make
# make install
cp: /usr/local/include/depot.h: Permission denied
cp: /usr/local/include/vista.h: Permission denied
cp: /usr/local/include/villa.h: Permission denied
cp: /usr/local/include/cabin.h: Permission denied
cp: /usr/local/include/hovel.h: Permission denied
cp: /usr/local/include/relic.h: Permission denied
cp: /usr/local/include/curia.h: Permission denied
cp: /usr/local/include/odeum.h: Permission denied
Error code 1
Stop in /home/rubytest/qdbm-1.8.77.
/usr/lcoal以下のファイルは権限ないと怒られる。
使用可能なのは/home/****/以下なので、
改めて/home/****/以下にインストール
#./configure \
--prefix=/home/****/estraier \
--enable-pthread \
--enable-zlib \
CPPFLAGS=-I/home/****/estraier/include \
LDFLAGS=-L/home/****/estraier/lib
#make -e HOME=/home/****/estraier
#make install
完了。
http://kano.feena.jp/?SakuraInternet%2Fbuild#vdb89d5c
によると
" さくら向けのコツは2つあって
・--enable-static する。LD_LIBRARY_PATH をapacheがずらすため。
・estseek.cgi はsymlinkしない。同じdirの.confを探すため。ハードリンクする。
だそうだ。
さっそく。
$ wget http://jaist.dl.sourceforge.net/sourceforge/hyperestraier/hyperestraier-1.4.5.tar.gz
# tar xvfz hyperestraier-1.4.5.tar.gz
$ ./configure \
--prefix=/home/****/estraier \
--enable-static \
CPPFLAGS=-I/home/****/estraier/include \
LDFLAGS=-L/home/****/estraier/lib
$ make -e HOME=/home/****/estraier
$ make install
#================================================================
# Thanks for using Hyper Estraier.
#================================================================
となると嬉しいー。
最後にパスを通す。
cd
vi .cshrc のファイルに下記パスを追加して、再ログイン。
set path = (/sbin /bin /usr/sbin /usr/bin /usr/local/sbin /usr/local/bin $HOME/bin $HOME/lib/ruby/gem/bin $HOME/local/bin $HOME/estra
ier/bin)
phpからhyperestrailerを使用。
Perl、Ruby、JavaのAPIはあるものの、phpは??
http://page2.xrea.jp/#EstraierPure
というものがあるそうな。
【2】試しにインデックスを作成してみる
インデックス用のフォルダを作成し、コマンドを実行するとcasketというディレクトリが作成される。
これがインデックス格納用。不要になればここを丸ごと削除も可能。
今回はwwwの直下に作ることに。
#cd /www
#estcmd gather -il ja -sd casket /home/rubytest/www/test
試しにtestフォルダ内の.htmlからインデックスを作成してみました。