How To Install nsd on CentOS 8

nsd is Fast and lean authoritative DNS Name Server

Introduction

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

What is nsd

NSD is a complete implementation of an authoritative DNS name server. For further information about what NSD is and what NSD is not please consult the REQUIREMENTS document which is a part of this distribution.

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

Install nsd 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 nsd using dnf by running the following command:

sudo dnf -y install nsd

Install nsd 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 nsd using yum by running the following command:

sudo yum -y install nsd

How To Uninstall nsd on CentOS 8

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

sudo dnf remove nsd

nsd Package Contents on CentOS 8

/etc/nsd
/etc/nsd/conf.d
/etc/nsd/nsd.conf
/etc/nsd/nsd_control.key
/etc/nsd/nsd_control.pem
/etc/nsd/nsd_server.key
/etc/nsd/nsd_server.pem
/etc/nsd/server.d
/usr/lib/.build-id
/usr/lib/.build-id/30
/usr/lib/.build-id/30/795eb6993f6af4b5f60381a0d749eee7ff020b
/usr/lib/.build-id/61
/usr/lib/.build-id/61/1c1a7b3fec464b62b0a0dab46ce4e1651fd413
/usr/lib/.build-id/a1
/usr/lib/.build-id/a1/72ec8aa8c16c28277464c74e12012cd5e1bc5f
/usr/lib/.build-id/e0
/usr/lib/.build-id/e0/1d5ac76afa546f0dd5b0db6fa791ff91fea43c
/usr/lib/systemd/system/nsd-keygen.service
/usr/lib/systemd/system/nsd.service
/usr/lib/tmpfiles.d/nsd.conf
/usr/sbin/nsd
/usr/sbin/nsd-checkconf
/usr/sbin/nsd-checkzone
/usr/sbin/nsd-control
/usr/sbin/nsd-control-setup
/usr/share/doc/nsd
/usr/share/doc/nsd/CREDITS
/usr/share/doc/nsd/ChangeLog
/usr/share/doc/nsd/LICENSE
/usr/share/doc/nsd/NEW-CFG-OPTION
/usr/share/doc/nsd/NSD-4-features
/usr/share/doc/nsd/NSD-DATABASE
/usr/share/doc/nsd/NSD-DIFFFILE
/usr/share/doc/nsd/NSD-FOR-BIND-USERS
/usr/share/doc/nsd/README
/usr/share/doc/nsd/README.icc
/usr/share/doc/nsd/README.svn
/usr/share/doc/nsd/RELNOTES
/usr/share/doc/nsd/REQUIREMENTS
/usr/share/doc/nsd/TESTPLAN
/usr/share/doc/nsd/TODO
/usr/share/doc/nsd/UPGRADING
/usr/share/doc/nsd/coding-style
/usr/share/doc/nsd/differences.pdf
/usr/share/doc/nsd/differences.tex
/usr/share/doc/nsd/nsd.zones2nsd.conf
/usr/share/licenses/nsd
/usr/share/licenses/nsd/LICENSE
/usr/share/man/man5/nsd.conf.5.gz
/usr/share/man/man8/nsd-checkconf.8.gz
/usr/share/man/man8/nsd-checkzone.8.gz
/usr/share/man/man8/nsd-control.8.gz
/usr/share/man/man8/nsd.8.gz
/var/lib/nsd
/var/run/nsd

References

Summary

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