How To Install Varnish Cache
How To Install Varnish Cache
Hi,
I installed varnish cache, memcached, xcached and nice work website.
Ubuntu:
Debian:
service varnish restart
And for see if work:
varnishstat (comand)
Uptime mgt: 0+00:11:00 Hitrate n: 10 100 573
Uptime child: 0+00:11:00 avg(n): 0.0000 0.0000 0.0000
NAME CURRENT CHANGE AVERAGE AVG_10
MAIN.uptime 660 1.00 1.00 1.00
MAIN.pools 2 0.00 . 2.00
MAIN.threads 100 0.00 . 100.00
MAIN.threads_created 100 0.00 . 0.00
MAIN.n_backend 1 0.00 . 1.00
MAIN.n_vcl 1 0.00 . 0.00
MAIN.bans 1 0.00 . 1.00
MGT.uptime 660 1.00 1.00 1.00
SMA.s0.g_space 268435456 0.00 . 268435456.00
Test in gtmetrix for speed website:
Page Speed Grade:
(98%)
YSlow Grade:
(96%)
Page load time: 0.94s
Total page size: 72.8KB
Total number of requests: 5
I installed varnish cache, memcached, xcached and nice work website.
Ubuntu:
Code: Select all
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/ubuntu/ precise varnish-4.0" >> /etc/apt/sources.list.d/varnish-cache.list
apt-get update
apt-get install varnish
Red Hat (Linux - Centos):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 update
apt-get install varnish
Code: Select all
Version 4.0
rpm --nosignature -i https://repo.varnish-cache.org/redhat/varnish-4.0.el6.rpm
yum install varnish
service varnish restart
And for see if work:
varnishstat (comand)
Uptime mgt: 0+00:11:00 Hitrate n: 10 100 573
Uptime child: 0+00:11:00 avg(n): 0.0000 0.0000 0.0000
NAME CURRENT CHANGE AVERAGE AVG_10
MAIN.uptime 660 1.00 1.00 1.00
MAIN.pools 2 0.00 . 2.00
MAIN.threads 100 0.00 . 100.00
MAIN.threads_created 100 0.00 . 0.00
MAIN.n_backend 1 0.00 . 1.00
MAIN.n_vcl 1 0.00 . 0.00
MAIN.bans 1 0.00 . 1.00
MGT.uptime 660 1.00 1.00 1.00
SMA.s0.g_space 268435456 0.00 . 268435456.00
Test in gtmetrix for speed website:
Page Speed Grade:
(98%)
YSlow Grade:
(96%)
Page load time: 0.94s
Total page size: 72.8KB
Total number of requests: 5
Re: How To Install Varnish Cache
It was tested on static site?
varnish + nginx + apache?
varnish + nginx + apache?
Re: How To Install Varnish Cache
hi
that's not enougth : you have to setup a vcl file depending on the spec of your platform wordpress, joomla, prestashop etc... or you will cache anything including user pages, carts etc....
cheers
JP
that's not enougth : you have to setup a vcl file depending on the spec of your platform wordpress, joomla, prestashop etc... or you will cache anything including user pages, carts etc....
cheers
JP
Re: How To Install Varnish Cache
Yep, this is important notice.mephivio wrote: that's not enougth : you have to setup a vcl file depending on the spec of your platform wordpress, joomla, prestashop etc... or you will cache anything including user pages, carts etc....
But for popular platforms exist ready examples ;-)