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

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: 5

1 3 4 5 6 7 10
    1. Hi,

      The Trunk folder is missing while taking the svn folder locally from the system(linux) itself and with shares(samba). But this folder and the files inside it are showing while connecting with TortoiseSVN and Web-Browser. Please give an solutions for fixing this issue.

      Reply
      • Hi Kiran,

        So if you just list local files from repo directory, could you then see trunk directory? Could you checkout your trunk normally?

        Reply
    2. Hi JR,

      We are using SVN for centralize the files of our projects. So that once the project is completed we can upload the files directly from our SVN server to the Live web server which is located in remote location, using FTP client. But since the files are stored in Trunk folder and we are not able to see this folder locally on the server(But we are able to see this folder using browser or using Tortoise SVN). It is difficult for us to upload the files to the webserver using FTP clients. Please suggest a solution for this issue.

      Reply
    3. Hi JR,

      We are able to commit, update and check out the files. But we are getting conflict error message if more than one person editing same line in same file and committing it. Instead of merging the new lines the conflict error message is getting. Please provide a solution for this issue too.

      Reply
      • Hi again Kiran,

        This is normal way howto SVN works. Also I think that the this could be a very dangerous if SVN merges automatically without any information about conflict.

        Reply
    4. Hi JR,

      Can you please give an update on my second question?

      Reply
    5. Hi Team, i got this error mesage when i create a new repo, i mentioned the logs below. it is already working by your help,
      bash-4.1# chcon -R -t httpd_sys_content_t /var/www/svn/SKAI_Cricket/
      chcon: can’t apply partial context to unlabeled file `db.lock’
      chcon: can’t apply partial context to unlabeled file `db-logs.lock’
      chcon: can’t apply partial context to unlabeled file `locks’
      chcon: can’t apply partial context to unlabeled file `uuid’
      chcon: can’t apply partial context to unlabeled file `txn-current’
      chcon: can’t apply partial context to unlabeled file `fsfs.conf’
      chcon: can’t apply partial context to unlabeled file `0′
      chcon: can’t apply partial context to unlabeled file `0′
      chcon: can’t apply partial context to unlabeled file `revs’
      chcon: can’t apply partial context to unlabeled file `txn-protorevs’
      chcon: can’t apply partial context to unlabeled file `min-unpacked-rev’
      chcon: can’t apply partial context to unlabeled file `txn-current-lock’
      chcon: can’t apply partial context to unlabeled file `fs-type’
      chcon: can’t apply partial context to unlabeled file `format’
      chcon: can’t apply partial context to unlabeled file `transactions’
      chcon: can’t apply partial context to unlabeled file `0′
      chcon: can’t apply partial context to unlabeled file `0′
      chcon: can’t apply partial context to unlabeled file `revprops’
      chcon: can’t apply partial context to unlabeled file `rep-cache.db’
      chcon: can’t apply partial context to unlabeled file `current’
      chcon: can’t apply partial context to unlabeled file `write-lock’
      chcon: can’t apply partial context to unlabeled file `db’
      chcon: can’t apply partial context to unlabeled file `format’
      chcon: can’t apply partial context to unlabeled file `pre-revprop-change.tmpl’
      chcon: can’t apply partial context to unlabeled file `start-commit.tmpl’
      chcon: can’t apply partial context to unlabeled file `post-commit.tmpl’
      chcon: can’t apply partial context to unlabeled file `pre-commit.tmpl’
      chcon: can’t apply partial context to unlabeled file `pre-lock.tmpl’
      chcon: can’t apply partial context to unlabeled file `post-lock.tmpl’
      chcon: can’t apply partial context to unlabeled file `post-revprop-change.tmpl’
      chcon: can’t apply partial context to unlabeled file `post-unlock.tmpl’
      chcon: can’t apply partial context to unlabeled file `pre-unlock.tmpl’
      chcon: can’t apply partial context to unlabeled file `hooks’
      chcon: can’t apply partial context to unlabeled file `README.txt’
      chcon: can’t apply partial context to unlabeled file `passwd’
      chcon: can’t apply partial context to unlabeled file `svnserve.conf’
      chcon: can’t apply partial context to unlabeled file `authz’
      chcon: can’t apply partial context to unlabeled file `conf’
      chcon: can’t apply partial context to unlabeled file `/var/www/svn/SKAI_Cricket/

      so please help me to resolve this issue. thanks you very much in advance.

      Reply
      • Hi vk1dadhich,

        Did you run this command as root?

        Reply
        • yes i do all work from root. but from few days my shell is look like this i don’t know why

          bash-4.1#

          may be problem due to this. thanks for your quick response.

          Reply
          • Could you post output of following command:

            
            whoami
            
            Reply
    6. please find the result.

      -bash-4.1# whoami
      root
      -bash-4.1#

      Reply
      • Thanks, then try following commands:

        
        chcon -h system_u:object_r:httpd_sys_content_t /var/www/svn/[your repo]
        chcon -R -h apache:object_r:httpd_sys_content_t /var/www/svn/[your repo]/*
        

        Some reason you don’t have user or/and role already assigned.

        Reply
    7. There are some issues installing mod_dav_ on some CentOS so here is the fix.

      @Maroje Sardelich


      $ find / -name "yum.conf"

      $ nano /etc/yum.conf

      Remove httpd* from this line:

      exclude=apache* bind-chroot courier* dovecot* exim* filesystem httpd* mod_ssl* mydns* mysql* nsd* perl* php* proftpd* pure-ftpd* ruby* spamassassin* squirrelmail*

      Save and close yum.conf, install mod_dav_svn

      yum install mod_dav_svn

      Ref: http://stackoverflow.com/questions/610115/centos-install-mod-dav-svn

      Reply
    8. Sorry the package was: mod_dav_svn, I mispell.

      Reply
      • i want to correct ‘http://localhost/svn/testrepo’ to ‘http://address_ip_of_server/svn/testrepo’ ==> 404

        Reply
        • Hi Abdessalam,

          Did you opened port 80 from firewall?

          If you use iptables, then could you post output of following command (on server machine):

          
          iptables -L
          
          Reply
    9. Hello JR,

      Thanks for your fast reply.

      Results of iptables -L :

      Chain INPUT (policy ACCEPT)
      target prot opt source destination
      acctboth all — anywhere anywhere
      ACCEPT tcp — anywhere anywhere state NEW tcp dpt:imaps
      ACCEPT tcp — anywhere anywhere state NEW tcp dpt:tpcsrvr
      ACCEPT tcp — anywhere anywhere state NEW tcp dpt:domain
      ACCEPT tcp — anywhere anywhere state NEW tcp dpt:ftp
      ACCEPT tcp — anywhere anywhere state NEW tcp dpt:infowave
      ACCEPT tcp — anywhere anywhere state NEW tcp dpt:https
      ACCEPT tcp — anywhere anywhere state NEW tcp dpt:tsrmagt
      ACCEPT tcp — anywhere anywhere state NEW tcp dpt:http
      ACCEPT tcp — anywhere anywhere state NEW tcp dpt:26
      ACCEPT tcp — anywhere anywhere state NEW tcp dpt:webcache
      ACCEPT tcp — anywhere anywhere state NEW tcp dpt:imap
      ACCEPT tcp — anywhere anywhere state NEW tcp dpt:ssh
      ACCEPT tcp — anywhere anywhere state NEW tcp dpt:pop3s
      ACCEPT tcp — anywhere anywhere state NEW tcp dpt:pop3
      ACCEPT tcp — anywhere anywhere state NEW tcp dpt:smtp
      ACCEPT tcp — anywhere anywhere state NEW tcp dpt:gnunet
      ACCEPT tcp — anywhere anywhere state NEW tcp dpt:eli
      ACCEPT tcp — anywhere anywhere state NEW tcp dpt:nbx-ser
      ACCEPT tcp — anywhere anywhere state NEW tcp dpt:urd
      ACCEPT tcp — anywhere anywhere state NEW tcp dpt:nbx-dir
      ACCEPT tcp — anywhere anywhere state NEW tcp dpt:mysql
      ACCEPT tcp — anywhere anywhere state NEW tcp dpt:radsec
      ACCEPT udp — anywhere anywhere state NEW udp dpt:domain

      Chain FORWARD (policy ACCEPT)
      target prot opt source destination

      Chain OUTPUT (policy ACCEPT)
      target prot opt source destination
      acctboth all — anywhere anywhere

      Chain acctboth (2 references)
      target prot opt source destination
      tcp — server.****.com anywhere tcp dpt:http
      tcp — anywhere server.****.com tcp spt:http
      tcp — server.****.com anywhere tcp dpt:smtp
      tcp — anywhere server.****.com tcp spt:smtp
      tcp — server.****.com anywhere tcp dpt:pop3
      tcp — anywhere server.****.com tcp spt:pop3
      icmp — server.****.com anywhere
      icmp — anywhere server.****.com
      tcp — server.****.com anywhere
      tcp — anywhere server.****.com
      udp — server.****.com anywhere
      udp — anywhere server.****.com
      all — server.****.com anywhere
      all — anywhere server.****.com
      all — anywhere anywhere

      Hello.

      Reply
        • I get 404 error, so i have an issue in my svn installation. But svn commands seems working good for example:
          when i create a repo: svnadmin create /var/www/repostest

          So What is the solution ?

          how to remove subversion installation totally from my server to reinstall it ?

          Thanks in advance.

          Reply
          • I correct this : when i create a repo: svnadmin create /var/www/svn/repostest

            Reply
            • Excellent! So SVN is working normally now?

              Reply
              • But the problem not yet resolved, i get always this 404 error, no change !

                Reply
                • Okay, then let’s try re-installation, I assume that the you don’t have any real repositories yet. If you have then of course backup your repos first.

                  First do following:

                  
                  yum remove mod_dav_svn subversion
                  
                  rm -rf /var/www/svn
                  
                  rm -f /etc/httpd/conf.d/subversion.conf
                  
                  rm -f /etc/svn-auth-users
                  

                  Then start installation again from step 2.

                  Reply
    10. Hello JR,

      Thank you for reply.

      I have removed step by step subversion as you have asked, and reinstalled.

      But i get Always the same ‘404 error’ :(

      Hello

      Reply
    11. Hello,

      What command # i have to execute ?

      Thank you JR, and i m very sorry for disturbance.

      Hello

      Reply
      • Hi again Abdessalam,

        Actually could you first post output of following commands:

        
        cat /etc/httpd/conf.d/subversion.conf 
        
        ls -la /var/www/
        
        Reply
        • Hi JR,

          Now it work successfully, it 200 OK not (404 error).
          The problem was:
          When i add :
          LoadModule dav_svn_module modules/mod_dav_svn.so
          LoadModule authz_svn_module modules/mod_authz_svn.so
          I get ‘modules/mod_dav_svn.so’ not found in apache/modules
          so i have moved those two files to apache/modules and it worked.

          But now i see an other kids of problem when i try to import :
          svn import -m ‘Initial import’ /tmp/svn-structure-template/ http://localhost/svn/testrepo/

          i get: svn: Can’t open file ‘/var/www/svn/testrepo/db/txn-current-lock’: Permission denied.
          note that i have apply step 5 well.

          note too that all of command i execute by root user.

          Thank you
          Hello

          Reply
          • Hi Abdessalam,

            Okay, very good to hear that you got svn server working, could you next post output of following commands:

            
            ls -laZ /var/www |grep svn
            
            ls -laZ /var/www/svn
            
            ls -laZ /var/www/svn/db |grep lock
            
            Reply
            • Hello JR,

              ls -laZ /var/www |grep svn done :
              drwxr-xr-x. apache apache unconfined_u:object_r:var_t:s0 svn/

              ls -laZ /var/www/svn done :
              drwxr-xr-x. apache apache unconfined_u:object_r:var_t:s0 ./
              drwxr-xr-x. root root unconfined_u:object_r:var_t:s0 ../
              drwxr-xr-x. apache apache unconfined_u:object_r:httpd_sys_rw_content_t:s0 testrepo/

              ls -laZ /var/www/svn/testrepo/db |grep lock done :
              -rw-r–r–. apache apache unconfined_u:object_r:httpd_sys_rw_content_t:s0 txn-current-lock
              -rw-r–r–. apache apache unconfined_u:object_r:httpd_sys_rw_content_t:s0 write-lock

              Thank you

              Reply
              • Thanks, then try following:

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

                Restart httpd and try import again, is it working then?

                Reply
                • Not, it s done the same famous error:
                  svn: Can’t open file ‘/var/www/svn/testrepo/db/txn-current-lock’: Permission denied

                  Reply
                  • Sorry, yet one additional command:

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

                    If it’s not still not working then please post output of following command to http://pastebin.com (and post link here):

                    
                    tail -n 500 /var/log/audit/audit.log
                    
                    Reply
                  • try change ownership of the folder to be the same as the id of the running process of apache.

                    $ ps aux

                    apache 2946 0.0 0.1 522528 12384 ? S 17:48 0:00 /usr/sbin/httpd -k start

                    $sudo chown -R apache.apache /var/www/svn/testrepo/

                    Reply
    12. Abdessalam/JR,

      I ran into the same problem when I was installing SVN on an ORACLE VM session and I believe it had something to do with the way the permission were setup to work with Apache. When you are running a command against svn, you aren’t really performing the action completely as the current user, but as the apache account/service. Therefore you have to make sure that the apache account is part of the group that has permissions to the repo. For instance, if you created the repo with root.svnusers (user.group) and apache doesn’t have svnusers as a group, then it will not have permissions to update the repo with an import. JR posted a link to my page that approaches the setup a little differently, but inherently the same. You can find the link at the top of this page’s comments section. Essentially, setup a group called “svnusers” (or whatever name you wish to create the group as), add the repoadm (I believe in your case you made the repo with root), all other user accounts, and apache to this new group. This is only necessary when trying to use apache to access the file system via http. Before making any changes, try to do an import directly on the SVN server using the file:/// syntax instead of the https://. You should be able to get through because you’re no longer using http.

      Reply
      • Hi Will and thanks,

        I agree that it is some problem with permissions, because SELinux permissions should be okay now on Abdessalam system and commits are not still working…

        And you are right, it’s good to test import / commit directly using file:/// syntax (instead http://) to see if it’s working then.

        Reply
    13. @JR I tried to follow you commands to grant permission to the repos but I got this Error and googling don’t give me too much help:


      [email protected] [/home/behstant]# chcon -R -t httpd_sys_content_t /home/be hstant/svn/
      chcon: can't apply partial context to unlabeled file `0'
      chcon: can't apply partial context to unlabeled file `0'
      chcon: can't apply partial context to unlabeled file `revprops'
      chcon: can't apply partial context to unlabeled file `uuid'
      chcon: can't apply partial context to unlabeled file `txn-current'
      chcon: can't apply partial context to unlabeled file `txn-current-lock'
      chcon: can't apply partial context to unlabeled file `fs-type'
      chcon: can't apply partial context to unlabeled file `format'
      chcon: can't apply partial context to unlabeled file `current'
      chcon: can't apply partial context to unlabeled file `rep-cache.db'
      chcon: can't apply partial context to unlabeled file `fsfs.conf'
      chcon: can't apply partial context to unlabeled file `min-unpacked-rev'
      chcon: can't apply partial context to unlabeled file `0'
      chcon: can't apply partial context to unlabeled file `0'
      chcon: can't apply partial context to unlabeled file `revs'
      chcon: can't apply partial context to unlabeled file `txn-protorevs'
      chcon: can't apply partial context to unlabeled file `transactions'
      chcon: can't apply partial context to unlabeled file `write-lock'
      chcon: can't apply partial context to unlabeled file `db'
      chcon: can't apply partial context to unlabeled file `authz'
      chcon: can't apply partial context to unlabeled file `svnserve.conf'
      chcon: can't apply partial context to unlabeled file `passwd'
      chcon: can't apply partial context to unlabeled file `conf'
      chcon: can't apply partial context to unlabeled file `format'
      chcon: can't apply partial context to unlabeled file `start-commit.tmpl'
      chcon: can't apply partial context to unlabeled file `post-revprop-change.tmpl'
      chcon: can't apply partial context to unlabeled file `post-unlock.tmpl'
      chcon: can't apply partial context to unlabeled file `post-commit.tmpl'
      chcon: can't apply partial context to unlabeled file `post-lock.tmpl'
      chcon: can't apply partial context to unlabeled file `pre-lock.tmpl'
      chcon: can't apply partial context to unlabeled file `pre-revprop-change.tmpl'
      chcon: can't apply partial context to unlabeled file `pre-commit.tmpl'
      chcon: can't apply partial context to unlabeled file `pre-unlock.tmpl'
      chcon: can't apply partial context to unlabeled file `hooks'
      chcon: can't apply partial context to unlabeled file `README.txt'
      chcon: can't apply partial context to unlabeled file `db.lock'
      chcon: can't apply partial context to unlabeled file `db-logs.lock'
      chcon: can't apply partial context to unlabeled file `locks'
      chcon: can't apply partial context to unlabeled file `/home/behstant/svn/'

      [email protected] [/home/behstant]# chcon -R -t httpd_sys_content_t /home/be hstant/svn/hterrazas/

      chcon: can't apply partial context to unlabeled file `0'
      chcon: can't apply partial context to unlabeled file `0'
      chcon: can't apply partial context to unlabeled file `revprops'
      chcon: can't apply partial context to unlabeled file `uuid'
      chcon: can't apply partial context to unlabeled file `txn-current'
      chcon: can't apply partial context to unlabeled file `txn-current-lock'
      chcon: can't apply partial context to unlabeled file `fs-type'
      chcon: can't apply partial context to unlabeled file `format'
      chcon: can't apply partial context to unlabeled file `current'
      chcon: can't apply partial context to unlabeled file `rep-cache.db'
      chcon: can't apply partial context to unlabeled file `fsfs.conf'
      chcon: can't apply partial context to unlabeled file `min-unpacked-rev'
      chcon: can't apply partial context to unlabeled file `0'
      chcon: can't apply partial context to unlabeled file `0'
      chcon: can't apply partial context to unlabeled file `revs'
      chcon: can't apply partial context to unlabeled file `txn-protorevs'
      chcon: can't apply partial context to unlabeled file `transactions'
      chcon: can't apply partial context to unlabeled file `write-lock'
      chcon: can't apply partial context to unlabeled file `db'
      chcon: can't apply partial context to unlabeled file `authz'
      chcon: can't apply partial context to unlabeled file `svnserve.conf'
      chcon: can't apply partial context to unlabeled file `passwd'
      chcon: can't apply partial context to unlabeled file `conf'
      chcon: can't apply partial context to unlabeled file `format'
      chcon: can't apply partial context to unlabeled file `start-commit.tmpl'
      chcon: can't apply partial context to unlabeled file `post-revprop-change.tmpl'
      chcon: can't apply partial context to unlabeled file `post-unlock.tmpl'
      chcon: can't apply partial context to unlabeled file `post-commit.tmpl'
      chcon: can't apply partial context to unlabeled file `post-lock.tmpl'
      chcon: can't apply partial context to unlabeled file `pre-lock.tmpl'
      chcon: can't apply partial context to unlabeled file `pre-revprop-change.tmpl'
      chcon: can't apply partial context to unlabeled file `pre-commit.tmpl'
      chcon: can't apply partial context to unlabeled file `pre-unlock.tmpl'
      chcon: can't apply partial context to unlabeled file `hooks'
      chcon: can't apply partial context to unlabeled file `README.txt'
      chcon: can't apply partial context to unlabeled file `db.lock'
      chcon: can't apply partial context to unlabeled file `db-logs.lock'
      chcon: can't apply partial context to unlabeled file `locks'

      Any sugestion will be greatly receive.

      Reply
      • Hi Reedyseth,

        Try following instead:

        
        chcon -h system_u:object_r:httpd_sys_content_t /var/www/svn/[your repo]
        chcon -R -h apache:object_r:httpd_sys_content_t /var/www/svn/[your repo]/*
        

        Some reason you don’t have user or/and role already assigned.

        Reply
        • I did that and not mistake, but when I am trying to checkout I get

          RA layer request failed
          svn: Server sent unexpected return value (405 Method Not Allowed) in response to PROPFIND request for ‘/svn/project1’

          I tried your code but instead of using “/var/www/svn/” I used “/home/behstant/svn/” where I have the repos. This has anything to do ? form me the address of the repo does not matter, or It most be on the /var directory ?

          Reply
          • I think that problem might be that you use your home directory and Apache doesn’t have right permissions to your home dir…

            Could you post output of following commands:

            
            cat /etc/httpd/conf.d/subversion.conf
            
            ls -laZ /home/behstant |grep svn
             
            ls -laZ /home/behstant/svn
            
            Reply
              • Hi again Reedyseth,

                Couple things:

                You get error message svn: Server sent unexpected return value (405 Method Not Allowed) in response to PROPFIND request for ‘/svn/project1′, but looks like you don’t have project1 repo under svn directory?

                And on /etc/httpd/conf.d/subversion.conf file you use Location /svn/hterrazas and SVNParentPath /home/behstant/svn/hterrazas, so do you have that project1 under svn parent path? You should then use /svn/hterrazas/project1 instead of /svn/project1.

                Or maybe you should modify your config something like:

                
                
                   DAV svn
                   SVNParentPath /home/behstant/svn
                   AuthType Basic
                   AuthName "hterrazas Subversion repositories"
                   AuthUserFile /etc/svn-auth-users
                   Require valid-user
                
                
                Reply
                • Oh thanks JR, but I use project1 just as an example, I didn’t want to use the spanish word, but it is with hterrazas. My bad using that example, saying that, any other suggestion ?

                  Reply
                  • Oh, I see, no problem at all. :) So could you then try to modify your /etc/httpd/conf.d/subversion.conf file (last lines) to following:

                    
                    
                       DAV svn
                       SVNParentPath /home/behstant/svn
                       AuthType Basic
                       AuthName "Subversion repositories"
                       AuthUserFile /etc/svn-auth-users
                       Require valid-user
                    
                    

                    Restart httpd and then try to access /svn/hterrazas repo. Do you get same error?

                    Reply
                    • I’m still getting the same error, I created a video, send me your email to give you the link.

                      Reply
    14. Since your subscription link doesnt work (just a blank screen) can you please remove my email adress from the list? Thank you

      Reply
      • Hi Maroje,

        Looks like there is some problem with “Subscribe to Comments” plugin. I removed you manual from list. Thanks for this info!

        Reply
        • can you please also remove this email, I probably used it trying to remove myself from the list :D

          Reply
          • Hi Maroje,

            I removed this email too. :) And looks like that I got “Subscribe to Comments” plugin fixed too. :)

            Reply
1 3 4 5 6 7 10

Leave a Reply to Vasu 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