lost and found ( for me ? )

build unbound 1.4.21 on ubuntu 12.04 64bit

Here are trial and error logs when compiling unbound 1.4.21 on ubuntu 12.04 64bit.

# tail -1 /etc/lsb-release ;uname –ri
DISTRIB_DESCRIPTION="Ubuntu 12.04.3 LTS"
3.2.0-54-virtual x86_64

# apt-get install -y build-essential

# tar xzvf unbound-latest.tar.gz

# cd unbound-1.4.21/

# ./configure
checking for SSL... configure: error: Cannot find the SSL libraries in /usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /opt/local /usr/sfw /usr

# apt-get install libssl-dev

# ./configure
checking if openssl supports SHA2 and ECDSA with EVP... yes
checking for libexpat... configure: error: Could not find libexpat, expat.h

# apt-get install libexpat1 libexpat1-dev –y

# ./configure
configure: error: No ldns library found, install the ldns library into system lib dir or use --with-ldns=path to other location.  The --with-ldns can point to the make-dir of ldns.  Install the package ldns or download source http://www.nlnetlabs.nl/projects/ldns


build ldns
# tar xzvf ldns-1.6.16.tar.gz
# cd ldns-1.6.16
# ./configure
# make
# make install
# ldconfig
# updatedb
# locate ldns | grep "/usr/local/lib"
/usr/local/lib/libldns.a
/usr/local/lib/libldns.la
/usr/local/lib/libldns.so
/usr/local/lib/libldns.so.1
/usr/local/lib/libldns.so.1.6.16

build unbound again
# cd unbound-1.4.21/
# ./configure --with-ldns=/usr/local/lib
# make
# make install

# /usr/local/sbin/unbound --h
Version 1.4.21
linked libs: mini-event internal (it uses select), ldns 1.6.16, OpenSSL 1.0.1 14 Mar 2012
linked modules: validator iterator
configured for x86_64-unknown-linux-gnu on Wed Oct  2 08:16:33 UTC 2013 with options: '--with-ldns=/usr/local/lib'
BSD licensed, see LICENSE in source package for details.
#

edit unbound.conf
# grep control-enable /usr/local/etc/unbound/unbound.conf
       # control-enable: no
        control-enable: yes



# /usr/local/sbin/unbound-control-setup

# /usr/local/sbin/unbound-control start
[1380702084] unbound[22687:0] fatal error: user 'unbound' does not exist.

# useradd unbound -s /bin/false

# /usr/local/sbin/unbound-control start

# /usr/local/sbin/unbound-control status
version: 1.4.21
verbosity: 1
threads: 1
modules: 2 [ validator iterator ]
uptime: 4 seconds
unbound (pid 22892) is running...

# dig @127.1 www.google.com +short
173.194.38.112
173.194.38.116
173.194.38.114
173.194.38.113

No comments:

Post a Comment

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