Howto setup Apache httpd to access Subversion repository - the Fedora way
FedoraForum.org - Fedora Support Forums and Community
Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2006
    Location
    新加坡
    Posts
    997

    Howto setup Apache httpd to access Subversion repository - the Fedora way

    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.
    YaoWT - Leave no window unbroken ♪ (^。^) 

  2. #2
    Join Date
    Jul 2005
    Location
    uk
    Posts
    175

    Re: Howto setup Apache httpd to access Subversion repository - the Fedora way

    Thanks for putting that together. Though I think there may be an error in the entry you have created in your subversion.conf, when I try to start httpd it errors with:

    [root@bigfoot init.d]# httpd -k start
    Syntax error on line 41 of /etc/httpd/conf.d/subversion.conf:
    <Location> directive requires additional arguments

    ---------- Post added at 11:13 AM CDT ---------- Previous post was at 11:11 AM CDT ----------

    N'mind....I was being blonde again
    Missed the path from the Location element.
    Not a Linux Guru - please be nice :)
    Home | Linux adventures

Similar Threads

  1. Subversion: svnadmin error creating repository
    By chinton in forum Servers & Networking
    Replies: 1
    Last Post: 9th March 2010, 08:38 PM
  2. Subversion Access/Apache/Fedora 9
    By harveybetty in forum Using Fedora
    Replies: 7
    Last Post: 13th June 2008, 04:49 PM
  3. Setup repository on fedora 9
    By afzal in forum Using Fedora
    Replies: 0
    Last Post: 21st May 2008, 02:24 PM
  4. Fedora 7 Subversion with Apache
    By fljmayer in forum Installation, Upgrades and Live Media
    Replies: 3
    Last Post: 25th July 2007, 04:05 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •