honeyd 用於壓力測試安裝說明

   honeyd的安裝比較麻煩,我在ubuntu上下載以後許多庫的版本都不兼容,網上能夠查到錯誤相應的解決方法。這裏有一個詳細的版本。 html

   首先去官網下載安裝包,http://www.honeyd.org/。 linux

    tar zxvf honeyd-1.5c.tar.gz
  cd honeyd-1.5c
  ./configure
  出錯了:configure: error: libpcap not found
  緣由是沒有安裝libpcap包,如今開始安裝。
  tar zxvf libpcap-1.1.1.tar.gz
  cd libpcap-1.1.1
  ./configure ;make;make install
  安裝完libpcap後再回來安裝honeyd。
  ./configure
  又出錯了:
  checking for dnet-config... no
  configure: error: dnet-config not found
  缺乏libdnet包。
  tar zxvf libdnet-1.11.tar.gz
  cd libdnet-1.11
  ./configure ;make;make install
  再回來安裝honeyd。
  ./configure
  出錯:
  checking for libevent... no
  configure: error: libevent not found
  缺乏libevent包。
  tar zxvf libevent-1.4.14b-stable.tar.gz
  cd libevent-1.4.14b-stable
  ./configure ;make;make install
  再回來安裝honeyd。
  ./configure
  出錯了:configure: error: need either libedit or libreadline; install one of them
  解決辦法:
  yum install -y readline readline-devel
  再回來安裝honeyd。
  ./configure ;make;make install
  安裝完honeyd後接下來安裝arpd包。
  tar zxvf arpd-0.2.tar.gz
  cd arpd
  ./configure
  make
  make的時候出錯了:
  arpd.c: In function 'arpd_send':
  arpd.c:268: error: expected ')' before string constant
  arpd.c: In function 'arpd_lookup':
  arpd.c:285: error: expected ')' before string constant
  arpd.c:294: error: expected ')' before string constant
  arpd.c:297: error: expected ')' before string constant
  arpd.c: In function 'arpd_recv_cb':
  arpd.c:426: error: expected ')' before string constant
  make: *** [arpd.o] Error 1
  解決方法:
  在arpd/arpd.c文件中添加 #define __FUNCTION__ ""
  而後在編譯
  make;make install
  如今基本上就安裝成功了。
  四.  還容易遇到的問題
  arpd包編譯成功後,鏈接生成arpd二進制程序,在linux下運行時,出現以下錯誤:
  [root@linux lib]# arpd
  ./arpd/arpd: error while loading shared libraries: libevent-1.4.so.2: cannot open shared object file: No such file or directo
  解決方法:
  方法一:直接把libevent-1.4.so.2文件拷貝到系統指定的/usr/lib庫文件目錄中。或者作符合鏈接
  方法二:設置/etc/ld.so.conf文件,編輯該文件,在文件中加入libevent-1.4.so.2所在的目錄,保存後退出。須要注意的是,每次改動ld.so.conf以後須要運行ldconfing來確認刷新。
  緣由分析:
  arpd運行時,須要libevent庫的支持,因此在運行arpd前,要先編譯好libevent包,並把產生的libevent-1.4.so.2文件拷貝到系統默認的庫文件目錄下,以便arpd運行時可以鏈接到。
  出錯:configure: error: libdnsres not found
  解決辦法:
  wget http://www.monkey.org/~provos/libdnsres-0.1a.tar.gz
  tar zxvf libdnsres-0.1a.tar.gz
  cd libdnsres-0.1a
  ./configure ;make;make install
  錯誤:
  yacc -d ./parse.y
  make: yacc: Command not found
  make: *** [parse.c] Error 127
  解決辦法:
  yum install -y byacc
  編譯libpcap時出錯:
  configure: error: Your operating system's lex is insufficient to compile
  libpcap.  flex is a lex replacement that has many advantages, including
  being able to compile libpcap.  For more information, see
  http://www.gnu.org/software/flex/flex.html .
  問題:
  缺乏flex包
  解決辦法:
  yum install -y flex
  出錯:
  make all-recursive
  make[1]: Entering directory `/home/jlawre23/Desktop/honeyd-1.5c'
  Making all in .
  make[2]: Entering directory `/home/jlawre23/Desktop/honeyd-1.5c'
 gcc -DHAVE_CONFIG_H -I. -I. -I. -I./compat/libdnet -I./compat -I/usr/local/include -I/usr/include/pcap -I/usr/include -O2 -Wall -g -DPATH_HONEYDINCLUDE="\"/usr/local/include/honeyd\"" -DPATH_HONEYDDATA="\"/usr/local/share/honeyd\"" -DPATH_HONEYDLIB="\"/usr/local/lib/honeyd\"" -DHONEYD_PLUGINS_DECLARE="" -DHONEYD_PLUGINS="" -DPATH_RRDTOOL="\"\"" -c honeyd.c
  In file included from honeyd.c:97:
  tagging.h:89: error: expected declaration specifiers or ‘...’ before ‘(’ token
  tagging.h:89: error: expected declaration specifiers or ‘...’ before ‘(’ token
  In file included from stats.h:36,
  from honeyd.c:98:
  ./compat/sha1.h:23: warning: ‘__bounded__’ attribute directive ignored
  ./compat/sha1.h:23: warning: ‘__bounded__’ attribute directive ignored
  ./compat/sha1.h:26: warning: ‘__bounded__’ attribute directive ignored
  ./compat/sha1.h:28: warning: ‘__bounded__’ attribute directive ignored
  ./compat/sha1.h:30: warning: ‘__bounded__’ attribute directive ignored
  ./compat/sha1.h:32: warning: ‘__bounded__’ attribute directive ignored
  ./compat/sha1.h:35: warning: ‘__bounded__’ attribute directive ignored
  ./compat/sha1.h:35: warning: ‘__bounded__’ attribute directive ignored
  make[2]: *** [honeyd.o] Error 1
  make[2]: Leaving directory `/home/jlawre23/Desktop/honeyd-1.5c'
  make[1]: *** [all-recursive] Error 1
  make[1]: Leaving directory `/home/jlawre23/Desktop/honeyd-1.5c'
  make: *** [all] Error 2
  解決辦法:
  卸掉其餘版本的libevent包,安裝本文提到的libevent-1.4.14b-stable。 ubuntu

相關文章
相關標籤/搜索