In this tutorial, you’ll learn how to do an initial installation of Varnish Enterprise 6.0 on Debian 9 (Stretch). Looking for another platform?
Before starting this tutorial, you should have:
Install packages needed to set up the repository:
sudo apt-get update sudo apt-get install apt-transport-https curl
Add the Varnish Enterprise gpg key to the keyring used by APT:
curl -L https://TOKEN:@packagecloud.io/varnishplus/60/gpgkey | sudo apt-key add -
Create the file
/etc/apt/sources.list.d/varnish-software.list with the following contents:
deb https://TOKEN:@packagecloud.io/varnishplus/60/debian/ stretch main
Add the following contents to
deb http://deb.debian.org/debian stretch-backports main
Install Varnish Enterprise and VMODs:
sudo apt-get update sudo apt-get 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.
Verify if Varnish is running using the following command:
sudo systemctl status -l varnish
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
Varnish Enterprise 6.0 has now been installed in Debian 9 (Stretch). Now it’s time to dive into VCL and VMODs.