jablonka.czprosek.czf

websvn

Subversion Repositories:
[/] [doc/] [install.html] - Blame information for rev 6

 

Line No. Rev Author Line
11simandl<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
3<head>
4 <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
5 <meta http-equiv="content-script-type" content="text/javascript" />
6 <meta http-equiv="content-style-type" content="text/css" />
7 <title>WebSVN Installation Guide</title>
8 <link rel="stylesheet" type="text/css" href="style.css" />
9</head>
10 
11<body>
12 
13<h1>WebSVN Installation Guide</h1>
14 
15<div class="misc">
16<h2><a name="content"></a>Content</h2>
17<ul>
18 <li><a href="#why">Why WebSVN?</a></li>
19 <li><a href="#installation">Installation</a></li>
20 <li><a href="#accentedchars">Accented characters</a></li>
21 <li><a href="#colourisation">Colourisation</a></li>
22 <li><a href="#multiviews">Mulitviews</a></li>
23 <li><a href="#multiviewsexample">Mulitviews example</a></li>
24 <li><a href="#authentication">Access rights and authentication</a></li>
25 <li><a href="#problems">Common problems</a></li>
26 <li><a href="#license">License</a></li>
27</ul>
28</div>
29 
30<div class="content">
31<h2><a name="why"></a>Why WebSVN?</h2>
32 
33<p>WebSVN offers a view onto your subversion repositories that's been designed
34to reflect the Subversion methodology. You can view the log of any file or
35directory and see a list of all the files changed, added or deleted in any
36given revision. You can also view the differences between 2 versions of a
37file so as to see exactly what was changed in a particular revision.</p>
38 
39<p>WebSVN offers the following features:</p>
40 
41<ul>
42 <li>Easy to use interface</li>
43 <li>Highly customisable templating system</li>
44 <li>Colourisation of file listings</li>
45 <li>Blame view</li>
46 <li>Log message searching</li>
47 <li>Apache MultiViews support</li>
48 <li>RSS feed support</li>
49 <li>Support for bugtraq: properties</li>
50</ul>
51 
52<p>Since it's written using PHP, WebSVN is also very portable and easy to install.</p>
53 
54<h2><a name="installation"></a>Installation</h2>
55 
563simandl<p>Grab the source and stick it somewhere that your server can get to.
57You need to have <strong>PHP 4.3.0</strong> or greater installed and working.
58Additionally you need <strong>SVN 1.2.0</strong> or greater.
59Also note that WebSVN won't currently work in safe mode, due to the need to call svn/svnlook.</p>
601simandl 
613simandl<p>If it isn't already, make sure to chmod the cache directory to at least 0700,
62and is owned by the process your webserver is running under. This is used to
63cache RSS files. It is not recommended to set the directory to full write,
640777.</p>
651simandl 
66<p>Rename distconfig.php as config.php (found in the includes directory) and then
67edit it as directed in the file itself.</p>
68 
69<p>If everything has gone well, you should be able to view your projects by
70pointing your browser at the index.php file.</p>
71 
72<p>For those of you wishing to customise the look and feel a little, you should
73read templates.txt, which explains the highly configurable template system.</p>
74 
753simandl<p>No other external program are required.</p>
76 
77<!--
78<p>You'll also need diff (preferably the GNU version; for Windows users I'd
79recommend the Cygwin version) and svnlook available.</p>
80 
811simandl<p><b>Windows users:</b> Note that some of the features offered by WebSVN, when
82enabled, require the use of various external programs. They can be downloaded
83from these locations:</p>
84 
853simandl<p>Diff/Sed/Gzip/Tar: <a href="http://www.cygwin.com/">http://www.cygwin.com/</a></p>
86-->
871simandl 
88<h2><a name="accentedchars"></a>Accented characters</h2>
89 
90<p>WebSVN is designed to worked with accented characters. To do this, it uses
91the iconv function. This may not be installed on your system. If you aren't
92getting the characters that you expect, make sure that the iconv module is
93being loaded in php.ini. Windows users will need to copy the appropriate
94DLLs to the system directory (from the PHP installation directory).</p>
95 
96<h2><a name="colourisation"></a>Colourisation</h2>
97 
98<p>Per default WebSVN uses the Generic Syntax Highlighter GeSHi which is bundle with WebSVN.</p>
99 
100<p>Alternatively, if you have Enscript 1.6 or higher installed on your system,
1013simandlyou can use that to view files with syntax colouring. You'll also need Sed.<br />
102It can be found at <a href="http://people.ssh.com/mtr/genscript/">http://people.ssh.com/mtr/genscript/</a></p>
1031simandl 
1043simandl 
1051simandl<p>Simply set the paths in the config file and then uncomment the line:</p>
106 
107<pre class="code">
108$config->useEnscript();
109</pre>
110 
111<p>and comment the line:</p>
112 
113<p>Alternatively you can use GeSHi which is bundle with WebSVN.</p>
114 
115<p>Simply uncomment the line:</p>
116 
117<pre class="code">
118$config->useGeshi();
119</pre>
120 
121 
122<h2><a name="multiviews"></a>Multiviews</h2>
123 
124<p>You may choose to configure access to your repository via Apache's MultiView
125system. This will enable you to access a respositoy using a url such as:</p>
126 
127<p>http://servername/wsvn/repname/path/in/repository</p>
128 
129<p>To do this you must:</p>
130 
131<ul>
132 <li>Place wsvn.php where you want to. Normally you place it such that it's accessible straight after the servername, as shown above.</li>
133 <li>Configure the parent directory of wsvn.php to use MultiViews (see Apache docs).</li>
134 <li>Change config.php to include the line $config->useMultiViews();</li>
135 <li>Change the path configured at the beginning of the wsvn.php script.</li>
136</ul>
137 
138<p>Now go to http://servername/wsvn/ and make sure that you get the index page.</p>
139 
140<p>The repname part of the URL is the name given to it in the config.php file.
141For this reason you may wish to avoid putting spaces in the name.</p>
142 
143 
144<h2><a name="multiviewsexample"></a>Multiviews example</h2>
145 
146<p>First, you must get the Multiviews option working. In my set up, my Apache
147directory root is set to a location on my harddrive:</p>
148 
149<pre class="code">
150DocumentRoot "D:/svnpage"
151</pre>
152 
153<p>In that directory, I have WebSVN installed in a directory called websvn.
154Normally WebSVN would be accessed by http://servername/websvn</p>
155 
156<p>wsvn.php is then copied from the WebSVN installation to the document root
157directory and the variable at the beginning of the script configured as
158follows (based on your own directory location, obviously):</p>
159 
160<pre class="code">
161// Location of websvn directory via HTTP
162//
163// e.g. For http://servername/websvn use /websvn
164//
165// Note that wsvn.php need not be in the /websvn directory (and normally isn't).
166$locwebsvnhttp = "/websvn";
167</pre>
168 
169<p>Next, turn on Multiviews in the WebSVN config.php file:</p>
170 
171<pre class="code">
172$config->useMultiViews();
173</pre>
174 
175<p>Finally, Apache needs to know that you want to enable MultiViews for the root
176directory. This can be done by including this line in the directory's
177.htaccess file (assuming that the appropriate AllowOverrides directive is set
178up):</p>
179 
180<pre class="code">
181Options MultiViews
182</pre>
183 
184<p>If all has gone well, repositories should now by accessible by
185<code>http://servername/wsvn/repname</code></p>
186 
187<p>Note the index page can be accessed through http://servername/wsvn
188If you want to view the index page by <code>http://servername/</code> you need to
189add another directive to the .htaccess file:</p>
190 
191<pre class="code">
192DirectoryIndex wsvn.php
193</pre>
194 
195 
196<h2><a name="authentication"></a>Access rights and authentication</h2>
197 
198<p>You may wish to provide an authentication mechanism for WebSVN. One obvious
199solution is to protect the entire WebSVN directory with some form of Apache
200authentication mechanism, but that doesn't allow for per repository
201authentication.</p>
202 
203<p>WebSVN provides and access rights mechanism that uses your SVN access file to
204control read access to the repository. This means that you only have to
205maintain one file to define both Subversion and WebSVN access rights.</p>
206 
207<p>For this to work, you need to configure your authentication method to the /WebSVN/
208(or /wsvn/) directory. This should be the same authentication as you use for
209the svn repositories themselves. Here's an example using SSPI:</p>
210 
211<pre class="code">
212&lt;Location /WebSVN/>
213 AuthType SSPI
214 SSPIAuth On
215 SSPIAuthoritative On
216 SSPIDomain IMAJEMAIL
217 SSPIOfferBasic On
218 Require valid-user
219&lt;/Location>
220</pre>
221 
222<p>Note the use of the / after <code>/WebSVN/</code> in the location directive. If you use
223&lt;Location /WebSVN> then you won't be able to access the index.</p>
224 
225<p>You should change <code>/WebSVN/</code> to <code>/wsvn/</code> if you're using multiviews.</p>
226 
227<p>Also note that you shouldn't use the AuthzSVNAccessFile command to define the
228access file.</p>
229 
230<p>Now that you've defined your authentication, you'll be asked for your user name
231and password in order to access the WebSVN directory. All that's left is to
232configure WebSVN to use your Subversion access file to control access. Add this
233line to your config.php file:</p>
234 
235<pre class="code">
236$config->useAuthenticationFile("/path/to/accessfile");
237</pre>
238 
239<p>Note that if your access file gives read access to, for example, path <code>/a/b/c/</code> but
240not to <code>/a/b/</code>, then the user will be given restricted access to <code>/a/b/</code> in order to
241reach <code>/a/b/c/</code>. The user will not be able to see any other files or directories in
242<code>/a</code> or <code>/a/b/</code>.</p>
243 
244<p>You should read the <a href="http://svnbook.red-bean.com/">Subversion book</a> for information on the access file format.</p>
245 
246 
247<h2><a name="problems"></a>Common problems</h2>
248 
249<ol>
250 <li>
251 On a Windows machine, this error is reported:<br />
252 Warning: shell_exec(): Unable to execute<br />
253 If you experience this problem, you need to give IUSR_&lt;machinename> execute
254 permissions on %systemroot%\system32\cmd.exe. Under most systems, the file will
255 be C:\WINDOWS\system32\cmd.exe.<br />
256 
257 Right-click on the file, choose properties, and on the security tab click
258 the "Add" button. Add the IUSR_&lt;machinename> user, and then select the
259 "read" and "read &amp; execute" boxes.
260 </li>
261</ol>
262 
263 
264<h2><a name="license"></a>License</h2>
265 
266<p><a href="http://www.fsf.org/licensing/licenses/gpl.html">GNU Public licence</a>.</p>
267 
268</div>
269 
270</body>
271</html>

Powered by WebSVN 2.2.1