12.2.1 Installing a Subversion server
The subversion
meta-package depends on the packages needed
(libapache2-svn
and subversion-tools
) to set up a
server.
12.2.1.1 Setting up a repository
Currently, the subversion
package does not set up a repository, so
one must be set up manually. One possible location for a repository is in
/var/local/repos
.
Create the directory:
# mkdir -p /var/local/repos
Create the repository database:
# svnadmin create /var/local/repos
Make the repository writable by the WWW server:
# chown -R www-data:www-data /var/local/repos
12.2.1.2 Configuring Apache2
To allow access to the repository via user authentication, add (or uncomment)
the following in /etc/apache2/mods-available/dav_svn.conf
:
<Location /repos>
DAV svn
SVNPath /var/local/repos
AuthType Basic
AuthName "Subversion repository"
AuthUserFile /etc/subversion/passwd
<LimitExcept GET PROPFIND OPTIONS REPORT>
Require valid-user
</LimitExcept>
</Location>
Then, create a user authentication file with the command:
htpasswd2 -c /etc/subversion/passwd some-username
Restart Apache2, and your new Subversion repository will be accessible with the
URL https://hostname/repos.