Setting up a Subversion server

Subversion is a code repository management system that is very similar to CVS, with some additional features that make it a more complete solution. Here’s a short list:

If you end up upgrading to svn, you’ll need to change all your ant build scripts to make sure they use svn to build and compile, and that you update the repository information and users to the new setup. SVN uses apache and allows for a lot of coll features out of the box like being able to browse your repository from the web, much in thanks to apache because svn uses the http protocol combined with webdav to allow for file uploads, authentication, stuff like that. There is also a lot of community support as well as third party plugins for both svn and IDE platforms like eclipse and netbeanz etc.

So here’s how to set it up:

make sure subversion is installed

[root@bedrock ~]# yum install subversion
[root@bedrock ~]# yum install mod_dav_svn

create your repository

[root@bedrock ~]# mkdir /svn/repos/your_repository

create your svn repository

[root@bedrock ~]# svnadmin create /svn/repos/your_repository

set the permissions

[root@bedrock ~]# chown –R apache:apache /subversion

fix the SUSElinux permissions stuff

[root@bedrock ~]# chcon -R -h -t httpd_sys_content_t /svn

set up the apache location configuration

[root@bedrock ~]# vi /etc/httpd/conf.d/subversion.conf

<Location /svn>
   DAV svn

   # any "/svn/repoX" URL will map to a repository /svn/repos/repoX
   SVNParentPath /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 "Openscope SVN Repository"
      AuthUserFile /svn/authentication/passwords
      Require valid-user

#      AuthzSVNAccessFile /svn/authentication/svnauth
   </LimitExcept>
</Location>

set up the subversion users

[root@bedrock ~]# htpasswd -cb /svn/authentication/passwords user1 password1
[root@bedrock ~]# htpasswd -b /svn/authentication/passwords user2 password2

restart the apache service

[root@bedrock ~]# service httpd restart

you should be good to go.

 
    Twitter
  • del.icio.us
  • Reddit
  • Technorati
  • Google Bookmarks
  • Blogplay
  • Yahoo! Buzz
  • LinkedIn
  • Facebook
  • Digg

Related posts:

  1. Set up IP Tables
  2. Set up postgres
  3. Install mod_jk
Posted on January 2, 2010 at 8:06 pm by Ant · Permalink
In: Fedora · Tagged with: , ,

Leave a Reply