There is a quite dated thread to do this kind of setup but it is using FC5, http://forums.fedoraforum.org/showthread.php?t=114494. I figure it is time to post a new one using latest F13. My setup is based on the http://svnbook.red-bean.com/en/1.0/ch06s04.html and the steps are adapted for Fedora.
The first 3 steps are the usual steps for setting up Subversion.
1. Install Subversion package, if it is not yet installed.
Code:
# yum install subversion
2. Create the Subversion repository. I prefer to create it under the /home folder not only because it can be backup together with my data in the /home folder but also because my /home mount point is mounted from a separate partition which I could preserve when upgrading/installing Fedora.
Code:
# svnadmin create /home/svn-repo
3. Do the initial import into the empty SVN repository by following this http://svnbook.red-bean.com/en/1.0/ch01s07.html.
The next few steps configure Apache httpd based on http://svnbook.red-bean.com/en/1.0/ch06s04.html.
4. Install the httpd and mod_dav_svn, if they are not yet installed.
Code:
# yum install httpd mod_dav_svn
The "mod_dav_svn" package provided by Fedora already includes a configuration file "/etc/httpd/conf.d/subversion.conf". This configuration file instruct the Apache httpd to load the necessary modules for accessing SVN repo via WebDAV.
5. Thus, all we need to do is to define the location of the subversion repository in "/etc/httpd/conf.d/subversion.conf" configuration file. Edit the configuration file to add these lines at the end of the file.
Code:
<Location /svn>
DAV svn
SVNPath /home/svn-repo
</Location>
6. And follow the instructions available in the comments found in "/etc/httpd/conf.d/subversion.conf" to allow 'apache' user to access the SVN repo and relabel SELinux context if your system uses enforcing SELinux.
Code:
# chown -R apache.apache /home/svn-repo
# chcon -R -t httpd_sys_content_rw_t /home/svn-repo
Note that there is a typo in the comments where it states that the context to use is "http_sys_content_rw_t" and later "http_sys_content_t". I have to change to the above for it to work.
7. That's it. Restart the "httpd" service as root.
Code:
# service httpd restart
And try to access the SVN repo via a web browser as normal user.
Code:
$ firefox http://localhost/svn
8. Finally, if you need some form of authentication then just follow the rest of the setup steps in http://svnbook.red-bean.com/en/1.0/c...-ch-6-sect-4.3 regarding authentication. For personal use like my case, I just setup the basic HTTP authentication.
I hope I do not miss out any steps.