#contents
** 関連ツール類のインストール [#v6510715]
*** libiconv-1.11 [#bf081c45]
[root@spirit libiconv-1.11]# ./configure
[root@spirit libiconv-1.11]# make
[root@spirit libiconv-1.11]# make check
[root@spirit libiconv-1.11]# make install
[root@spirit libiconv-1.11]# cat /etc/ld.so.conf
include ld.so.conf.d/*.conf
/usr/local/lib <----- 追加して ldconfig を実行
[root@spirit libiconv-1.11]# ldconfig
*** glib-2.12.6 [#m5a09863]
[root@spirit glib-2.12.6]# ./configure --with-libiconv
[root@spirit glib-2.12.6]# make
[root@spirit glib-2.12.6]# make check
[root@spirit glib-2.12.6]# make install
*** libwmf-0.2.8.4 [#gf8a6a73]
[root@spirit libwmf-0.2.8.4]# ./configure
[root@spirit libwmf-0.2.8.4]# make
[root@spirit libwmf-0.2.8.4]# make check
[root@spirit libwmf-0.2.8.4]# cat /etc/ld.so.conf
include ld.so.conf.d/*.conf
/usr/local/lib
/usr/local/lib/gtk-2.0/2.4.0/loaders <-------- 追加して ldconfig を実行
[root@spirit libwmf-0.2.8.4]# ldconfig
*** libgsf-1.14.3 [#k26bb5c8]
[root@spirit libgsf-1.14.3]# ./configure
** Namazu 本体のインストール [#k9a0f2d1]
** Namazu の設定 [#f94134c3]
*** Namazu 関連ファイルのインストールディレクトリ [#i6624714]
- プログラム本体 ⇒ &color(blue){/usr/local/bin/namazu};
[root@spirit ~]# which namazu
/usr/local/bin/namazu
- Namazu 関連ファイル ⇒ &color(blue){/usr/local/share/namazu/};
[root@spirit ~]# ls -l /usr/local/share/namazu/
合計 20
drwxr-xr-x 4 root root 4096 11月 19 02:32 doc
drwxr-xr-x 2 root root 4096 11月 19 02:33 etc
drwxr-xr-x 2 root root 4096 11月 19 02:32 filter
drwxr-xr-x 2 root root 4096 11月 19 02:33 pl
drwxr-xr-x 2 root root 4096 11月 19 02:33 template
- 各種フィルター ⇒ &color(blue){/usr/local/share/namazu/filter};
[root@spirit ~]# ls -l /usr/local/share/namazu/filter
合計 188
-rw-r--r-- 1 root root 2089 11月 19 02:32 apachecache.pl
-rw-r--r-- 1 root root 1975 11月 19 02:32 bzip2.pl
-rw-r--r-- 1 root root 1990 11月 19 02:32 compress.pl
-rw-r--r-- 1 root root 4312 11月 19 02:32 deb.pl
-rw-r--r-- 1 root root 3095 11月 19 02:32 dvi.pl
-rw-r--r-- 1 root root 5459 11月 19 02:32 excel.pl
-rw-r--r-- 1 root root 3064 11月 19 02:32 gzip.pl
-rw-r--r-- 1 root root 6539 11月 19 02:32 hdml.pl
-rw-r--r-- 1 root root 8557 11月 19 02:32 hnf.pl
-rw-r--r-- 1 root root 10291 11月 19 02:32 html.pl
-rw-r--r-- 1 root root 2073 11月 19 02:32 macbinary.pl
-rw-r--r-- 1 root root 9458 11月 19 02:32 mailnews.pl
-rw-r--r-- 1 root root 4125 11月 19 02:32 man.pl
-rw-r--r-- 1 root root 5598 11月 19 02:32 mhonarc.pl
-rw-r--r-- 1 root root 4729 11月 19 02:32 mp3.pl
-rw-r--r-- 1 root root 5566 11月 19 02:32 msword.pl
-rw-r--r-- 1 root root 7331 11月 19 02:32 ooo.pl
-rw-r--r-- 1 root root 4495 11月 19 02:32 pdf.pl
-rw-r--r-- 1 root root 3013 11月 19 02:32 postscript.pl
-rw-r--r-- 1 root root 5279 11月 19 02:32 powerpoint.pl
-rw-r--r-- 1 root root 3154 11月 19 02:32 rfc.pl
-rw-r--r-- 1 root root 4578 11月 19 02:32 rpm.pl
-rw-r--r-- 1 root root 5047 11月 19 02:32 rtf.pl
-rw-r--r-- 1 root root 2606 11月 19 02:32 taro.pl
-rw-r--r-- 1 root root 4242 11月 19 02:32 taro56.pl
-rw-r--r-- 1 root root 5957 11月 19 02:32 taro7_10.pl
-rw-r--r-- 1 root root 2711 11月 19 02:32 tex.pl
- インデックスファイル ⇒ &color(blue){/usr/local/var/namazu/index};
[root@spirit ~]# ls -l /usr/local/var/namazu/index/
合計 8
drwxr-xr-x 2 root root 4096 11月 19 13:07 Academia
drwxr-xr-x 2 root root 4096 11月 19 12:53 Linux
- 環境設定ファイル ⇒ &color(blue){/usr/local/etc/namazu/};
[root@spirit ~]# ls -l /usr/local/etc/namazu/
合計 20
-rw-r--r-- 1 root root 5751 11月 19 10:46 mknmzrc
-rw-r--r-- 1 root root 5551 11月 19 02:32 mknmzrc-sample
-rw-r--r-- 1 root root 2918 11月 19 02:32 namazurc-sample
*** Namazu の設定状況の確認 (mknmz -C) [#f9753d8d]
[root@spirit ~]# mknmz -C
Loaded rcfile: /usr/local/etc/namazu/mknmzrc
System: linux
Namazu: 2.0.16
Perl: 5.008005
File-MMagic: 1.25
NKF: module_nkf
KAKASI: module_kakasi -ieuc -oeuc -w
ChaSen: module_chasen -i e -j -F "%m "
MeCab: no
Wakati: module_kakasi -ieuc -oeuc -w
Lang_Msg: ja_JP.eucJP
Lang: ja_JP.eucJP
Coding System: euc
CONFDIR: /usr/local/etc/namazu
LIBDIR: /usr/local/share/namazu/pl
FILTERDIR: /usr/local/share/namazu/filter
TEMPLATEDIR: /usr/local/share/namazu/template
Supported media types: (36)
Unsupported media types: (8) marked with minus (-) probably missing application in your $path.
application/excel: excel.pl
application/gnumeric: gnumeric.pl
application/ichitaro5: taro56.pl
application/ichitaro6: taro56.pl
- application/ichitaro7: taro7_10.pl
application/macbinary: macbinary.pl
application/msword: msword.pl
application/pdf: pdf.pl
- application/postscript: postscript.pl
application/powerpoint: powerpoint.pl
- application/rtf: rtf.pl
application/vnd.kde.kivio: koffice.pl
application/vnd.kde.kpresenter: koffice.pl
application/vnd.kde.kspread: koffice.pl
application/vnd.kde.kword: koffice.pl
application/vnd.oasis.opendocument.graphics: ooo.pl
application/vnd.oasis.opendocument.presentation: ooo.pl
application/vnd.oasis.opendocument.spreadsheet: ooo.pl
application/vnd.oasis.opendocument.text: ooo.pl
application/vnd.sun.xml.calc: ooo.pl
application/vnd.sun.xml.draw: ooo.pl
application/vnd.sun.xml.impress: ooo.pl
application/vnd.sun.xml.writer: ooo.pl
application/x-apache-cache: apachecache.pl
application/x-bzip2: bzip2.pl
application/x-compress: compress.pl
- application/x-deb: deb.pl
- application/x-dvi: dvi.pl
application/x-gzip: gzip.pl
- application/x-js-taro: taro7_10.pl
application/x-rpm: rpm.pl
- application/x-tex: tex.pl
application/x-zip: zip.pl
- audio/mpeg: mp3.pl
message/news: mailnews.pl
message/rfc822: mailnews.pl
text/hnf: hnf.pl
text/html: html.pl
text/html; x-type=mhonarc: mhonarc.pl
text/html; x-type=pipermail: pipermail.pl
text/plain
text/plain; x-type=rfc: rfc.pl
text/x-hdml: hdml.pl
text/x-roff: man.pl
[root@spirit ~]#
*** インデックスの作成 ( mknmz -aO [インデックスの位置][インデックス対象ファイルの位置])[#dd5f7e23]
- インデックスは &color(red){/var/www/html/pukiwiki/namazu/index/}; の下に生成することにする
- このインデックス用のディレクトリは mknmz コマンドを実行する前に作成しておく必要がある
[root@spirit ~]# ls -l /var/www/html/pukiwiki/namazu/index/
合計 28
drwxr-xr-x 2 root root 4096 2月 15 16:18 csr
drwxr-xr-x 2 root root 4096 1月 27 00:40 linux
drwxr-xr-x 2 root root 4096 1月 27 00:24 mail
drwxr-xr-x 2 root root 4096 1月 27 00:24 mail_old
drwxr-xr-x 2 root root 4096 1月 30 13:25 nikkei_el
drwxr-xr-x 2 root root 4096 1月 30 13:34 prospect
drwxr-xr-x 2 root root 4096 2月 2 02:43 pukiwiki
- インデックスの生成(初期化)
-- -a : 全部の対応フォーマットに対してインデックスを生成する
-- -O : インデックスを出力するディレクトリを明示的に指定する
[root@spirit ~]# mknmz -aO /var/www/html/pukiwiki/namazu/index/prospect/ /opt/documents/prospect/
Looking for indexing files...
10 files are found to be indexed.
1/10 - /opt/documents/prospect/HSDPA%A1%A6Super%A3%B3G%A1%A6%A3%B4G.pdf system error occurred! (x-system/x-error) skipped.
1/9 - /opt/documents/prospect/M2Msummit061213.pdf system error occurred! (x-system/x-error) skipped.
1/8 - /opt/documents/prospect/PLC_Mitsubishi.pdf system error occurred! (x-system/x-error) skipped.
1/7 - /opt/documents/prospect/PLC_NEC_20061219.pdf system error occurred! (x-system/x-error) skipped.
1/6 - /opt/documents/prospect/PLC_Panasonic.pdf system error occurred! (x-system/x-error) skipped.
1/5 - /opt/documents/prospect/PLC_Sumitomo.pdf system error occurred! (x-system/x-error) skipped.
1/4 - /opt/documents/prospect/RSOSB070112%C2%C7%A4%C1%B9%E7%A4%EF%A4%BB%BB%F1%CE%C1.doc [application/msword]
2/4 - /opt/documents/prospect/RSOSB070125%B3%E8%C6%B0%CA%F3%B9%F0.doc [application/msword]
3/4 - /opt/documents/prospect/RSOSB070214%C2%C7%A4%C1%B9%E7%A4%EF%A4%BB%BB%F1%CE%C1.doc [application/msword]
4/4 - /opt/documents/prospect/RSOSB070224%B3%E8%C6%B0%CA%F3%B9%F0.doc [application/msword]
Writing index files...
[Append]
Date: Mon Feb 26 14:34:08 2007
Added Documents: 4
Size (bytes): 419,840
Total Documents: 146
Added Keywords: 643
Total Keywords: 36,783
Wakati: module_kakasi -ieuc -oeuc -w
Time (sec): 8
File/Sec: 0.50
System: linux
Perl: 5.008005
Namazu: 2.0.16
*** インデックスの更新 ( mknmz --update [インデックスの位置])[#v90830c7]
[root@spirit ~]# mknmz --update /var/www/html/pukiwiki/namazu/index/prospect/
Looking for indexing files...
6 files are found to be indexed.
1/6 - /opt/documents/prospect/HSDPA%A1%A6Super%A3%B3G%A1%A6%A3%B4G.pdf system error occurred! (x-system/x-error) skipped.
1/5 - /opt/documents/prospect/M2Msummit061213.pdf system error occurred! (x-system/x-error) skipped.
1/4 - /opt/documents/prospect/PLC_Mitsubishi.pdf system error occurred! (x-system/x-error) skipped.
1/3 - /opt/documents/prospect/PLC_NEC_20061219.pdf system error occurred! (x-system/x-error) skipped.
1/2 - /opt/documents/prospect/PLC_Panasonic.pdf system error occurred! (x-system/x-error) skipped.
1/1 - /opt/documents/prospect/PLC_Sumitomo.pdf system error occurred! (x-system/x-error) skipped.
[Append]
Date: Mon Feb 26 14:37:03 2007
Total Documents: 146
Total Keywords: 36,783
Wakati: module_kakasi -ieuc -oeuc -w
System: linux
Perl: 5.008005
Namazu: 2.0.16
*** web からファイル格納場所をリダイレクトするための設定 [#b0a74252]
- namazurc の中でアドレスの読み替えを設定する必要がある
- %%&color(gray){spirit.hmuna.com の namazu では /var/www/cgi-bin/.namazurc}; を設定ファイルとして利用している%%
- 通常の /usr/local/etc/namazurc %%ではないので注意が必要%% を使用することにした
Replace /usr/local/share/namazu/doc https://wiki.hmuna.com/namazu/namazu_doc/
Replace /var/www/html/pukiwiki/ https://wiki.hmuna.com/
Replace /opt/documents/prospect/ https://wiki.hmuna.com/namazu/prospect_doc/
Replace /opt/documents/renesas/ https://wiki.hmuna.com/namazu/renesas_doc/
** メール検索のためのツールのインストール [#od127441]
- 現在利用している Dovecot ( Mairdir 形式の IMAP4 ) を検索する ⇒ バックアップイメージからデータを生成する
*** [[HMONARC:http://www.mhonarc.jp/mirror/]] のインストール [#v0f7c71b]
- MHONARC 2.6.16 をダウンロード -----> &ref(MHonArc-2.6.16.tar.gz);
[root@spirit Downloads]# cd MHonArc-2.6.16
[root@spirit MHonArc-2.6.16]# perl install.me
- rcfile (動作環境設定ファイル)
-- /home/munakata/Maildir/cur の下
-- /home/stored_mail/Maildir/cur の下
** 新しい検索対象を追加した時の処理 [#t356f976]
- &color(red){/var/www/html/pukiwiki/namazu/index}; の下に新しいインデックスディレクトリを作成する
- インデックスを作成する
- ターゲットディレクトリへのシンボリックリンクを作成する
- &color(red){/var/www/cgi-bin/.namazerc}; に replace の設定を行う (上記シンボリックリンクを設定する)
- 検索画面 ( &color(red){/var/www/html/pukiwiki/namazu/template/NMZ.head.ja}; ) に新しい検索対象を指定する
** 参考 URL [#me4eb368]
- [[Namazu 旧ページ>CENT_Namazu]]
- http://linux.ohwada.jp/modules/xfsection/article.php?title=mhonarc
- http://www.bookshelf.jp/soft/meadow_61.html#SEC872