How To Install haveged on CentOS 8

haveged is A Linux entropy source using the HAVEGE algorithm

Introduction

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

What is haveged

A Linux entropy source using the HAVEGE algorithm Haveged is a user space entropy daemon which is not dependent upon the standard mechanisms for harvesting randomness for the system entropy pool. This is important in systems with high entropy needs or limited user interaction (e.g. headless servers). Haveged uses HAVEGE (HArdware Volatile Entropy Gathering and Expansion) to maintain a 1M pool of random bytes used to fill /dev/random whenever the supply of random bits in /dev/random falls below the low water mark of the device. The principle inputs to haveged are the sizes of the processor instruction and data caches used to setup the HAVEGE collector. The haveged default is a 4kb data cache and a 16kb instruction cache. On machines with a cpuid instruction, haveged will attempt to select appropriate values from internal tables.

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

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

sudo dnf -y install haveged

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

sudo yum -y install haveged

How To Uninstall haveged on CentOS 8

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

sudo dnf remove haveged

haveged Package Contents on CentOS 8

/usr/lib/.build-id
/usr/lib/.build-id/a9
/usr/lib/.build-id/a9/930033f89d052af5321640eccfbf81b39051a7
/usr/lib/.build-id/dd
/usr/lib/.build-id/dd/dcc2734915a6567e105e283e85ee11df309429
/usr/lib/dracut/modules.d/98haveged
/usr/lib/dracut/modules.d/98haveged/module-setup.sh
/usr/lib/systemd/system/haveged-switch-root.service
/usr/lib/systemd/system/haveged.service
/usr/lib/udev/rules.d/90-haveged.rules
/usr/lib64/libhavege.so.2
/usr/lib64/libhavege.so.2.0.0
/usr/sbin/haveged
/usr/share/doc/haveged
/usr/share/doc/haveged/AUTHORS
/usr/share/doc/haveged/COPYING
/usr/share/doc/haveged/ChangeLog
/usr/share/doc/haveged/README
/usr/share/doc/haveged/havege_sample.c
/usr/share/man/man8/haveged.8.gz

References

Summary

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