Main Contents

OpenSUSE 11.1 – Subversion server + Apache2

OpenSUSE

If you would like know how to install subversion and create new subversion repository in OpenSUSE 11.1 this post is for you.

Content:

  1. Installation of subversion server
  2. Creation of new subversion repository and finishing configuration


Installation of subversion server

Top
  1. We have to install subversion and apache2 packages as the first step.
    Run console and run command:
    sudo /sbin/yast -i subversion-server subversion apache2 apache2-doc apache2-prefork libapr1 libapr-util1 neon
  2. We enable webdav and webdav-svn modules in apache configuration. It allow browse SVN repository by browser. Please run these commands:
    sudo a2enmod dav
    sudo a2enmod dav_svn
  3. We have to create group and user svn for manipulation with subversion repository. Run these commands:
    sudo groupadd -r svn
    sudo useradd -r -g svn -d /srv/svn -s /bin/false svn
  4. Now is time for creation of folder where files send to subversion-server will be stored. You can modify path as you want my chose is “/home/SVN”
    sudo mkdir -p /home/SVN
  5. We have to edit file “/etc/apache2/conf.d/subversion.conf”. I use will use nano for edit of this file. (if you don’t have nano installed you can do it by command sudo /sbin/yast -i nano)
    sudo nano /etc/apache2/conf.d/subversion.conf
  6. Modify the configuration file. I deleted complete content and put in configuration below. You have to modify only attributes “” and “SVNParentPath /home/SVN”. There is my configuration file:


    # Repository with URL http://your_url/svn
    # Free read access restricted commit access

    DAV svn
    SVNParentPath /home/SVN
    SVNListParentPath On
    # Limit write permission to list of valid users.

    # Require SSL connection for password protection.
    # SSLRequireSSL
    AuthType Basic
    # Message to give to the committer
    AuthName "Write access requires a password"
    # File listing users with write (commit) access
    AuthUserFile /srv/svn/user_access/svn_passwdfile
    Require valid-user



  7. We create now file for store passwords. Run these commands:
    sudo mkdir /srv/svn
    sudo mkdir /srv/svn/user_access
    sudo touch /srv/svn/user_access/svn_passwdfile
    sudo chown root:www /srv/svn/user_access/svn_passwdfile
    sudo chmod 640 /srv/svn/user_access/svn_passwdfile
  8. We can add user to svn acces by command (modify word “user_name” by real user name)
    sudo htpasswd2 /srv/svn/user_access/svn_passwdfile user_name
  9. Restart apache server.
    sudo rcapache2 restart

  10. Creation of new subversion repository and finishing configuration

    Top
    1. Create repository by command (please modify path “/home/SVN/myNewProject” to your path to subversion folder)
      sudo svnadmin create /home/SVN/myNewProject
    2. Modify permissions for folder what you created in previous step.

      sudo chown -R wwwrun:www /home/SVN/myNewProject{db,locks}
      sudo chown wwwrun:www /home/SVN/myNewProject

    Related posts:

    1. OpenSUSE 11.1 – VMware Server 2
    2. JBoss 5.1 AS JDK6 – JBoss ESB installation
    3. My TOP plugins for Eclipse JEE
    4. Installation of JBoss AS 5.1 on Fedora Core 13
    5. OpenSUSE 11 32bit – VMware Player
    6. JBoss 5.1 AS JDK6 – JBoss RiftSaw – BPEL installation

    Vladislav Korecký @ 9 April 2009

5 Comments

  1. tali 29 March 2010 @ 3:14 PM

    dobry den, postupoval som podla vaseho navodu,
    ale pri kroku :sudo rcapache2 restart mi vyskoci chybova hlaska :
    linux-67fp:/etc/apache2/conf.d # sudo rcapache2 start
    Starting httpd2 (prefork) Syntax error on line 2 of /etc/apache2/conf.d/subversion.conf:
    DAV not allowed here

    The command line was:
    /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
    failed

    neviete mi poradit ako to fixnut?

  2. Dan Kutac 29 July 2010 @ 1:52 PM

    Narazil jsem na stejny problem. Resenim se ukazalo byt uzavrit instrukce v subversion.comnf do

    DAV svn
    …… etc….

  3. Dan Kutac 29 July 2010 @ 1:54 PM

    ehm <Location /svn>
    ….
    </Location>

  4. maarlin 14 August 2010 @ 3:57 PM

    Jen bych trochu poopravil poslední dva příkazy:
    sudo chown -R wwwrun:www /home/SVN/myNewProject/{db,locks}
    sudo chown wwwrun:www /home/SVN/myNewProject

  5. Vladislav Korecký 23 August 2010 @ 8:48 PM

    Děkuji za upozornění, opraveno.

Leave a comment

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>