Not much document on the Web really guide users to build up a svn repository; I am going to show you the debian way to create a very simple but usable SVN Repository with Apache.

In this document, i assume you know how to build up a very simple apache service, if you do not, leave me comment.

We first install the packages: subversion and libapache2-svn.

Configure Apache SVN Module

After installed the packages, we enable the apache svn modules by adding soft links.
# cd /etc/apache2/mods-enable
# ln -s ../mods-available/dav.load
# ln -s ../mods-available/dav_svn.load
# ln -s ../mods-available/dav_svn.conf

Then, we add some <Location/> to have our SVN Repository show up on browser.

<Location /svn>
DAV svn
SVNParentPath /home/svn
AuthUserFile /home/svn/.htpasswd
AuthName "Walkmen SVN"
AuthType Basic
require valid-user
<Limit PUT POST DELETE PROPFIND PROPPATCH MKCOL COPY MOVE LOCK UNLOCK>
Require user testuser
</Limit>
</Location>

For a single repository, replace SVNParentPath to SVNPath.
Here we will have more than one SVN Repository, so we create and use the repostiroies’s parent folder path.
# mkdir /home/svn

We added basic password authentication to protect our repository.
# htpasswd -c /home/svn/.htpasswd testuser
New password: password<Enter the password for testuser>

Now, Test the configuration and restart the apache server.
# apachectl -t
# apachectl -k graceful

If you browse to the location using IE/Mozilla at http://<hostname>/svn/testsvn, you should see a error 404 or permission denied as we did not yet create our svn repository on our file system.

Build SVN Repository

To build the SVN repository, it’s simple:
# cd /home/svn
# svnadmin create testsvn

Reload the browser, and you should see an authentication dialog, enter testuser and password set above, and you will see the svn repository is created!

Use SVN Repository

Retreive the the SVN repository is simple:
# cd <some diretory>
# svn co http://<hostname>/svn/testsvn

The SVN repository is downloaded.
For other svn command, you may refer this link