Install Subversion [SVN] on Linux Server

how to install SVN (Subversion) server on Fedora , Red Hat (RHEL).

Install Packages:-
# yum install mod_dav_svn subversion


Modify Subversion config file /etc/httpd/conf.d/subversion.conf

Add following config to /etc/httpd/conf.d/subversion.conf file:-
LoadModule dav_svn_module     modules/
LoadModule authz_svn_module   modules/

<Location /svn>
   DAV svn
   SVNParentPath /var/www/svn
   AuthType Basic
   AuthName "Subversion repositories"
   AuthUserFile /etc/svn-auth-users
   Require valid-user

How to Add SVN  users:-

Use  command:
## Create user vishal ##
htpasswd -cm /etc/svn-auth-users vishal
New password:
Re-type new password:
Adding password for user vishal

## Create testuser2 ##
htpasswd -m /etc/svn-auth-users vyas
New password:
Re-type new password:
Adding password for user vyas


How to Create and configure SVN repository:-

mkdir /var/www/svn
cd /var/www/svn

svnadmin create reponame
chown -R apache.apache reponame

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

## Following enables commits over http ##
chcon -R -t httpd_sys_rw_content_t /var/www/svn/reponame 
Goto http://localhost/svn/reponame address and you should see 
something like following, write username and password:  

 Create trunk, branches and tags structure under testrepo:-

Create “template” directories with following command:
mkdir -p /opt/vishal{trunk,branches,tags}
Then import template to project repository using “svn import” command:
svn import -m 'Initial import' /opt/vishal/ http://localhost/svn/repo
Adding         /tmp/svn-structure-template/trunk
Adding         /tmp/svn-structure-template/branches
Adding         /tmp/svn-structure-template/tags

Committed revision 1.
Check results on browser and see testrepo revision 1:- 
Vishal Vyas  


  1. This is one such interesting and useful article that i have ever read. The way you have structured the content is so realistic and meaningful. Thank you so much for sharing this in here. Keep up this good work and I'm expecting more contents like this from you in future.

    Hadoop Training Chennai | Hadoop Training in Chennai | big data Training in Chennai

  2. Amazing Article, thank you!. I am very glad to read your informative & practical blog. Kindly keep updating your blog.

    white label website builder

  3. I believe there are many more pleasurable opportunities ahead for individuals that looked at your site.
    aws training in Chennai

  4. Such A nice post... thanks For Sharing !!Great information for new guy like Hanuman Chalisa Lyrics

  5. Thank you for excellent article.Great information for new guy like antimalware service executable


Post a Comment

Popular posts from this blog

Another instance of Certbot is already running - Solved - Linux guru

Install Apache Using Ansible Playbooks

Setup password less SSH on linux

Create aws s3 bucket using cli

Secure nginx with Let's Encrypt on Ubuntu 18.04