Magento 2.1.18 is the final 2.1.x release. After June 2019, Magento 2.1.x will no longer receive security patches, quality fixes, or documentation updates.
To maintain your site's performance, security, and PCI compliance, upgrade to the latest version of Magento.

Install Varnish

Installing the Varnish software is beyond the scope of this guide. For more information about installing Varnish, see:

This topic is written for Varnish on CentOS and Apache 2.2. If you’re setting up Varnish in a different environment, some commands are likely different. Consult the preceding documentation for more information.

Confirm your Varnish version

Enter the following command to display the version of Varnish you’re running:

1
varnishd -V

A sample follows:

1
2
3
varnishd (varnish-4.0.3 revision b8c4a34)
Copyright (c) 2006 Verdens Gang AS
Copyright (c) 2006-2014 Varnish Software AS

Make sure the version is at least 3.0.5 or any version of 4.x before continuing.

Next step

Configure Varnish and your web server

Updated