Skip to content
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


Varnish requires a GCC-compiler compatible with the compiler used to
build varnish with. This means GCC 3.4.6 on a standard RHEL4 system.

Varnish should work fine with GCC 3.3 and above.

Building a RPM package from a git checkout

You may build an rpm package direct from a git checkout. Here is an
example on how you may do this:

git clone git://
cd varnish-cache
sed -i "s/^Release: .*/Release: 0.git$(date +%Y%m%d)%{?dist}/" \
./ && ./configure 
make dist && rpmbuild -ts varnish-trunk.tar.gz

This builds a source rpm. Then you can, for example on a RHEL5 system,
do something like this:

rpmbuild --define "dist .el5" --rebuild /path/to/varnish-3.0-0.git20110203.src.rpm

Upgrading from 1.x to 2.0
There are a few changes in the vcl language from varnish-1.x to 2.0.
Because of varnish' dynamic vcl loading feature, there is no way to
guarantee that the vcl file in use actually exists on disk. Thus,
there is no way to securely automate this process, and one must do the
changes by hand.

In vcl, the word "insert" has been replaced by "deliver". 

In the vcl declaration of backends, where one earlier used "set
backend", backend parts are now just prefixed with a dot, so the
default localhost configuration will look like this:

backend default {
  .host = "";
  .port = "80";

Configuration of addresses and ports
In this package, varnish is configured to make the accelerator daemon
listen to port 6081. The administration interface listens to port 6082
on Addresses and ports can be changed in

The admin interface can be accessed by standard telnet.

The default config will try to forward http requests to
localhost:80. You may change this in /etc/varnish/vcl.conf. Please
read the vcl(7) man page for more information on the vcl language.

To gain actual value from varnish, you may want to move the listening
port to port 80, and your webserver to 8080 or similar.

Running with jemalloc on ppc or ppc64 on fedora: Edit and recompile
To get a package through to Fedora, it has to build in Red Hat's Koji
build environment. Their ppc and ppc64 builders run mock on a RHEL
ppc64 kernel. Our use of jemalloc does not work on this kernel, and
the build stays unsuccessful. As ppc64 is not the primary target of
varnish development, it may take some time to get this bug fixed. 
To get the package through to Fedora, jemalloc is disabled in the ppc
and ppc64 builds. 

Now, varnish with jemalloc enabled is known to work at least on the
ppc (32bit) kernel in Fedora 9. If you run on ppc, and have a workload
that suits jemalloc better, you might want to change the specfile and
recompile.  We would very much like feedback from anyone running
varnish on Fedora's own ppc64 kernel.

Something went wrong with that request. Please try again.