Getting started with Varnish Enterprise 6.0 Tutorial


This tutorial shows how to do initial installation Varnish Enterprise 6.0 on Red Hat Enterprise Linux 7 and CentOS 7. Looking for another platform?


Before you can start this tutorial, you should have:

  • A host running RHEL 7 or CentOS 7.
  • Credentials to access the Varnish Software EL repository.

Step 1 - Repository setup

Create the file /etc/yum.repos.d/varnish-software.repo with the following contents:

name=Varnish Enterprise

Enable the Extra Packages for Enterprise Linux (EPEL) repository by installing the epel-release package:

sudo yum install

Step 2 - Installation

Install Varnish Enterprise and VMODs:

sudo yum install varnish-plus

Step 3 - Initial configuration

The configuration files for Varnish are:

  • /etc/varnish/default.vcl

    The VCL configuration file that is loaded by default when Varnish starts. In this file you can specify the location of your web servers.

  • /usr/lib/systemd/system/varnish.service

    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.

Step 4 - Process management

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

Next steps

Varnish Enterprise 6.0 has now been installed in RHEL 7 or CentOS 7. At this point it is possible to dive in to VCL and VMODs.

VCL resources: