wget http://kakasi.namazu.org/stable/kakasi-2.3.4.tar.gz tar zxvf kakasi-2.3.4.tar.gz cd kakasi-2.3.4 ./configure && make && make install cd ../ wget http://www.namazu.org/stable/namazu-2.0.18.tar.gz tar zxvf namazu-2.0.18.tar.gz cd namazu-2.0.18/File-MMagic/¡¡ perl Makefile.PL && make install cd .. ./configure && make && make install cp /usr/local/etc/namazu/mknmzrc-sample /usr/local/etc/namazu/mknmzrc vi /usr/local/etc/namazu/mknmzrc $ALLOW_FILE = ".*\\.(?:$HTML_SUFFIX)"; vi /usr/local/bin/mknmz #! /usr/bin/perl cp /usr/local/etc/namazu/namazurc-sample /usr/local/etc/namazu/namazurc vi /usr/local/etc/namazu/namazurc Replace /var/www/html/ http://localhost/ Lang ja_JP.eucJP mkdir /usr/local/var/namazu/index/centos mknmz /var/www/html/centos -O /usr/local/var/namazu/index/centos|nkf -w namazu test /usr/local/var/namazu/index/centos|nkf -w cp /usr/local/libexec/namazu.cgi /var/www/cgi-bin nkf -w /usr/local/var/namazu/index/centos/NMZ.head.ja>NMZ.head.ja vi NMZ.head.ja
[¸¡º÷ÊýË¡] nkf -e NMZ.head.ja>/usr/local/var/namazu/index/centos/NMZ.head.ja rm -f NMZ.head.ja nkf -w /usr/local/var/namazu/index/centos/NMZ.foot.ja>NMZ.foot.ja vi NMZ.foot.ja Namazu sakaijunsoccer@gmail.com nkf -e NMZ.foot.ja>/usr/local/var/namazu/index/centos/NMZ.foot.ja rm -f NMZ.foot.ja vi mknmz.sh #!/bin/bash PATH=/usr/local/bin:/usr/bin:/bin if [ -d $1 ]; then DOC=$1 else echo "Usage: $0 Directory Index [ExcludeDirectoryList]" exit 1 fi if [ -d $2 ]; then IDX=$2 else echo "Usage: $0 Directory Index [ExcludeDirectoryList]" exit 1 fi if [ -f ${IDX}NMZ.lock2 ]; then ps `cat ${IDX}NMZ.lock2` > /dev/null 2>&1 [ $? -ne 0 ] && rm -f ${IDX}NMZ.lock2 fi if [ $# -eq 3 ] && [ -f $3 ]; then for exclude in `cat $3` do NOTDOC="$NOTDOC$exclude|" done NOTDOC=`echo $NOTDOC|sed 's/|$//g'` fi SYSTEM_LANG=`echo $LANG` export LANG=ja_JP.eucJP TEMP_LOG=`mktemp` if [ $# -eq 3 ] && [ -f $3 ]; then mknmz $DOC -O $IDX --exclude="$NOTDOC" > $TEMP_LOG else mknmz $DOC -O $IDX > $TEMP_LOG fi if [ "$SYSTEM_LANG" = "ja_JP.UTF-8" ]; then nkf -w $TEMP_LOG | logger -t mknmz else cat $TEMP_LOG | logger -t mknmz fi rm -f $TEMP_LOG [ $(date +%w) = "1" ] && gcnmz -qb $IDX chmod 700 mknmz.sh crontab -e 00 00 * * * /root/mknmz.sh /var/www/html /usr/local/var/namazu/index/centos http://192.168.24.103/cgi-bin/namazu.cgi?idxname=centos