hping3のインストール

Date 2011-10-15 2:20:02 | Topic: Linux (Sientific)

覚書のため、後から記憶をたどりながら書いているので、記入漏れがあるかも。
portを指定してpingができるhping3をインストールする。
ソースからしか出来ない見たい。まずはソースをdownloadする。2011/10/15時点でのバージョン
# wget http;//www.hping.org/hping3-20051105.tar.gz http; はワザと間違えている。: にするとxoopsが勝手にリンクを貼り文字色がかわるから
必要になプログラム。libpcap-devel, tcl, tcl-devel これらをインストール
# yum -y install libpcap-devel tcl tcl-devel
リンクを作る。
# ls /usr/include/net/bpf.h || (ls /usr/include/pcap-bpf.h && ln -s /usr/include/pcap-bpf.h /usr/include/net/bpf.h)
ダウンロードしたソースの解凍し、Dirを移る
# tar zxfv hping3-20051105.tar.gz
# cd hping3-20051105

configure fileの修正
23行目位にある
INSTALL_MANPATH="/usr/local/man" を
INSTALL_MANPATH="/usr/local/share/man" に訂正
bytesex.hの修正(私の場合は64ビット環境なので必要になる)
10行目くらいからの
#if defined(__i386__) \
|| defined(__alpha__) \


#if defined(__i386__) \
|| defined(__x86_64__) \
#この行を挿入
|| defined(__alpha__) \
に修正。いよいよインストール
# ./configure
ここで
build byteorder.c...
create byteorder.h...
./configure: line 81: -: コマンドが見つかりません
--------------------------------------
system type: LINUX

LIBPCAP : PCAP=-lpcap
PCAP_INCLUDE :
MANPATH : /usr/local/share/man
USE_TCL : -DUSE_TCL
TCL_VER :
TCL_INC :
LIBTCL : -ltcl -lm -lpthread
TCLSH :

(to modify try configure --help)
--------------------------------------
creating Makefile...
creating dependences...
now you can try `make'

とエラーが出るが、you can try `make‘とあるのでそのまま続ける
# make
# make install

でインストールできたみたい。/usr/sbinをみるとhping, hping2, hping3 と出来ている(hping hping2はhping3へのリンク)



This article comes from 錦稜会 KINRYOKAI
https://www.kinryokai.net

The URL for this story is:
https://www.kinryokai.net/article.php?storyid=109