Thursday 12 December 2013

Installing and Configuring SVN

Since I am doing a lot of work on the cloud [AWS] to be precise, I have started working a fair bit on the Open Source end [Whew, no more giant IBM products that I install, configure and deploy. Very agnostic to vendor currently.. benefits of not being an ISL'er anymore... Not that I don't like ISL mind you!]

Here is a good link that explains how SVN can be installed and configured. Seems like it can be up and running in less than 10 minutes. Boy, that's in a jiffy.

Steps roughly are like this:

a. yum install subversion mod_dav_svn
b. Configure httpd.conf for servername / other port details [if required]
c. Modify subversion.conf [under httpd/conf.d/ directory] and do the required changes.

Mine looks like this:

<Location /repos>
   DAV svn
#   SVNParentPath /var/www/svn
   SVNPath /var/www/svn/repos
#
#   # Limit write permission to list of valid users.
#   <LimitExcept GET PROPFIND OPTIONS REPORT>
#      # Require SSL connection for password protection.
#      # SSLRequireSSL
#
      AuthType Basic
#      AuthName "Authorization Realm"
     AuthName "Subversion repos"
     AuthUserFile /etc/svn-auth-conf
      Require valid-user
#   </LimitExcept>
</Location>
d. htpasswd -cm /etc/svn-auth-conf  <desiredusername>
e. For all subsequent entries into svn-auth-conf, don't use -c option. Just -m should suffice. [If required, optional step]
f. Configure repository: mkdir svn  (create a directory called svn under /var/www [or the location that you specified in the subversion.conf. Note that location and directory name should match in subversion.conf and the actual path. )
g. cd svn [or the directory that you just created]
h. svnadmin create repos
i. chown -R apache.apache repos
j. restart httpd server [apachectl -k restart or service httpd restart]

Done. Finished. Kaput.

No comments:

Post a Comment