Subversion (SVN) is a version control system initiated in 2000 by CollabNet Inc. It is used to maintain current and historical versions of files such as source code, web pages, and documentation. Its goal is to be a mostly-compatible successor to the widely used Concurrent Versions System (CVS).
You can download Source Or RPM
yum install apr auconf libtool serf openssl db4 apache python perl sqlite
Create SVN directory for storage
Create multiple projects with dir structure in single repository.
Here we are creating single repository for multiple projects, this is dir structure. This can be used if projects are inter dependent.
Create single repository
svnadmin create /home/svn/projects
svn import . file:///home//svn/projects –message ‘Initial repository structure’
rm -R tmpdir
Create dir structure for multiple repository.
You may require SVN for multiple projects, using separate repository you can define better access rights using Authz file. Below we have used /etc/httpd/svn.authz to delegate rights on user bases.
Create multiple repositories
svnadmin create /home/svn/project1
svnadmin create /home/svn/project2
svn import . file:///home//svn/project1 –message ‘Initial repository structure’
svn import . file:///home//svn/project2 –message ‘Initial repository structure’
rm -R tmpdir
To view svn verbose list
svn list –verbose file:///home/svn/projects
add followings in /etc/httpd/conf/httpd.conf
LoadModule dav_svn_module modules/mod_dav_svn.so
LoadModule authz_svn_module modules/mod_authz_svn.so
AuthName “SVN Authorization Realm”
SVN user based rights
dhaval = rw
guest = r
dhaval = r
guest = r
To create users
htpasswd -c /etc/httpd/svn.passwd dhaval #for first user
htpasswd /etc/httpd/svn.passwd dhaval1 #for 2nd onwards
To delete user
htpasswd -D /etc/httpd/svn.passwd dhaval1
For better output using css
cp /usr/lib/subversion/tools/xslt/* /var/www/html/
If you are facing Access denied to display multiple repositories, you can create simple html & define path for all your repositories.
e.g <a href=”/svn/repos/project1″>Project1</a>
Changes in svn.authz & svn.passwd does not require service httpd reload.
if you find any missing point in here, please let us know in comment section or tweet us at @linuxreaders. To get more articles like this, subscribe to our RSS feeds / Mails.