First, you need get the rpm package for varnish. If you are running under CentOS 6 you will find
the link below:

https://repo.varnish-cache.org/redhat/varnish-4.0.el6.rpm

For install it in you server you need issue:

root@server[~] rpm –nosignature -i https://repo.varnish-cache.org/redhat/varnish-4.0.el6.rpm

Once we have added rpm package we can start varnish installation.

root@server[~] yum install varnish

While installing is probably that you get the same error message:

Error: Package: varnish-4.0.1-1.el6.x86_64 (varnish-4.0)
Requires: jemalloc
You could try using –skip-broken to work around the problem

Do not panic! This happens becasue varnish4 depends on ‘jemalloc’ being installed.
The problem is that this package seems not listed in RHEL’s repository and we need install it before
continue into varnish installation.

So, let’s take it from EPEL:

x86
https://dl.fedoraproject.org/pub/epel/6/x86_64/jemalloc-3.6.0-1.el6.i686.rpm

x64
ftp://ftp.muug.mb.ca/mirror/fedora/epel/6/x86_64/jemalloc-3.6.0-1.el6.x86_64.rpm

For install it, then execute:
(example based on x86 system)

root@server[~] cd /usr/local/src
root@server[~] wget https://dl.fedoraproject.org/pub/epel/6/x86_64/jemalloc-3.6.0-1.el6.i686.rpm
root@server[~] rpm -ivh jemalloc-3.6.0-1.el6.i686.rpm

Now we are ready for resuming varnish installation.

root@server[~] yum install varnish

Just let installation get completed. You can tweak varnish from now.

Enable it for starting automatically when system boots

chkconfig –add varnish

Start varnish service and enjoy!

service varnish start

Profile Picture for ServerHostMX Staff
ServerHostMexico is a mexican webhosting provider created on 2014 as a small projects developer team offering internet services for pymes. Nowadays, we are working hard for having an efficent and standard webhosting level for all our clients, in Mexico and over the globe.

Leave a Reply

Your email address will not be published. Required fields are marked *


CAPTCHA Image
Reload Image