How To Install varnish-modules on CentOS 8

varnish-modules is A collection of modules (“vmods”) extending Varnish VCL

Introduction

In this tutorial we learn how to install varnish-modules on CentOS 8.

What is varnish-modules

This is a collection of modules (“vmods”) extending Varnish VCL used for describing HTTP request/response policies with additional capabilities. This collection contains the following vmods (previously kept individually) tcp, var, xkey

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

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

sudo dnf -y install varnish-modules

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

sudo yum -y install varnish-modules

How To Uninstall varnish-modules on CentOS 8

To uninstall only the varnish-modules package we can use the following command:

sudo dnf remove varnish-modules

varnish-modules Package Contents on CentOS 8

/usr/lib/.build-id
/usr/lib/.build-id/09
/usr/lib/.build-id/09/14d178c44f594721152783d21e48c8ca8de010
/usr/lib/.build-id/29
/usr/lib/.build-id/29/93e79d705c497686f34c4dfd1cc8f67894072f
/usr/lib/.build-id/5d
/usr/lib/.build-id/5d/4f91bbabeb7c591bee13ba96e0dbad53c3a4e1
/usr/lib/.build-id/62
/usr/lib/.build-id/62/ea6756c426578ae37419be307e448f44d54755
/usr/lib/.build-id/7d
/usr/lib/.build-id/7d/fdd00fb9febe0851ba4b20239963d7234814e3
/usr/lib/.build-id/b0
/usr/lib/.build-id/b0/848ef0e93db981f204d63fe84ec7a04bdfea10
/usr/lib/.build-id/df
/usr/lib/.build-id/df/e517a7d696f5bac3767698f3b5608619740022
/usr/lib/.build-id/e7
/usr/lib/.build-id/e7/ba0dc7fb155ecac07743c0db08a15f8f3ac107
/usr/lib64/varnish/vmods/libvmod_bodyaccess.so
/usr/lib64/varnish/vmods/libvmod_cookie.so
/usr/lib64/varnish/vmods/libvmod_header.so
/usr/lib64/varnish/vmods/libvmod_saintmode.so
/usr/lib64/varnish/vmods/libvmod_tcp.so
/usr/lib64/varnish/vmods/libvmod_var.so
/usr/lib64/varnish/vmods/libvmod_vsthrottle.so
/usr/lib64/varnish/vmods/libvmod_xkey.so
/usr/share/doc/varnish-modules
/usr/share/doc/varnish-modules/AUTHORS
/usr/share/doc/varnish-modules/CHANGES.rst
/usr/share/doc/varnish-modules/COPYING
/usr/share/doc/varnish-modules/LICENSE
/usr/share/doc/varnish-modules/README.rst
/usr/share/doc/varnish-modules/docs
/usr/share/doc/varnish-modules/docs/vmod_cookie.rst
/usr/share/doc/varnish-modules/docs/vmod_header.rst
/usr/share/doc/varnish-modules/docs/vmod_saintmode.rst
/usr/share/doc/varnish-modules/docs/vmod_softpurge.rst
/usr/share/doc/varnish-modules/docs/vmod_tcp.rst
/usr/share/doc/varnish-modules/docs/vmod_var.rst
/usr/share/doc/varnish-modules/docs/vmod_vsthrottle.rst
/usr/share/doc/varnish-modules/docs/vmod_xkey.rst
/usr/share/licenses/varnish-modules
/usr/share/licenses/varnish-modules/LICENSE
/usr/share/man/man3/vmod_bodyaccess.3.gz
/usr/share/man/man3/vmod_cookie.3.gz
/usr/share/man/man3/vmod_header.3.gz
/usr/share/man/man3/vmod_saintmode.3.gz
/usr/share/man/man3/vmod_tcp.3.gz
/usr/share/man/man3/vmod_var.3.gz
/usr/share/man/man3/vmod_vsthrottle.3.gz
/usr/share/man/man3/vmod_xkey.3.gz

References

Summary

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