How to install subversion (SVN) on CentOS
From HostThyself
This Howto describe how to install a subversion server on CentOS
[edit] Using yum
At the time of writing, these are the respective version:
- CentOS 4.4
- Subversion 1.1.4
Install subversion using yum
yum install subversion
Install the Apache module mod_dav_svn
yum install mod_dav_svn
Install Virtualmin SubVersion Repositories for Webmin
Activate subversion repository for host. This will automatically create repository and add the require configuration to the virtualhost section of apache's httpd.conf.
(See also Setup subversion repository permission)
[edit] Manually
Alternatively, edit /etc/httpd/conf.d/subversion.conf and enable the following lines
<Location /repos>
DAV svn
SVNParentPath /var/www/svn
# Limit write permission to list of valid users.
<LimitExcept GET PROPFIND OPTIONS REPORT>
# Require SSL connection for password protection.
# SSLRequireSSL
AuthType Basic
AuthName "Authorization Realm"
AuthUserFile /path/to/passwdfile
Require valid-user
</LimitExcept>
</Location>
Manually create repository and htpasswd file.
mkdir -p //var/www/svn/repos svnadmin create /var/www/svn/repos svn mkdir file://localhost/var/www/svn/repos/trunk -m "create" svn mkdir file://localhost/var/www/svn/repos/branches -m "create" svn mkdir file://localhost/var/www/svn/repos/tags -m "create" chown -R apache:apache /var/www/svn/repos htpasswd -c /path/to/passwdfile username