Tripwire-2.3.1-2のFreeBSD-4.2へのインストールメモ
[ライセンス] http://www.tripwire.org/qanda/faq.php を,つたない英語力で読んでみた. ライセンスはGPLライセンスになっている. 機能的には2.2.1(バイナリ配布版)と同じようだ. NTや商用UNIXには対応予定がない.(まぁそやろな.) Q. 16.What license are we releasing our product under? A. We are releasing the Tripwire Open Source, Linux Edition product under the GNU GPL license - General Public License. This is the most widely used and accepted license for open source code in the Linux and open source community. For more details check out: www.opensource.org/osd.html とある. FreeBSDは Open source community に含まれると思ってええんか? と,この時点ではちょっと疑問. #とは言え,GPLってことは... [ダウンロード] http://sourceforge.net/projects/tripwire/ から tripwire-2.3.1-2.tar.gz をダウンロード [インストール準備] % cd /path/to/work/ % tar zxvf /path/to/source/tripwire-2.3.1-2.tar.gz % cd tripwire-2.3.1-2/ % less README (→FreeBSDもOKやね.) % less INSTALL (→ふむふむ) % cd src % cp Makefile Makefile.dist (念のためバックアップ) % vi Makefile ########## Makefile の変更点 (ここから)########## 82c82 < #SYSPRE = i686-pc-linux --- > SYSPRE = i686-pc-linux 84c84 < SYSPRE = i386-unknown-freebsd --- > #SYSPRE = i386-unknown-freebsd ########## Makefile の変更点 (ここまで)########## [インストール] % cd /path/to/work/tripwire-2.3.1-2/src/ % gmake release →エラーなし.よっしゃよっしゃ. % cd ../ % cp install/install.cfg . % cp install/install.sh . % cp install.cfg install.cfg.dist (念のためバックアップ) % vi install.cfg ########## install.cfg の変更点 (ここから)########## 27c27 < TWBIN="/usr/local/sbin" --- > TWBIN="/usr/sbin" 33c33 < TWMAN="/usr/local/man" --- > TWMAN="/usr/man" 36c36 < TWDB="/var/local/lib/tripwire" --- > TWDB="/var/lib/tripwire" 39c39 < TWDOCS="/usr/local/doc/tripwire" --- > TWDOCS="/usr/doc/tripwire" 51c51 < TWEDITOR="/usr/bin/vi" --- > TWEDITOR="/bin/vi" 88c88 < TWMAILPROGRAM="/usr/sbin/sendmail -oi -t" --- > TWMAILPROGRAM="/usr/lib/sendmail -oi -t" ########## install.cfg の変更点 (ここまで)########## % cp install.sh install.sh.dist (念のためバックアップ) % vi install.sh (i686-pc-linux_r を i386-unknown-freebsd_r に変更.) ########## install.sh の変更点 (ここから)########## 491c491 < BIN_DIR="${BASE_DIR}bin/i386-unknown-freebsd_r" --- > BIN_DIR="${BASE_DIR}bin/i686-pc-linux_r" 624,627c624,627 < f4=' ff=tripwire ; d="/bin/i386-unknown-freebsd_r" ; dd=$TWBIN ; rr=0550 ' < f5=' ff=twadmin ; d="/bin/i386-unknown-freebsd_r" ; dd=$TWBIN ; rr=0550 ' < f6=' ff=twprint ; d="/bin/i386-unknown-freebsd_r" ; dd=$TWBIN ; rr=0550 ' < f7=' ff=siggen ; d="/bin/i386-unknown-freebsd_r" ; dd=$TWBIN ; rr=0550 ' --- > f4=' ff=tripwire ; d="/bin/i686-pc-linux_r" ; dd=$TWBIN ; rr=0550 ' > f5=' ff=twadmin ; d="/bin/i686-pc-linux_r" ; dd=$TWBIN ; rr=0550 ' > f6=' ff=twprint ; d="/bin/i686-pc-linux_r" ; dd=$TWBIN ; rr=0550 ' > f7=' ff=siggen ; d="/bin/i686-pc-linux_r" ; dd=$TWBIN ; rr=0550 ' ########## install.sh の変更点 (ここまで)########## # ./install.sh すると The uname command, which tells what operating system is running on this machine, returned a result that this installation script did not expect. Tripwire 2.3 Open Source for LINUX is supported on Linux Kernels only. Continue with installation? [y/n] なんて聞かれる.構わず"y". Press ENTER to view the License Agreement. には"改行"で答え,GPLを読む. Please type "accept" to indicate your acceptance of this license agreement. [do not accept] にも"accept". Enter the local keyfile passphrase: Verify the local keyfile passphrase: にそれぞれ入力し, Please enter your site passphrase: Please enter your site passphrase: にも入力すればインストール完了. [初期設定] # tripwire --init -c /etc/tripwire/tw.cfg (何回かやってたら動き出した. 何でやねん!) # ln -s /etc/tripwire /usr/local/etc/tripwire (設定ファイルは/etc/tripwireにあるのに/usr/local/etc/tripwireを読みに行くんで...) [ポリシーの設定] # vi /etc/tripwire/twpol.txt (ポリシーファイルの編集. linuxとFreeBSDでかなりちゃうねんなぁ) # tripwire --update-policy twpol.txt (twpol.txt) twpol.txt をコンパイルして, tw.polを生成したつもり. → けどTIMESTAMP変わらへんがな.(おぉ,エラーが出とるなぁ) (何回かいろいろやってたらうまく行った.)←これじゃ参考にならんがな! [検証] # tripwire --check (注) ・makeはgmakeでやること. ・コンパイル時, % gmake release で release binary をmakeしたが, debug binary をコンパイルするなら % gmake debug とすればよいはず. ・侵入者対策として, /usr/local/sbin/tripwire はファイル名を変更して保存しておくべきですね. twpol.txt もバイナリファイルtw.polにコンパイルしたら消去しておくと良いでしょう. 以上,簡単メモでした.