zeldor.biz

Linux, programming and more

Copyright © 2025
Log in

SVN server installation and workflows

January 15, 2020 by Igor Drobot Leave a Comment

Apache Subversion often abbreviated as SVN is a software versioning and revision control system. This post was written during a integration and PoC of SVN in a deployment stages.

SVN server installation

apt update
apt install apache2
apt install subversion libapache2-mod-svn libsvn-dev
a2enmod dav_svn
a2enmod dav

SVN server configuration

The apache2-module for SVN within the file is quiet short and understandable without additional comments.
/etc/apache2/mods-enabled/dav_svn.conf

<Location /svn>
   DAV svn
   SVNParentPath /var/lib/svn

   AuthType Basic
   AuthName "Subversion Repository"
   AuthUserFile /etc/apache2/dav_svn.passwd
   Require valid-user
</Location>

Create the directory structure for your repositories:

mkdir -p /var/lib/svn/
svnadmin create /var/lib/svn/<REPOSITORYNAME>
chown -R www-data:www-data /var/lib/svn
chmod -R 775 /var/lib/svn

Cerate SVN-user and set the user password:

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

Restart apache2 to take all changes in effect:

service apache2 restart

Access the repository

Access the just created repository over web browser: http://localhost/svn/powerx/

svn info http://localhost/svn/powerx
# Or with a different username
svn info http://localhost/svn/powerx --username admin

SVN worklow basics

# Create structure within repository and add files
mkdir Deploy01

svn add Deploy01
svn commit Deploy01 -m 'Initial commit for deploy 01'

# Update your working copy by fetching all changes
svn update

# See the overview over changes
svn log

If you are looking for a SVN subcommand, help will help you :)

svn help

SVN Client

There a a lot clients for SVN out there, this is a short list of the most suitable clients:
– Windows: TortoiseSVN
– Linux: command line tool svn is available
– macOS: build in command line svn and Visual Studio Code has a required plugin also Eclipse has a not bad SVN integration.

Filed Under: Linux Tagged With: developer, SVN

Categories

Archives

Tags

apache2 Apple arduino ARM Automation backup bash Cisco Cluster Corosync Database Debian Debian squeeze DIY DNS Fedora FTP Fun Icinga Ipv6 KVM Linux LVM MAC OS X Monitoring MySQL Nagios Nginx openSUSE OpenVPN PHP Proxy Python python3 qemu RAID rsync Samba security ssh Ubuntu virtualization Windows Windows 7 Wordpress

Leave a Reply

Your email address will not be published. Required fields are marked *

Yeaaah Cookie! We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.Ok