How to install SVN?

What is Apache Subversion or SVN?

Subversion is an Apache-licensed, open source software versioning and version control system that can track changes to files, folders and directories. It can also be used to recover previous versions of data, and examine the history of how a particular dataset has changed. Subversion can operate across networks, encouraging collaboration by allowing team members at various locations to work on the same set of data. Subversion can be used to manage any collection of files – web pages, binaries, documentation – not just source code!

Downloading subversion source and install

[[email protected] ~]# wget
[[email protected] ~]#tar xjvf subversion-1.7.6.tar.bz2
[[email protected] ~]# cd subversion-1.7.6
[[email protected] subversion-1.7.6]# ./configure –with-apxs=/usr/local/apache2/apxs
[[email protected] subversion-1.7.6]# make
[[email protected] subversion-1.7.6]#make install

Configure your repository

[[email protected] ~]#cd /var/www/ — Or wherever you placed your path above
[[email protected] ~]#mkdir svn
[[email protected] ~]#cd svn
[[email protected] svn]# svnadmin create repos —creating repository by name repos
[[email protected] svn]# chown -R apache.apache repos — change the ownership of that repos,ie user and group ,
same as apache’s user,group,check in httpd.conf file and conform
[[email protected] svn]# service httpd restart

• Configuring the svn configuration file

[[email protected] subversion-1.7.6]# vi /etc/httpd/conf.d/subversion.conf
• Check the svn module is loaded to apache or not , if not Include the subversion.conf file in apache config file

Uncomment the following lines in subversion.conf

LoadModule dav_svn_module modules/
LoadModule authz_svn_modulemodules/

SVNParentPath /var/www/svn/repos —- add location of repos
# Limit write permission to list of valid users.
# Require SSL connection for password protection.
# SSLRequireSSL
#AuthType Basic
#AuthName “Authorization Realm”
#AuthUserFile /etc/svn-auth-conf
#Require valid-user

  • restart the apache

[[email protected] subversion-1.7.6]# httpd -t—check for the syntax.
[[email protected] subversion-1.7.6]# /etc/init.d httpd restart
check the repository
go to the browser then htttp://server ip/repos

  •  Importing the files to repository

svn import /tmp/praveen/ file:///var/www/svn/repos/praveen -m “first import” ——All the files under /tmp/praveen are imported to /repos/praveen
Go to browser and check the repo, it’ll display the imported file as Revision 1.

Get in touch with us.

Leave a Comment

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