How To Install varnish on CentOS 8
Introduction
In this tutorial we learn how to install varnish
on CentOS 8.
What is varnish
This is Varnish Cache, a high-performance HTTP accelerator. Varnish Cache stores web pages in memory so web servers don’t have to create the same web page over and over again. Varnish Cache serves pages much faster than any application server; giving the website a significant speed up. Documentation wiki and additional information about Varnish Cache is available on
We can use yum
or dnf
to install varnish
on CentOS 8. In this tutorial we discuss both methods but you only need to choose one of method to install varnish.
Install varnish 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
using dnf
by running the following command:
sudo dnf -y install varnish
Install varnish 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
using yum
by running the following command:
sudo yum -y install varnish
How To Uninstall varnish on CentOS 8
To uninstall only the varnish
package we can use the following command:
sudo dnf remove varnish
varnish Package Contents on CentOS 8
/etc/ld.so.conf.d/varnish-x86_64.conf
/etc/logrotate.d/varnish
/etc/varnish
/etc/varnish/default.vcl
/usr/bin/varnishadm
/usr/bin/varnishhist
/usr/bin/varnishlog
/usr/bin/varnishncsa
/usr/bin/varnishstat
/usr/bin/varnishtest
/usr/bin/varnishtop
/usr/lib/.build-id
/usr/lib/.build-id/16
/usr/lib/.build-id/16/1ad5711e808cb0b70bae5bf78fb9d87a606319
/usr/lib/.build-id/1c
/usr/lib/.build-id/1c/2fe0a6e11ac0d1fc7a9b6d005f6ee79bff59d2
/usr/lib/.build-id/27
/usr/lib/.build-id/27/30471cee1e981bc3ba9cf269eca142ef8f9f4f
/usr/lib/.build-id/32
/usr/lib/.build-id/32/d84620b160ca017fd85f53f02ea0342f9395bf
/usr/lib/.build-id/3b
/usr/lib/.build-id/3b/37561c67a2ef95a608193b4522b3721b638f30
/usr/lib/.build-id/40
/usr/lib/.build-id/40/06b66564832d8218ae1a8515d81921755b3856
/usr/lib/.build-id/40/9ca364babf6785aa4f21a9913e64085ab5c892
/usr/lib/.build-id/5f
/usr/lib/.build-id/5f/f8885746c6232667ff8760d3aeef859883da8b
/usr/lib/.build-id/6d
/usr/lib/.build-id/6d/41269a28debcfd0b9380aa2bf7775fa90e7fab
/usr/lib/.build-id/6f
/usr/lib/.build-id/6f/9bd5076a0859670c1d4e6596322f01eb244d88
/usr/lib/.build-id/95
/usr/lib/.build-id/95/221f966bbd68b2ba86afff91c3926d7732580f
/usr/lib/.build-id/a7
/usr/lib/.build-id/a7/79091ac2bd243963238db34ec66c6d6f1602d7
/usr/lib/.build-id/c6
/usr/lib/.build-id/c6/ad00a73d514d709501ee3d20ab011d26e27e42
/usr/lib/.build-id/f3
/usr/lib/.build-id/f3/eb7db902176ddf35059c07cdc68525b9cbc610
/usr/lib/.build-id/fb
/usr/lib/.build-id/fb/a93b7d744eda03325c5200433e11ba7fbdb03e
/usr/lib/.build-id/ff
/usr/lib/.build-id/ff/996d90e19e173ac8a914bc18ee9dbb30f91bc3
/usr/lib/systemd/system/varnish.service
/usr/lib/systemd/system/varnishncsa.service
/usr/lib64/libvarnishapi.so.1
/usr/lib64/libvarnishapi.so.1.0.6
/usr/lib64/varnish
/usr/lib64/varnish/vmods
/usr/lib64/varnish/vmods/libvmod_blob.so
/usr/lib64/varnish/vmods/libvmod_directors.so
/usr/lib64/varnish/vmods/libvmod_proxy.so
/usr/lib64/varnish/vmods/libvmod_purge.so
/usr/lib64/varnish/vmods/libvmod_std.so
/usr/lib64/varnish/vmods/libvmod_unix.so
/usr/lib64/varnish/vmods/libvmod_vtc.so
/usr/sbin/varnishd
/usr/sbin/varnishreload
/usr/share/doc/varnish
/usr/share/doc/varnish/ChangeLog
/usr/share/doc/varnish/README.rst
/usr/share/doc/varnish/builtin.vcl
/usr/share/doc/varnish/example.vcl
/usr/share/licenses/varnish
/usr/share/licenses/varnish/LICENSE
/usr/share/man/man1/varnishadm.1.gz
/usr/share/man/man1/varnishd.1.gz
/usr/share/man/man1/varnishhist.1.gz
/usr/share/man/man1/varnishlog.1.gz
/usr/share/man/man1/varnishncsa.1.gz
/usr/share/man/man1/varnishstat.1.gz
/usr/share/man/man1/varnishtest.1.gz
/usr/share/man/man1/varnishtop.1.gz
/usr/share/man/man3/vmod_blob.3.gz
/usr/share/man/man3/vmod_directors.3.gz
/usr/share/man/man3/vmod_proxy.3.gz
/usr/share/man/man3/vmod_purge.3.gz
/usr/share/man/man3/vmod_std.3.gz
/usr/share/man/man3/vmod_unix.3.gz
/usr/share/man/man3/vmod_vtc.3.gz
/usr/share/man/man7/varnish-cli.7.gz
/usr/share/man/man7/varnish-counters.7.gz
/usr/share/man/man7/vcl.7.gz
/usr/share/man/man7/vsl-query.7.gz
/usr/share/man/man7/vsl.7.gz
/usr/share/man/man7/vtc.7.gz
/var/lib/varnish
/var/log/varnish
References
Summary
In this tutorial we learn how to install varnish
on CentOS 8 using yum and dnf.