Jump to content

SVN to debian server


Recommended Posts

Hey guys i now write how to can install svn to debian server.
what is svn? )

 

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 10, Debian 9 and Debian 8 operating systems.

source

 

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 tortoisesvn

 

download link

 

right click -> tortoisesvn -> repobrowser -> write the url when you make your repo. (example: http://example.com/svn/myrepo/)
right click -> svn commit (to upload files)

Edited by SamuraiHUN
  • Metin2 Dev 7
  • Good 1
  • Love 1
  • Love 2
Link to comment
Share on other sites

Announcements



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.