September 18, 2018

Varnish 6.1 is here

Varnish 6.1 arrives!

To upgrade to Varnish 6.1 on Ubuntu 16.04, first create a file named varnishcache_varnish61.list:

nano /etc/apt/sources.list.d/varnishcache_varnish61.list

It shall contain the repository configuration below:

deb https://packagecloud.io/varnishcache/varnish61/ubuntu/ xenial main
deb-src https://packagecloud.io/varnishcache/varnish61/ubuntu/ xenial main

If there is already a file called varnishcache_varnish60.list, you should delete it:

rm  /etc/apt/sources.list.d/varnishcache_varnish60.list

Then:

curl -L https://packagecloud.io/varnishcache/varnish61/gpgkey | sudo apt-key add -
apt update && apt upgrade

After upgrade to Varnish 6.1, you may also need to adjust /lib/systemd/system/varnish.service:

[Unit]
Description=Varnish Cache, a high-performance HTTP accelerator
After=network-online.target

[Service]
Type=forking
KillMode=process

# Maximum number of open files (for ulimit -n)
LimitNOFILE=infinity

# Locked shared memory - should suffice to lock the shared memory log
# (varnishd -l argument)
# Default log size is 80MB vsl + 1M vsm + header -> 82MB
# unit is bytes
LimitMEMLOCK=infinity

# Enable this to avoid "fork failed" on reload.
TasksMax=infinity

# Maximum size of the corefile.
LimitCORE=infinity

ExecStart=/usr/sbin/varnishd -a :80 -T localhost:6082 -f /etc/varnish/default.vcl -S /etc/varnish/secret -p feature=+http2 -s malloc,4G -a '[::1]:6086,PROXY'
ExecReload=/usr/sbin/varnishreload

[Install]
WantedBy=multi-user.target

Verify varnish version:

varnishd -V

varnishd (varnish-6.1.0 revision 4684c38ecfc194b4f3b5b81594832dbb197a3bb9) Copyright (c) 2006 Verdens Gang AS Copyright (c) 2006-2015 Varnish Software AS

© Meken 2024

Powered by Hugo & Kiss.