Install SVN Server on Fedora 28/27, CentOS/RHEL 7.5/6.9 - Comment Page: 2

This is guide, howto install SVN (Subversion) server on Fedora 28/27/26, CentOS 7.5/6.9, Red Hat (RHEL) 7.5/6.9. 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 28/27/26, CentOS 7.5/6.9, Red Hat (RHEL) 7.5/6.9 1. Change root user su - ## OR ## sudo -i 2. Install needed packages (mod_dav_svn and...

314 comments on “Install SVN Server on Fedora 28/27, CentOS/RHEL 7.5/6.9 - Comment Page: 2

1 2 3 4 10
    1. I’m having the same problem as raqeul. You didn’t replied to his question.

      Please Reply whats the issue. I’m having the exact problem. when i use http:// to import it does not work.

      I have follow your instructions but when i try to execute the svn import:

      svn import -m ‘Initial import’ /tmp/svn-structure-template/ http://localhost/svn/testrepo/
      Reino de autentificación: Subversion repositories
      password ‘root’:
      Reino de autentificación: Subversion repositories
      User: testuser
      password ‘testuser’:
      Reino de autentificación: Subversion repositories
      User: testuser
      password ‘testuser’:
      svn: OPTIONS de ‘http://localhost/svn/testrepo’: authorization failed: Could not authenticate to server: rejected Basic challenge (http://localhost)

      Reply
      • Hi Talha,

        Did you create testuser with testuser password?

        Did you enabled commits over http on step 5:

        
        ## Following enables commits over http ##
        chcon -R -t httpd_sys_rw_content_t /var/www/svn/testrepo
        
        Reply
    2. hi, I copy your step on my fedora 15 server, but it doesn’t work. I input http://localhost/svn/testrepo/ in my browser, there isn’t any hint.

      thanks for introduce, I expect your more advice.

      Reply
      • hi, JR, please! thank you!

        Reply
        • Hi Marvin,

          Do you get any SELinux alerts, when you try to access your svn repo?

          Reply
          • Hi, JR.
            when I accessed my svn repo, I didn’t get any SELinux alerts.

            It seems as the basic auth don’t work either..

            thank you!

            Reply
          • JR, by the way, when I get the status of my selinux, which is disabled.

            Reply
    3. hi, JR, are you online? thank you!

      Reply
    4. Hi Marvin,

      Could tell more specific, do you get some error (on browser) when you try to access http://localhost/svn/testrepo/ address?

      I tested this guide on clean Fedora 15 install and it’s working just as it should be. So I suggest you try again!

      Then if you can’t get it working you could post your /var/log/httpd/error_log to pastebin…

      Reply
      • JR, Thank you very much. I reinstalled my fedora 15 system, and reinstalled subversion accorded to your doc. It’s working.

        thank you again!

        Reply
        • Excellent Marvin! :) You are welcome!

          Reply
    5. Help>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
      chcon: can’t apply partial context to unlabeled file
      >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
      when I input

      chcon -R -t httpd_sys_content_t /var/www/svn/testrepo

      >>>>>>>>>>>>>>>>>>
      Any advice ? Thanks
      >>>>>>>>>>>>>>>>>>>>

      Reply
      • Hi wx,

        Could you post full error message and output of following commands:

        
        ls -laZ /var/www/
        
        ls -laZ /var/www/svn
        
        ls -laZ /var/www/svn/testrepo
        
        Reply
    6. Hi JR,

      everything is fine and working good for me as you instructed. But i want to restrict the few users to access some of the directories in the project.

      Can you help me how can i do that.

      Regards,
      Abdul.

      Reply
    7. Hi JR,

      I followed the above steps what you have written on this page and with your help I am able to see my repository working fine.

      Now I want to use my stsyem ip address instead of localhost and want to access from other computers. what will be the command.

      I really appreciate your help.
      Thank you.

      Reply
      • Hi Ravindra,

        Nice to hear that you got SVN working! :)

        To enable remote connections to Apache HTTP Server (this case to SVN) –> Open web server port (80) on iptables firewall:

        1. Edit /etc/sysconfig/iptables file and add following line before COMMIT:

        
        -A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
        

        2. Restart Iptables Firewall:

        
        service iptables restart
        ## OR ##
        /etc/init.d/iptables restart
        
        Reply
    8. Hi JR,
      I am getting the below mentioned error when I restart Apache web server.

      service httpd restart
      Stopping httpd: [ OK ]
      Starting httpd: [Thu Jan 19 10:41:33 2012] [warn] module dav_svn_module is already loaded, skipping
      [Thu Jan 19 10:41:33 2012] [warn] module authz_svn_module is already loaded, skipping
      httpd: apr_sockaddr_info_get() failed for geovas
      httpd: Could not reliably determine the server’s fully qualified domain name, using 127.0.0.1 for ServerName
      [ OK ]

      Reply
    9. testrepo – Revision 1: /

      * branches/
      * tags/
      * trunk/

      Powered by Subversion version 1.6.11 (r934486).

      how to add directories and folders instead of branches, tags and trunk for different-2 users. so that the users can save their files into their particular folder.

      Please help me out. I’m running short of time.

      Thanks

      Reply
    10. Hi JR,
      I have commented two lines in the subversion.conf file i.e. as shown below
      #LoadModule dav_svn_module modules/mod_dav_svn.so
      #LoadModule authz_svn_module modules/mod_authz_svn.so

      And after that when I restart Apache web server, I’m getting the following:

      Stopping httpd: [ OK ]
      Starting httpd: httpd: apr_sockaddr_info_get() failed for geovas
      httpd: Could not reliably determine the server’s fully qualified domain name, using 127.0.0.1 for ServerName
      [ OK ]

      Please help me out JR.

      Reply
    11. Hi Ravindra,

      Load module errors:

      
      Starting httpd: [Thu Jan 19 10:41:33 2012] [warn] module dav_svn_module is already loaded, skipping
      [Thu Jan 19 10:41:33 2012] [warn] module authz_svn_module is already loaded, skipping
      

      Just because you have loaded modules multiple times.

      httpd: apr_sockaddr_info_get() failed for error:

      
      Starting httpd: httpd: apr_sockaddr_info_get() failed for geovas
      httpd: Could not reliably determine the server’s fully qualified domain name, using 127.0.0.1 for ServerName
      

      Apache fails to match hostname via current hostname. Easiest way to solve this is setup your hostname to /etc/hosts file.

      Then your SVN problem, so you have 2 different user, but are those users doing different projects? This branches/ tags/ trunk/ is SVN default setup and almost always all svn repos have such a structure…

      Reply
    12. Hi JR,

      I’m getting the following error while restarting httpd.

      Starting httpd: httpd: Syntax error on line 221 of /etc/httpd/conf/httpd.conf: Could not open configuration file /etc/httpd/conf.d/.conf: No such file or directory

      Reply
      • Hi Ravindra,

        So question is, what you have in /etc/httpd/conf/httpd.conf file line 221?
        And what you have /etc/httpd/conf.d/ directory?

        Apache try to open /etc/httpd/conf.d/.conf conf file. File with full name .conf.

        Reply
    13. Hi JR,

      I follow your step but when I log in I got the following error:

      Could not open the requested SVN filesystem

      Could you please help me with this. I have been googling but no help.
      Some background info:
      The server is a virtual server and I access it from a remote machine. The OS is CentOS 6 and I use SVN version 1.6.11.

      Reply
      • Hi Naka,

        Are you using exactly this setup on your system?

        Reply
        • Hi JR,

          Yes I followed the set up listed above. However, in step 5, because i have the same problem with Parikshit Tiwari above, so I use the chcon commands in the comment box which you provided for her in your comment above, not the original one in your post.

          Hope to hear from you soon.
          Thank you,
          Naka

          Reply
          • Hi again Naka,

            Could you post output of following commands:

            
            cat /etc/httpd/conf.d/subversion.conf
            
            ls -laZ /var/www/
            
            ls -laZ /var/www/svn
            
            ls -laZ /var/www/svn/testrepo
            
            Reply
            • Hi JR,
              This is the output of the commands:

              -Out put for “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 /home/naka/svn
              AuthType Basic
              AuthName “Subversion repos”
              AuthUserFile /etc/svn-auth-users
              #AuthUserFile /etc/httpd/conf/htpasswd.users
              Require valid-user

              -Output for “ls -laZ /var/www/”

              drwxr-xr-x root root ? .
              drwxr-xr-x root root ? ..
              drwxr-xr-x root root ? cgi-bin
              drwxr-xr-x root root ? error
              drwxr-xr-x root root ? html
              drwxr-xr-x root root ? icons

              For the second command, I m not sure whether you want to use the directory /var/www or you want to use the parent directory of svn. So, in case you want /www/var, it’s the one above, in case you want the parent directory of svn, it’s the one below.

              ls -laZ /home/naka

              drwx—— naka naka ? .
              drwxr-xr-x root root ? ..
              -rw-r–r– naka naka ? .bash_logout
              -rw-r–r– naka naka ? .bash_profile
              -rw-r–r– naka naka ? .bashrc
              -rw-r–r– naka naka ? .emacs
              drwxr-xr-x root root ? svn
              drwxr-xr-x root root ? svntest

              -Output for ls -laZ /var/www/svn ( I put my repository at a different place other than /var/www/svn, so I substitute my own path for it. The command is changed to: “ls -laZ /home/naka/svn”)

              drwxr-xr-x root root ? .
              drwx—— naka naka ? ..
              drwxr-xr-x. apache apache suste_u:object_r:httpd_sys_content_t svndb
              drwxr-xr-x. apache apache system_u:object_r:httpd_sys_content_t testrepo

              -Output for ls -laZ /var/www/svn/testrepo (again using my own path: ls -laZ /home/naka/svn/testrepo)
              drwxr-xr-x. apache apache system_u:object_r:httpd_sys_content_t .
              drwxr-xr-x root root ? ..
              drwxr-xr-x. apache apache apache:object_r:httpd_sys_content_t conf
              drwxr-sr-x. apache apache apache:object_r:httpd_sys_content_t db
              -r–r–r–. apache apache apache:object_r:httpd_sys_content_t format
              drwxr-xr-x. apache apache apache:object_r:httpd_sys_content_t hooks
              drwxr-xr-x. apache apache apache:object_r:httpd_sys_content_t locks
              -rw-r–r–. apache apache apache:object_r:httpd_sys_content_t README.txt

              Reply
              • Hi JR,

                I just realized that I did not set the correct access right for the parent directory of svn (I did not let anybody read except for the owner). I set it to 755 and now it works.

                I cant believe this stuff takes me 3 days to solve.

                Thank you very much for your time. I really appreciate it.

                Reply
                • Hi Naka,

                  I was just answering your question… :) And it’s very good to hear that you got it working.

                  Normally this style problems are always permission problems. :) And yes home directory is tricky place to keep web server content…normally it’s better do example /svn or /data/svn dir, instead of using any user home dir :)

                  Actually Apache user dir guide would have solved your home dir problem also. :)

                  Reply
    14. hi

      i followed the whole tut, but when trying to import , i get the following error message :

      svn: Can’t open file ‘/var/www/svn/csp/db/txn-current-lock’: Permission denied

      can you tell me what i am doing wrong ?

      Thanks

      Reply
    15. Hi
      i followed the whole tutorial step by step, but when i try to import, i get the following error message :

      svn: Can’t open file ‘/var/www/svn/csp/db/txn-current-lock’: Permission denied

      any idea ?

      thanks

      Reply
1 2 3 4 10

Leave a 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