Facebook Twitter Instagram
    TecAdmin
    • Home
    • Ubuntu 20.04
      • Upgrade Ubuntu
      • Install Java
      • Install Node.js
      • Install Docker
      • Install LAMP Stack
    • Tutorials
      • AWS
      • Shell Scripting
      • Docker
      • Git
      • MongoDB
    • FeedBack
    • Submit Article
    • About Us
    Facebook Twitter Instagram
    TecAdmin
    Home»Linux Distributions»Fedora»How To Install SVN Server on Debian 11/10

    How To Install SVN Server on Debian 11/10

    RahulBy RahulSeptember 1, 20183 Mins ReadUpdated:February 15, 2022

    SVN is an open source version control system build by Apache Foundation Team. It helps you keep track of a collection of files and folders. Any time you change, add or delete a file or folder that you manage with Subversion, you commit these changes to your Subversion repository, which creates a new revision in your repository reflecting these changes. You can always go back, look at and get the contents of previous revisions.

    This article will help you for step by step setup of Subversion (svn) server on Debian 11, Debian 10 and Debian 9 Linux systems.

    Step 1 – Install Apache

    We are using Apache web server to host SVN server. You need to install the Apache web server to access the svn server using HTTP URLs. Skip this step if you already have Apache web server on your system.

    sudo apt-get update 
    sudo apt-get install apache2 
    

    Step 2 – Install SVN Server

    Use the following command to install subversion packages and their dependencies. Also, install svn module for Apache libapache2-mod-svn packages on your system.

    sudo apt-get install subversion libapache2-mod-svn libapache2-svn libsvn-dev 
    

    After installation, enable required Apache modules and restart Apache service.

    sudo a2enmod dav 
    sudo a2enmod dav_svn 
    sudo service apache2 restart 
    

    Step 3 – Configure Apache with Subversion

    Subversion Apache module package creates an configuration file /etc/apache2/mods-enabled/dav_svn.conf. You just need to make necessary changes to it.

    Alias /svn /var/lib/svn
    <Location /svn>
    
       DAV svn
       SVNParentPath /var/lib/svn
    
       AuthType Basic
       AuthName "Subversion Repository"
       AuthUserFile /etc/apache2/dav_svn.passwd
       Require valid-user
         
    </Location>
    

    Step 4 – Create SVN Repository

    Use following commands to create your first svn repository with name myrepo. Also, set the required permissions on newly created directories.

    sudo mkdir -p /var/lib/svn/ 
    sudo svnadmin create /var/lib/svn/myrepo 
    
    sudo chown -R www-data:www-data /var/lib/svn 
    sudo chmod -R 775 /var/lib/svn 
    

    Step 5 – Create Users for Subversion

    Now create first svn user in /etc/apache2/dav_svn.passwd file. These users will use for authentication of svn repositories for checkout, commit processes.

    sudo htpasswd -cm /etc/apache2/dav_svn.passwd admin 
    

    To create additional users, use following commands.

    sudo htpasswd -m /etc/apache2/dav_svn.passwd user1 
    sudo htpasswd -m /etc/apache2/dav_svn.passwd user2 
    

    Step 6 – Access Repository in Browser

    Use HTTP URLs to access your repository in the browser. It will prompt for authentication. Use login credentials created in Step 5. Change example.com with your system hostname, domain name or IP address.

     http://example.com/svn/myrepo/
    

    Install Svn Server 1

    Install Svn Server 2

    Thank You for using this article. Read our next article How to Backup and Restore SVN Repository in Linux.

    install svn server subversion svn
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email WhatsApp
    Previous ArticleHow to Install Ansible on Debian 8 (Jessie)
    Next Article How To Install Jenkins on Debian 10/9/8

    Related Posts

    How To Install Apache Solr 9.0 on Fedora 36/35

    Updated:May 26, 20223 Mins Read

    How to Install PowerShell on Fedora

    Updated:March 3, 20222 Mins Read

    How To Install and Configure Drupal on Fedora 35/34

    Updated:February 15, 20224 Mins Read

    How To Install TeamViewer on Fedora 35/34

    Updated:February 15, 20222 Mins Read

    How To Install XRDP (Remote Desktop) on Fedora

    Updated:June 15, 20214 Mins Read

    How To Install Notepad++ on Fedora 35/34

    Updated:February 15, 20222 Mins Read

    5 Comments

    1. Seosamh Ó Galúna on March 8, 2021 6:36 pm

      Thanks for the tutorial. However, I encountered a similar problem to Dario when using svn import and the solution was the same – to remove the Alias /svn /var/lib/svn in the dav_svn.conf file (using Debian 10).

      Reply
    2. Chairez on May 30, 2020 12:26 am

      Hey man, i did everything in this tutorial but it seems that the server isnt ¨ON¨ because i cant access it on a browser

      Reply
      • Rahul on May 30, 2020 8:44 am

        Hi, What are you getting in browser? Is Apache running?

        Reply
        • Chairez on May 30, 2020 4:29 pm

          Hi, I get the message “This site can’t be reached” which I guess is bc the server is off or something. How do I know if Apache is running? Also did you do anything else besides de svn configuration, like a port configuration? And how can I create folders in the server? Thank you

          Reply
    3. dario on June 10, 2019 10:22 am

      Great !
      but when i try to connect with smartsvn he says that exist a recursive path .
      Solution:
      please remove
      Alias /svn /var/lib/svn
      from
      /etc/apache2/mods-enabled/dav_svn.conf
      as suggest in
      https://stackoverflow.com/questions/18474825/what-is-the-cause-of-svn-e195019-redirect-cycle-detected-for-url
      thanks

      Reply

    Leave A Reply Cancel Reply

    Recent Posts
    • How To Install Docker on Ubuntu 22.04
    • How to Install Bower on Ubuntu 22.04 & 20.04
    • How to run “npm start” through Docker
    • Filesystem Hierarchy Structure (FHS) in Linux
    • How to accept user input in Python
    Facebook Twitter Instagram Pinterest
    © 2022 Tecadmin.net. All Rights Reserved | Terms  | Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.