HOWTOs
HOWTO
# Unbound 1.18.0 (2023-08-30)
# ==============
# Prerequisites:
# flex
# bison
# doxygen
# OpenSSL or LibreSSL
# expat (if not found: --with-libexpat=path)
# libhiredis (optional)
# pkg-config
# NSS (add --with-nss)
# libnettle (add --with-nettle)
# fstrm, protobuf-c (add --enable-dnstap)
# libsodium (add --enable-dnscrypt, --with-libsodium=path)
# Python (add --with-pythonmodule)
# Get the tarball
cd
test -f installed/unbound-1.18.0.tar.gz &&
mv -f installed/unbound-1.18.0.tar.gz .
test ! -f unbound-1.18.0.tar.gz &&
wget https://nlnetlabs.nl/downloads/unbound/unbound-1.18.0.tar.gz
# Verify tarball w/ sha256sum :
# (from the Unbound site)
echo "3da95490a85cff6420f26fae0b84a49f5112df1bf1b7fc34f8724f02082cb7\
12 unbound-1.18.0.tar.gz" | sha256sum -c
# Verify tarball w/ gpg :
( gpg --list-keys 7E045F8D 2>&1 || gpg --recv-keys 7E045F8D ) &&
wget -nc https://nlnetlabs.nl/downloads/unbound/unbound-1.18.0.tar.gz.asc &&
gpg --verify unbound-1.18.0.tar.gz.asc && rm unbound-1.18.0.tar.gz.asc
# Extract the source
mkdir -p -m 0700 ~/src
cd ~/src
find -maxdepth 1 -type d -name "unbound-*" -exec rm -r {} \;
tar xzvf ~/unbound-1.18.0.tar.gz
cd unbound-1.18.0
test $UID = 0 && chown -R root:root .
# Configure the build for 64-bit
test $(uname -m) = 'x86_64' &&
./configure --libdir=/usr/local/lib64 --mandir=/usr/local/man \
--enable-dnstap --enable-dnscrypt --disable-static
# Configure the build for anything else
test $(uname -m) != 'x86_64' &&
./configure --mandir=/usr/local/man \
--enable-dnstap --enable-dnscrypt --disable-static
# Build it
make
# Become root to install it
su
# Install it
make install
ldconfig
# Make sure your non-root user can remove the source later
chown -R $(logname) .
chmod -R u+w .
# Become your non-root user again
exit
# Save the source for later
cd
mkdir -p -m 0700 installed
rm -f installed/unbound-*.tar.*
mv unbound-1.18.0.tar.gz installed/
# If you ever want to uninstall Unbound, this should do it:
cd
su
test -d src/unbound-* && ( cd src/unbound-* ; make uninstall )
rm -f /usr/local/etc/unbound/unbound.conf \
/usr/local/include/unbound.h \
/usr/local/lib/libunbound.* \
/usr/local/lib/pkgconfig/libunbound.pc \
/usr/local/lib64/libunbound.* \
/usr/local/lib64/pkgconfig/libunbound.pc \
/usr/local/man/man1/unbound-host.1 \
/usr/local/man/man5/unbound.conf.5
( cd /usr/local/man/man3
rm -f libunbound.3 ub_*.3 )
( cd /usr/local/man/man8
rm -f unbound.8 unbound-anchor.8 unbound-checkconf.8 unbound-control.8 \
unbound-control-setup.8 )
( cd /usr/local/sbin
rm -f unbound unbound-anchor unbound-checkconf unbound-control \
unbound-control-setup unbound-host )
ldconfig
exit
find ~/src -maxdepth 1 -type d -name "unbound-*" -exec rm -r {} \;
rm -f ~/installed/unbound-*.tar.*
List of HOWTOs
Web page itself last updated: 2023-12-20 8:06pm (EST -0500)
HOWTO last updated: 2023-10-02 11:08pm
Copyright © 2001-2024 Jason Englander . All Rights reserved.