lost and found ( for me ? )

install dnsperf 2.0 on Linux Mint 12


dnsperf is DNS stressing tool provide by Nominum.

You can get it from the following URL.
http://www.nominum.com/resources/measurement-tools

As for RHEL , there are RPM packages for RHEL4 i386 , RHEL 5 i386 , RHEL6 x86 64.
As for Debian based , there are no deb packages.
I’ll install this on Linux Mint 12 from the source.
# tail -1 /etc/lsb-release
DISTRIB_DESCRIPTION="Linux Mint 12 Lisa"

# uname -ri
3.0.0-17-generic x86_64


download the source
dnsperf-src-2.0.0.0-1.tar.gz
# tar xzvf dnsperf-src-2.0.0.0-1.tar.gz
# cd dnsperf-src-2.0.0.0-1/


Seen from README , BIND 9.4.0 or greater need to be installed to compile dnsperf 2.0
1. Make sure that BIND 9 (9.4.0 or greater) is installed, including libraries
  and header files, and that the isc-config.sh program distributed with BIND
  is in your path.


Befre installing dnsperf 2.0 , I’ll install BIND 9.9.0
# tar xzvf bind-9.9.0.tar.gz bind-9.9.0/
# cd bind-9.9.0/
# ./configure
# make
# make install
# /usr/local/sbin/named -V
BIND 9.9.0 built with defaults
using OpenSSL version: OpenSSL 1.0.0e 6 Sep 2011


install dnsperf 2.0
# cd dnsperf-src-2.0.0.0-1/
# sh configure


nnn , error .. there’s no hmacsha.h: ..
# make
gcc -g -O2 -I/usr/local/include -D_GNU_SOURCE -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DHAVE_LIBNSL=1 -DHAVE_PTHREAD=1 -pthread -c dnsperf.c
dnsperf.c: In function ‘main’:
dnsperf.c:1041:7: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
dnsperf.c: In function ‘do_send’:
dnsperf.c:668:7: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
dnsperf.c: In function ‘handle_sigint’:
dnsperf.c:197:7: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
gcc -g -O2 -I/usr/local/include -D_GNU_SOURCE -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DHAVE_LIBNSL=1 -DHAVE_PTHREAD=1 -pthread -c datafile.c
gcc -g -O2 -I/usr/local/include -D_GNU_SOURCE -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DHAVE_LIBNSL=1 -DHAVE_PTHREAD=1 -pthread -c dns.c
dns.c:46:25: fatal error: isc/hmacsha.h: No such file or directory
compilation terminated.
make: *** [dns.o] Error 1


Senn from README , it describes that:
Note: many versions of bind do not correctly install the <isc/hmacsha.h>
  header file, so if the compilation fails, obtain this file from the BIND
  source distribution, and install it in the appropriate place.


where is hmacsha.h …
# locate hmacsha.h
/home/zzz/my_works/bind-9.9.0/lib/isc/include/isc/hmacsha.h


and which directory should I put it ??

under /usr/local/include/isc directory ?
# ls /usr/local/include/isc/
app.h            hex.h            netaddr.h        sha2.h
assertions.h     hmacmd5.h        netdb.h          sockaddr.h
atomic.h         httpd.h          offset.h         socket.h
base64.h         int.h            once.h           stdio.h


copy hmacsha.c to /usr/local/include/isc directory.
# cp /home/zzz/my_works/bind-9.9.0/lib/isc/include/isc/hmacsha.h /usr/local/include/isc


try again
# sh configure


okay.
# make
gcc -g -O2 -I/usr/local/include -D_GNU_SOURCE -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DHAVE_LIBNSL=1 -DHAVE_PTHREAD=1 -pthread -c dns.c
gcc -g -O2 -I/usr/local/include -D_GNU_SOURCE -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DHAVE_LIBNSL=1 -DHAVE_PTHREAD=1 -pthread -c log.c
gcc -g -O2 -I/usr/local/include -D_GNU_SOURCE -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DHAVE_LIBNSL=1 -DHAVE_PTHREAD=1 -pthread -c net.c
gcc -g -O2 -I/usr/local/include -D_GNU_SOURCE -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DHAVE_LIBNSL=1 -DHAVE_PTHREAD=1 -pthread -c opt.c
gcc -g -O2 -I/usr/local/include -D_GNU_SOURCE -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DHAVE_LIBNSL=1 -DHAVE_PTHREAD=1 -pthread -c os.c
ar rv libperf.a datafile.o dns.o log.o net.o opt.o os.o
ar: creating libperf.a
a - datafile.o
a - dns.o
a - log.o
a - net.o
a - opt.o
a - os.o
ranlib libperf.a
gcc -pthread dnsperf.o  libperf.a -lnsl  -L/usr/local/lib -lbind9 -ldns -lcrypto -lisccfg -lisc -ldl  -lm -o dnsperf
gcc -g -O2 -I/usr/local/include -D_GNU_SOURCE -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DHAVE_LIBNSL=1 -DHAVE_PTHREAD=1 -pthread -c resperf.c
gcc -pthread resperf.o  libperf.a -lnsl  -L/usr/local/lib -lbind9 -ldns -lcrypto -lisccfg -lisc -ldl  -lm -o resperf
#

# make install
mkdir -p /usr/local/bin
mkdir -p /usr/local/share/man/man1
/usr/bin/install -c  dnsperf /usr/local/bin
/usr/bin/install -c  resperf /usr/local/bin
/usr/bin/install -c  resperf-report /usr/local/bin
/usr/bin/install -c -m 644  dnsperf.1 /usr/local/share/man/man1
/usr/bin/install -c -m 644  resperf.1 /usr/local/share/man/man1


get things done :)
# ls /usr/local/bin/*perf
/usr/local/bin/dnsperf  /usr/local/bin/resperf

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.