How Do You Install Varnish on Debian/Ubuntu Linux?

Problem scenario
You want to install Varnish on a Debian/Ubuntu Linux server.  How do you do this?

Solution
Run these commands:

sudo apt-get -y update

sudo apt-get -y install gcc python-docutils pkg-config libreadline-dev libncurses5-dev libpcre3-dev #*

curl http://varnish-cache.org/_downloads/varnish-6.0.0.tgz > /tmp/varnish-6.0.0.tgz

sudo cp /tmp/varnish-6.0.0.tgz /opt/

cd /opt

sudo tar xvzf varnish-6.0.0.tgz

cd varnish-6.0.0

sudo ./configure

sudo make

sudo make install

varnishd -V

* This website says:

'On Debian, you might also have to do:

export PCRE_LIBS="-L/usr/lib -lpcre"
export PCRE_CFLAGS=-I/usr/include/pcre # '

If you want to purchase a book on Varnish, click here.

Leave a comment

Your email address will not be published.