Install SVN Server on Fedora 31/30, CentOS/RHEL 8.0/7.7 - Comment Page: 4

This is guide, howto install SVN (Subversion) server on Fedora 31/30/29/28, CentOS 8.0/7.7/6.10, Red Hat (RHEL) 8.0/7.7/6.10. What is SVN (Subversion)? Subversion is a free/open-source version control system. Subversion manages files and directories, and the changes made to them, over time. This allows you to recover older versions of your data, or examine the history of how your data changed. In this regard, many people think of a version control system as a sort of "time machine". [inttf_post_ad1] Install SVN (Subversion) Server on Fedora 31/30/29/28, CentOS 8.0/7.7/6.10, Red Hat (RHEL) 8.0/7.7/6.10 1. Change root user su - ## OR ## sudo -i 2. Install needed...

316 comments on “Install SVN Server on Fedora 31/30, CentOS/RHEL 8.0/7.7 - Comment Page: 4

1 2 3 4 5 6 10
    1. Yeah, now that I tried to type in the Location tags I see it goes away.

      Reply
      • Hi Jen,

        Could you first post your subversion.conf, you can put it inside following tags:
        <pre lang=”bash”>content</pre> :)

        Reply
        • # cat /etc/httpd/conf.d/subversion.conf
          
          LoadModule dav_svn_module     modules/mod_dav_svn.so
          LoadModule authz_svn_module   modules/mod_authz_svn.so
          
          #
          # Example configuration to enable HTTP access for a directory
          # containing Subversion repositories, "/var/www/svn".  Each repository
          # must be both:
          #
          #   a) readable and writable by the 'apache' user, and
          #
          #   b) labelled with the 'httpd_sys_content_t' context if using
          #   SELinux
          #
          
          #
          # To create a new repository "http://localhost/repos/stuff" using
          # this configuration, run as root:
          #
          #   # cd /var/www/svn
          #   # svnadmin create stuff
          #   # chown -R apache.apache stuff
          #   # chcon -R -t httpd_sys_content_t stuff
          #
          
          #
          #   DAV svn
          #   SVNParentPath /var/www/svn
          #
          #   # Limit write permission to list of valid users.
          #   
          #      # Require SSL connection for password protection.
          #      # SSLRequireSSL
          #
          #      AuthType Basic
          #      AuthName "Authorization Realm"
          #      AuthUserFile /path/to/passwdfile
          #      Require valid-user
          #   
          #
          
          
             DAV svn
             SVNParentPath /var/www/svn
             AuthType Basic
             AuthName "Subversion repositories"
             AuthUserFile /etc/svn-auth-users
             Require valid-user
          
          
          Reply
        • 
          
             DAV svn
             SVNPath /var/www/svn
             AuthType Basic
             AuthName "Subversion repositories"
             AuthUserFile /etc/svn-auth-users
             Require valid-user
          
          

          I tried SVNParentPath and it throws an error on httpd restart. No error with SVNPath.

          Reply
          • JR, I have it working now. I made another change and went back to the configuration and was able to use SVNParentPath and it now works.

            Thank You

            Reply
            • Hi Jen,

              Nice to hear that you got it working! :)

              Reply
    2. # cat /etc/httpd/conf.d/subversion.conf
      
      LoadModule dav_svn_module     modules/mod_dav_svn.so
      LoadModule authz_svn_module   modules/mod_authz_svn.so
      
      ....
      
      
         DAV svn
         SVNParentPath /var/www/svn
         AuthType Basic
         AuthName "Subversion repositories"
         AuthUserFile /etc/svn-auth-users
         Require valid-user
      
      
      Reply
      • I believe that your configuration is okay :D This is some WP thing, it allows admin post any tags and filter all other poster tags. I have to take a look that later… :)

        But yes, could you try following (on remote machine):

        
        mkdir /tmp/testrepo
        
        cd /tmp/testrepo
        
        svn co http://your_ip/svn/testrepo .
        
        echo "test" > test.txt
        
        svn add test.txt
        
        svn ci -m 'Test commit'
        
        Reply
        • # svn co http://localhost/svn/testrepo .
          Authentication realm: Subversion repositories
          Password for 'root':
          Authentication realm: Subversion repositories
          Username: jp
          Password for 'jp':
          svn: Repository moved permanently to 'http://localhost/svn/testrepo/'; please relocate
          [[email protected] testrepo]#

          Reply
    3. @JD

      Looks like everything is okay, but it’s not still working…I just tested this on clean installed CentOS 6.2 and Fedora 16 and this guide is working normally for me…

      Could you still post output of following commands:

      
      ls -laZ / |grep var
      
      ls -laZ /var |grep www
      
      Reply
      • I’m also using Fedora 16.

        # ls -laZ / |grep var
        drwxr-xr-x. root root system_u:object_r:var_t:s0 srv
        drwxr-xr-x. root root system_u:object_r:var_t:s0 var
        # ls -laZ /var |grep www
        drwxr-xr-x root root ? www

        Clean install the best option? :)

        Reply
        • Thanks and actually problem might be with security context of /var/www directory, try to set httpd_sys_content_t also to /var/www dir, with following command:

          
          chcon -h system_u:object_r:httpd_sys_content_t /var/www
          

          Then try svn checkout, import, commit, etc? :)

          First maybe svn repos clean install, before whole system clean install… :D

          Reply
    4. I modified your install instructions slightly and wanted to share them with you. These have been used over and over again without problem. The only real difference is that I created OS level accounts for each user and changed some permissions. The most important part was adding apache to the svnusers group because it’s really that account that is running the svn commands and not the actual user.

      Note: I am running this in an Oracle VM. To gain access to the repo on my host machine’s browser I had to change the network adapter to Bridged. For my CentOS wired connection I had to remove the “Require IPv4 addressing for this connection to complete”. This will give you the IP address you need to use instead of trying the http://localhost

      Create OS user accounts for each user (this is normal for my environment anyway)
      repoadm is my svn repo administrator account
      Created OS group account called svnusers
      Add all accounts that will access the svn repo to svnusers group
      Add apache account to the svnusers group

      As root, install the mod_dav and subversion
      yum install mod_dav_svn subversion
      Update the subversion.conf file as you described

      As root, create and modify the svn authorized user file

      htpasswd -cm /etc/svn-auth-users repoadm (-cm is only used this one time)
      htpasswd -m /etc/svn-auth-users testuser (-m to modify the svn-auth-users file)

      Create the repo directory structure

      mkdir /var/www/svn
      chown -R repoadm.svnusers /var/www/svn

      As repoadm, create SVN repository

      cd /var/www/svn
      svnadmin create repo
      chown -R repoadm.svnusers repo

      Run secure linux commands against the repo

      chcon -R -t httpd_sys_content_t /var/www/svn/repo
      chcon -R -t httpd_sys_rw_content_t /var/www/svn/repo

      As root

      Modify the repo permissions and restart apache service

      cd /var/www/svn
      chmod -R g+w repo
      service httpd restart

      Reply
    5. Great tutorial, simple and nice ! Thanks!

      Reply
    6. i am not able to open multiple svn repository configured with ldap active directory authentication one repos is working file but another have same configuration but i am not able to browse others only one repos is going fine.

      will anyone is help me out.

      Reply
    7. i am not able to browse more than one svn repository. i have configured svn with ldap (active directory) authentication but not able to more than one repos. i have checked my httpd.conf, subversion.conf, and every repos have same configuration file one is opened fine with username & passwd of active directory user. another repos gave the error ….

      Not Found

      The requested URL /1000 was not found on this server.

      Apache/2.2.3 (CentOS) Server at 10.0.0.108 Port 80

      Reply
    8. i am not able to browse more than one svn repository. i have configured svn with ldap (active directory) authentication but not able to more than one repos. i have checked my httpd.conf, subversion.conf, and every repos have same configuration file one is opened fine with username & passwd of active directory user. another repos gave the error ….

      Not Found

      The requested URL /1000 was not found on this server.

      Apache/2.2.3 (CentOS) Server at 10.0.0.108 Port 80

      Reply
    9. Hi,

      Getting Conflict error message while trying to commit a file from different PCs and logged in as different Users. Please help to resolve the issue.

      Reply
      • Hi Kiran,

        Could you post full error message and your svn configuration?

        Reply
    10. first check the permission.. what permission the user have.. than after check the same file or folder is there already exists…

      Reply
    11. i did easyapache update to dav,installed subversion via yum but when installing mod_dav_svn i get this:

      [email protected] [~]# yum install mod_dav_svn
      Loaded plugins: rhnplugin
      Setting up Install Process
      Resolving Dependencies
      –> Running transaction check
      —> Package mod_dav_svn.x86_64 0:1.6.11-2.el6.4 will be installed
      –> Processing Dependency: httpd-mmn = 20051115 for package: mod_dav_svn-1.6.11-2.el6.4.x86_64
      –> Finished Dependency Resolution
      Error: Package: mod_dav_svn-1.6.11-2.el6.4.x86_64 (cloudlinux-x86_64-server-6)
      Requires: httpd-mmn = 20051115
      You could try using –skip-broken to work around the problem
      ** Found 5 pre-existing rpmdb problem(s), ‘yum check’ output follows:
      bandmin-1.6.1-5.noarch has missing requires of perl(bandmin.conf)
      bandmin-1.6.1-5.noarch has missing requires of perl(bmversion.pl)
      bandmin-1.6.1-5.noarch has missing requires of perl(services.conf)
      exim-4.77-1.x86_64 has missing requires of perl(SafeFile)
      frontpage-2002-SR1.2.i386 has missing requires of libexpat.so.0

      it is apache 2.2.22 cpanel with centos 6.2×64

      Reply
      • Hi Maroje,

        Could you please post output of following commands:

        
        rpm -qa httpd\*
        
        yum list httpd\*
        
        Reply
        • The same problem with Maroje Sardelich. Output commands:

          [email protected] [~]# rpm -qa httpd\*
          [email protected] [~]# yum list httpd\*
          Loaded plugins: fastestmirror, security
          Loading mirror speeds from cached hostfile
          * base: mirrors.xmission.com
          * extras: mirror.san.fastserv.com
          * updates: mirrors.sonic.net
          Error: No matching Packages to list

          Can you help me? Thanks!

          Reply
        • [email protected] [~]# rpm -qa httpd\*
          [email protected] [~]# yum list httpd\*
          Loaded plugins: rhnplugin
          cloudlinux-x86_64-server-6 | 1.0 kB 00:00
          Error: No matching Packages to list

          this is the output.first command doesnt output anything.i forgot to tell,it is cloudlinux.

          Reply
    12. @Thuan and @Maroje

      Could you both post output of following commands:

      
      lsb_release -a
      
      yum repolist
      
      Reply
    13. [email protected] [~]# yum repolist
      Loaded plugins: rhnplugin
      repo id repo name status
      cloudlinux-x86_64-server-6 CloudLinux Server 6 x86_64 8,896+619
      repolist: 8,896

      lsb_release says command not found

      Reply
    14. LSB Version: :core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
      Distributor ID: CloudLinuxServer
      Description: CloudLinux Server release 6.2
      Release: 6.2
      Codename: n/a

      Reply
          • Hi Maroje,

            Sorry for long wait…I forgot to check this, but looks like your repos doesn’t have httpd package at all… :/ Maybe you should use some external repo to get httpd installed.

            Reply
            • well since it is a cpanel server working perfectly,I’m not sure what do you mean with httpd,since yum works just fine…

              Reply
              • I’m not sure what web server CloudLinux cpanel is using, but CloudLinux repo does not have httpd package which is dependency for mod_dav_svn package.

                Reply
                • cloudlinux is just an kernel replacement,nothing else is touched,httpd is standard cpanel compiled httpd,therefore it is not updated thru yum,but only via inbuilt easyapache in cpanel.So I have to go around that dependency to get it installed?

                  Reply
                  • Okay, now I understand. You could try to install mod_dav_svn manually without yum if you then can get it running with your easyapache installation.

                    Reply
1 2 3 4 5 6 10

Leave a Reply to JR Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Close