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

[root@railstestwebmin ~]# wget http://apache.techartifact.com/mirror/subversion/subversion-1.7.6.tar.bz2 [root@railstestwebmin ~]#tar xjvf subversion-1.7.6.tar.bz2 [root@railstestwebmin ~]# cd subversion-1.7.6 [root@railstestwebmin subversion-1.7.6]# ./configure –with-apxs=/usr/local/apache2/apxs [root@railstestwebmin subversion-1.7.6]# make [root@railstestwebmin subversion-1.7.6]#make install

Configure your repository

[root@railstestwebmin ~]#cd /var/www/ — Or wherever you placed your path above [root@railstestwebmin ~]#mkdir svn [root@railstestwebmin ~]#cd svn [root@railstestwebmin svn]# svnadmin create repos —creating repository by name repos [root@railstestwebmin 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 [root@railstestwebmin svn]# service httpd restart

• Configuring the svn configuration file

[root@railstestwebmin 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/mod_dav_svn.so LoadModule authz_svn_modulemodules/mod_authz_svn.so 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 #</LimitExcept> </Location>
  • restart the apache

[root@railstestwebmin subversion-1.7.6]# httpd -t—check for the syntax. [root@railstestwebmin 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.

Subscribe For Latest Updates

Related Posts

Leave a Comment

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

en_USEnglish