svn (Subversion)

Published by onesixx on


–  open source version control system
–  keep track of a collection of files and folders.

Installation   Written by 
sudo apt install subversion 

To access Subversion repository using the HTTP protocol,

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

Using Apache

install apache

sudo apt-get install apache2

enable module

enable required Apache modules and restart Apache service.

sudo a2enmod dav
sudo a2enmod dav_svn
sudo service apache2 restart

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

Server Configuration

Create Repository

sudo svnadmin create /svnhome/repo_config


/snvhome/repo_config/conf$ ls


/svnhome/repo_config/conf$ sudo vi authz


sixx = rw


/svnhome/repo_config/conf$ sudo vi passwd
sixx = pwpw


Access Methods  (via custom protocol (svn://))

/svnhome/repo_config$ sudo vi svnserve.conf
anon-access = none
password-db = passwd
authz-db = authz
realm = My First Repository




sudo mkdir -p /svnhome
sudo svnadmin create /svnhome/repo_config/
sudo chmod -R 775 /svnhome

Start svn daemon

svnserve –daemon –root /svnhome/repo_config/

svnserve -d -r /svnhome/repo_config/

특정 Port로시작

svnserve -d -r /svnhome/repo_config/ --listen-port 3690

port 확인 (default port : 3690)

netstat -anp | grep svnserve
(Not all processes could be identified, non-owned process info
 will not be shown, you would have to be root to see it all.)
tcp        0      0  *               LISTEN      3732/svnserve

Check svn daemon

ps -ef |grep svnserve
ps aux | grep svn

Importing Files

svn import /svnhome/project01 file:///home/sixx/project

Checkout repository

/svnhome/project01/ 폴더를 Repository로 사용

/svnhome/project01/>  svn checkout svn:// --username sixx --password pwpw
ATTENTION! Your password for authentication realm:

<svn://> My First Repository

can only be stored to disk unencrypted! You are advised to configure
your system so that Subversion can store passwords encrypted, if
possible. See the documentation for details.

You can avoid future appearances of this warning by setting the value
of the 'store-plaintext-passwords' option to either 'yes' or 'no' in
Store password unencrypted (yes/no)? yes
Checked out revision 1.

Update repository

/svnhome/project01/> svn update
/svnhome/project01/> svn update --username sixx --password pwpw


Categories: Pj


Blog Owner

Leave a Reply

Your email address will not be published.