Technology

Installing an SVN Server on Ubuntu (Based on Apache)

A detailed guide on setting up an Apache-based SVN server on Ubuntu, including installation, configuration, and security settings.

Sangrak

Installation

Use apt-get to install the following packages:

bash
apt-get install subversion libapache2-svn

Configuration

bash
svnadmin create /home/svn/name

Grant permissions to Apache.

bash
chown www-data:www-data /home/svn/name -R

Here, /home/svn/name is the directory-based name.

ID, Password Security Configuration

Modify the content of the file below. (If you wish to use multiple domains, you can also configure them within the sites-enabled folder in their respective domain files.)

bash
vi /etc/apache2/mods-enabled/dav_svn.conf
apache
<Location /svn>
	DAV svn
	SVNPath /home/svn/name
	AuthType Basic
	AuthName "My Project"
	AuthUserFile /etc/apache2/dav_svn.passwd
	Require valid-user
</Location>
bash
htpasswd -cm /etc/apache2/dav_svn.passwd username

Completion

Restart Apache.

bash
/etc/init.d/apache2 restart

More on this topic