Installation on Debian
Varnish is distributed in the Debian package repositories but the version there might be out of date and we generally recommend using the packages provided by varnish-cache.org or packages from backports.debian.org.
To use the varnish-cache.org repository and install Varnish under Debian 7 ("wheezy") do the following as root:
apt-get install apt-transport-https
curl https://repo.varnish-cache.org/GPG-key.txt | apt-key add -
echo "deb https://repo.varnish-cache.org/debian/ wheezy varnish-4.0" >> /etc/apt/sources.list.d/varnish-cache.list
apt-get install varnish
For Debian 8 ("jessie") replace wheezy above with jessie.
If you want to install the older 3.0 version, replace varnish-4.0 with varnish-3.0 in the command above.
Ubuntu LTS users please follow these instructions.