Installing Subversion Edge 2.2.0 on CentOS 6

Should be easy, right?  It is, but I spent a good bit of time discovering how things really work.  Don’t get me wrong, the installation instructions are a good start, but things don’t working the way they should with Subversion Edge 2.2.0.

IN A NUTSHELL

  1. Install CentOS 6
  2. Prep CentOS 6 for Subversion Edge
  3. Install Subversion Edge
  4. Configure Subversion Edge in the GUI

Continue reading

Subversion with Apache, CentOS and Active Directory

I’m a big fan of the Collabnet implementation of Subversion.  They set you up with installable RPMs that handle but bulk of what you need to do to get subversion working.  They have the new Subversion Edge that is 100% Apache and will work with active directory, but if your team has hundreds of thousands of files using Apache to check out is going to be significantly slower than SVN+SSH. Edge cannot do svn+ssh, but it does have a nice web GUI.  If you aren’t worried about speed I 100% recommend using Edge.  You can then just skim this article because I do have some hints on properly setting up the LDAP connectivity that apply to a GUI or command line setup.  if you have a team like my team, then you need a faster transport method and that means svn+ssh

First, why is it faster?  Easy.  SSH opens a single connection an reuses it for all of the files.  Set your Apache  loglevel to debug sometime watch the logs when a user checks out files.  Sure, you can configure Apache to more efficiently spawn and destroy children, but I don’t think it’s worth the time.

UPDATE – With the release of Subversion 1.7, which is an awesome rewrite from the ground up, many of my concerns about speed have gone away.  SVN+SSH is still going to be faster than Apache, but you may be able okay.  I really like Subversion Edge and think you should consider installing it.

PREREQUISITES

CentOS /RedHat 5.x with the base default, but patched.

LET’S DO IT

Install CentOS5 (or Redhat).  Just do a default install and make sure it’s updates with yum.  Then get the CollabNet RPMS:

http://www.open.collab.net/downloads/subversion/linux1.5.html

Grab the Server, Client and Extras for your architecture and get them on your server.  Then install it with yum.

yum localinstall –nogpgcheck CollabNetSubversion-server-1.6.15-1.x86_64.rpm CollabNetSubversion-extras-1.6.15-1.x86_64.rpm CollabNetSubversion-client-1.6.15-1.x86_64.rpm

This sets you, but you will still need to configure things.  I like to keep my repos in a directory called /repos.  So, I’d make sure this exists now:

mkdir /repo; chown csvn:csvn /repo

Continue reading

Building a Mirrored Subversion (SYNC) Server

This method believe that you already have a repo somewhere and that you’ve loaded subversion in the new location and turn svnadmin create /repo/newrepo. After that these instructions will work.

 # Variables
 export TOREPO=svn+ssh://syncserver.domain.com/imported
 export FROMREPO=svn+ssh://mainserver.domain.com/repo/
# Allow commit hooks to do anything they want.
 echo "#!/bin/sh" > hooks/pre-revprop-change
 chmod 755 hooks/pre-revprop-change
# Setup the Sync
 svnsync init ${TOREPO} ${FROMREPO}
# Poke it with a stick to see some variables
 svn proplist --revprop -r 0 ${TOREPO}
 svn propget svn:sync-from-url --revprop -r 0 ${TOREPO}
# Start the sync
 svnsync --non-interactive sync ${TOREPO}
# Got interrupted… it got locked didn't it.
 svn propdelete svn:sync-lock --revprop -r 0  ${TOREPO}

About Jay Farschman - Jay currently works as a Senior Systems Administrator for an asset management company in Colorado where he works with companies that produce hardware, telecommunications software and financial services.  Jay previously owned a consulting company and provided training and consulting services for three Fortune 500 companies and numerous small businesses where he leveraged Linux to provided exceptional value