~ubuntu-branches/ubuntu/saucy/varnish/saucy

« back to all changes in this revision

Viewing changes to doc/sphinx/installation/install.rst

  • Committer: Bazaar Package Importer
  • Author(s): Stig Sandbeck Mathisen
  • Date: 2011-03-21 10:16:07 UTC
  • mfrom: (24.1.2 experimental)
  • Revision ID: james.westby@ubuntu.com-20110321101607-528fzl583fqanas5
Tags: 2.1.5-2
ReleaseĀ forĀ unstable

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
.. _install-doc:
 
2
 
 
3
Installing Varnish
 
4
==================
 
5
 
 
6
With open source software, you can choose to install binary packages
 
7
or compile stuff from source-code. To install a package or compile
 
8
from source is a matter of personal taste. If you don't know which
 
9
method too choose read the whole document and choose the method you
 
10
are most confortable with.
 
11
 
 
12
 
 
13
Source or packages?
 
14
~~~~~~~~~~~~~~~~~~~
 
15
 
 
16
Installing Varnish on most relevant operating systems can usually 
 
17
be done with with the systems package manager, typical examples
 
18
being:
 
19
 
 
20
FreeBSD
 
21
~~~~~~~
 
22
 
 
23
From source:
 
24
                ``cd /usr/ports/varnish && make install clean``
 
25
Binary package:
 
26
                ``pkg_add -r varnish``
 
27
 
 
28
CentOS/RedHat
 
29
~~~~~~~~~~~~~
 
30
 
 
31
We try to keep the lastest version available as prebuildt RPMs (el4 &
 
32
el5) on `SourceForge <http://sourceforge.net/projects/varnish/files/>`_.
 
33
 
 
34
Varnish is included in the `EPEL
 
35
<http://fedoraproject.org/wiki/EPEL>`_ repository.  Unfortunatly we
 
36
had a syntax change in Varnish 2.0.6->2.1.X. This means that we can
 
37
not update Varnish in `EPEL <http://fedoraproject.org/wiki/EPEL>`_ so
 
38
the latest version there is Varnish 2.0.6.
 
39
 
 
40
EPEL6 should have Varnish 2.1 available once it releases. 
 
41
 
 
42
Debian/Ubuntu
 
43
~~~~~~~~~~~~~
 
44
 
 
45
Varnish is distributed with both Debian and Ubuntu. In order to get
 
46
Varnish up and running type `sudo apt-get install varnish`. Please
 
47
note that this might not be the latest version of Varnish.
 
48
 
 
49
Other systems
 
50
~~~~~~~~~~~~~
 
51
 
 
52
You are probably best of compiling your own code. See `Compiling
 
53
Varnish from source`_.
 
54
 
 
55
If that worked for you, you can skip the rest of this document for
 
56
now, and and start reading the much more interesting
 
57
:ref:`tutorial-index` instead.
 
58
 
 
59
 
 
60
Compiling Varnish from source
 
61
=============================
 
62
 
 
63
If there are no binary packages available for your system, or if you
 
64
want to compile Varnish from source for other reasons, follow these
 
65
steps:
 
66
 
 
67
First get a copy of the sourcecode using the ``svn`` command.  If
 
68
you do not have this command, you need to install SubVersion_ on
 
69
your system.  There is usually a binary package, try substituting
 
70
"subversion" for "varnish" in the examples above, it might just work.
 
71
 
 
72
To fetch the current (2.1) production branch:::
 
73
 
 
74
        svn co http://varnish-cache.org/svn/branches/2.1
 
75
 
 
76
To get the development source code:::
 
77
 
 
78
        svn co http://varnish-cache.org/svn/trunk
 
79
 
 
80
Build dependencies on Debian / Ubuntu 
 
81
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
82
 
 
83
In order to build Varnish from source you need a number of packages
 
84
installed. On a Debian or Ubuntu system these are:
 
85
 
 
86
* autotools-dev
 
87
* automake1.9
 
88
* libtool 
 
89
* autoconf
 
90
* libncurses-dev
 
91
* xsltproc
 
92
* groff-base
 
93
* libpcre3-dev
 
94
* pkg-config
 
95
 
 
96
Build dependencies on Red Hat / Centos
 
97
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
98
 
 
99
To build Varnish on a Red Hat or Centos system you need the following
 
100
packages installed:
 
101
 
 
102
* automake 
 
103
* autoconf 
 
104
* libtool
 
105
* ncurses-devel
 
106
* libxslt
 
107
* groff
 
108
* pcre-devel
 
109
* pkgconfig
 
110
 
 
111
Configuring and compiling
 
112
~~~~~~~~~~~~~~~~~~~~~~~~~
 
113
 
 
114
Next, configuration: The configuration will need the dependencies
 
115
above satisfied. Once that is taken care of:::
 
116
 
 
117
        cd varnish-cache
 
118
        sh autogen.sh
 
119
        sh configure
 
120
        make
 
121
 
 
122
The ``configure`` script takes some arguments, but more likely than
 
123
not, you can forget about that for now, almost everything in Varnish
 
124
are runtime parameters.
 
125
 
 
126
Before you install, you may want to run the regression tests, make
 
127
a cup of tea while it runs, it takes some minutes::
 
128
 
 
129
        (cd bin/varnishtest && ./varnishtest tests/*.vtc)
 
130
 
 
131
Don't worry of a single or two tests fail, some of the tests are a
 
132
bit too timing sensitive (Please tell us which so we can fix it) but
 
133
if a lot of them fails, and in particular if the ``b00000.vtc`` test 
 
134
fails, something is horribly wrong, and you will get nowhere without
 
135
figuring out what.
 
136
 
 
137
Installing
 
138
~~~~~~~~~~
 
139
 
 
140
And finally, the true test of a brave heart::
 
141
 
 
142
        make install
 
143
 
 
144
Varnish will now be installed in /usr/local. The varnishd binary is in
 
145
/usr/local/sbin/varnishd and its default configuration will be
 
146
/usr/local/etc/varnish/default.vcl. 
 
147
 
 
148
You can now proceed to the :ref:`tutorial-index`. 
 
149
 
 
150
.. _SubVersion: http://subversion.tigris.org/