This tutorial shows how to do initial installation Varnish Enterprise 6.0 on Debian 11 (Bullseye). Looking for another platform?
Before you can start this tutorial, you should have:
Install packages needed to set up the repository:
sudo apt update sudo apt install apt-transport-https curl gpg
Add the Varnish Enterprise gpg key to the keyring used by APT:
curl -L https://TOKEN:@packagecloud.io/varnishplus/60/gpgkey | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/varnish-enterprise-6.0.gpg
Create the file
/etc/apt/sources.list.d/varnish.list with the following contents:
deb https://packagecloud.io/varnishplus/60/debian/ bullseye main
Create the file
/etc/apt/auth.conf.d/varnish.conf with the following contents:
machine packagecloud.io/varnishplus/60 login TOKEN
Make sure this file is not world readable:
sudo chown root:root /etc/apt/auth.conf.d/varnish.conf sudo chmod 600 /etc/apt/auth.conf.d/varnish.conf
The order of entries in
/etc/apt/auth.conf.d/varnish.conf matters. If enabling authenticated access to multiple repositories, make sure to have the more specific machine names on top. The following is an example showing how to enable multiple Varnish related repositories:
machine packagecloud.io/varnishplus/60-extra1 login TOKEN1 machine packagecloud.io/varnishplus/60-extra2 login TOKEN2 machine packagecloud.io/varnishplus/60 login TOKEN
Install Varnish Enterprise and VMODs:
sudo apt update sudo apt install varnish-plus
The configuration files for Varnish are:
The VCL configuration file that is loaded by default when Varnish starts. In this file you can specify the location of your web servers.
The systemd unit file specifying the Varnish parameters, storage engines and the VCL configuration file to load on startup. This file should not be edited but overridden according to systemd best practices.
Varnish is started, stopped, restarted and reloaded using the following commands:
sudo systemctl start varnish sudo systemctl stop varnish sudo systemctl restart varnish sudo systemctl reload varnish
Verify if Varnish is running using the following command:
sudo systemctl status -l varnish
Varnish Enterprise 6.0 has now been installed in Debian 11 (Bullseye). At this point it is possible to dive in to VCL and VMODs.