How To Install unbound on CentOS 8

unbound is Validating, recursive, and caching DNS(SEC) resolver

Introduction

In this tutorial we learn how to install unbound on CentOS 8.

What is unbound

Unbound is a validating, recursive, and caching DNS(SEC) resolver. The C implementation of Unbound is developed and maintained by NLnet Labs. It is based on ideas and algorithms taken from a java prototype developed by Verisign labs, Nominet, Kirei and ep.net. Unbound is designed as a set of modular components, so that also DNSSEC (secure DNS) validation and stub-resolvers (that do not run as a server, but are linked into an application) are easily possible.

We can use yum or dnf to install unbound on CentOS 8. In this tutorial we discuss both methods but you only need to choose one of method to install unbound.

Install unbound on CentOS 8 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

The output should look something like this:

CentOS Linux 8 - AppStream                                       43 kB/s | 4.3 kB     00:00    
CentOS Linux 8 - BaseOS                                          65 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - ContinuousRelease                               43 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - Extras                                          23 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - FastTrack                                       40 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - HighAvailability                                36 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - Plus                                            24 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - PowerTools                                      50 kB/s | 4.3 kB     00:00    
Extra Packages for Enterprise Linux Modular 8 - x86_64           13 kB/s | 9.2 kB     00:00    
Extra Packages for Enterprise Linux 8 - x86_64                   24 kB/s | 8.5 kB     00:00    
Metadata cache created.

After updating yum database, We can install unbound using dnf by running the following command:

sudo dnf -y install unbound

Install unbound on CentOS 8 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

The output should look something like this:

CentOS Linux 8 - AppStream                                       43 kB/s | 4.3 kB     00:00    
CentOS Linux 8 - BaseOS                                          65 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - ContinuousRelease                               43 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - Extras                                          23 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - FastTrack                                       40 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - HighAvailability                                36 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - Plus                                            24 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - PowerTools                                      50 kB/s | 4.3 kB     00:00    
Extra Packages for Enterprise Linux Modular 8 - x86_64           13 kB/s | 9.2 kB     00:00    
Extra Packages for Enterprise Linux 8 - x86_64                   24 kB/s | 8.5 kB     00:00    
Metadata cache created.

After updating yum database, We can install unbound using yum by running the following command:

sudo yum -y install unbound

How To Uninstall unbound on CentOS 8

To uninstall only the unbound package we can use the following command:

sudo dnf remove unbound

unbound Package Contents on CentOS 8

/etc/sysconfig/unbound
/etc/unbound/conf.d
/etc/unbound/conf.d/example.com.conf
/etc/unbound/keys.d
/etc/unbound/keys.d/example.com.key
/etc/unbound/local.d
/etc/unbound/local.d/block-example.com.conf
/etc/unbound/unbound.conf
/etc/unbound/unbound_control.key
/etc/unbound/unbound_control.pem
/etc/unbound/unbound_server.key
/etc/unbound/unbound_server.pem
/usr/lib/.build-id
/usr/lib/.build-id/77
/usr/lib/.build-id/77/37cca6c5543e9face2e6215e51a71291841a75
/usr/lib/.build-id/80
/usr/lib/.build-id/80/196979f32ea08c490698a6e0ae0e8c045f5fca
/usr/lib/.build-id/bb
/usr/lib/.build-id/bb/c80a8d6306c0d4a36538b081220437e7dbdfff
/usr/lib/.build-id/c0
/usr/lib/.build-id/c0/469ff2715899ecbebe44c56795ba4723172543
/usr/lib/.build-id/e1
/usr/lib/.build-id/e1/3ab1e88a90e487addc7e3c19a0b69db3fefb48
/usr/lib/systemd/system/unbound-keygen.service
/usr/lib/systemd/system/unbound.service
/usr/lib/tmpfiles.d/unbound.conf
/usr/sbin/unbound
/usr/sbin/unbound-checkconf
/usr/sbin/unbound-control
/usr/sbin/unbound-control-setup
/usr/sbin/unbound-host
/usr/sbin/unbound-streamtcp
/usr/share/doc/unbound
/usr/share/doc/unbound/CREDITS
/usr/share/doc/unbound/FEATURES
/usr/share/man/man1/unbound-host.1.gz
/usr/share/man/man1/unbound-streamtcp.1.gz
/usr/share/man/man5/unbound.conf.5.gz
/usr/share/man/man8/unbound-checkconf.8.gz
/usr/share/man/man8/unbound-control-setup.8.gz
/usr/share/man/man8/unbound-control.8.gz
/usr/share/man/man8/unbound.8.gz
/var/run/unbound

References

Summary

In this tutorial we learn how to install unbound on CentOS 8 using yum and dnf.