posted 10/21/2009 by Chris

What is Subversion?

"Subversion is a free/open source version control system. That is, Subversion manages files and directories, and the changes made to them, over time. This allows you to recover older versions of your data or examine the history of how your data changed. In this regard, many people think of a version control system as a sort of “time machine.

Subversion can operate across networks, which allows it to be used by people on different computers. At some level, the ability for various people to modify and manage the same set of data from their respective locations fosters collaboration. Progress can occur more quickly without a single conduit through which all modifications must occur. And because the work is versioned, you need not fear that quality is the trade-off for losing that conduit—if some incorrect change is made to the data, just undo that change." - Subversion Book

 

Part 1: Connecting to your server via SSH

  1. Log into your Media Temple account
  2. Click the "Admin" button next to your domain name
  3. Click the "Root Access & Developer Tools" button
  4. Enable Root Access and create your password
  5. Download a telnet/ssh client (for Windows I recommend PuTTY)
  6. Log into your server via SSH with username 'root'

 

Part 2: Create your Subversion Repository and users

  1. Move to the correct direcory
       [root@yourdomain ~]# cd /var/www/svn
  2. Create a repository called 'stuff'
       [root@yourdomain svn]# svnadmin create stuff
  3. Give the repo the correct file ownership
       [root@yourdomain svn]# chown -R apache.apache. stuff
  4. Create an authorization file for the repo
       [root@yourdomain svn]# htpasswd -cm stuff/svn_auth_file name1
  5. Add another name to the auth file (notice -cm to -m)
       [root@yourdomain svn]# htpasswd -m stuff/svn_auth_file name2
  6. Add new repo location entry to subversion.conf
       [root@yourdomain svn]# vi /etc/httpd/conf.d/subversion.conf
       Scroll down a few lines and press i
       Scroll down a few lines and press i
       To force users to login to read/write add:
       <Location /repos/stuff>
         DAV svn
         SVNPath /var/www/svn/stuff
         # How to authenticate a user
         AuthType Basic
         AuthName "Authorization Realm"
         AuthUserFile /var/www/svn/stuff/svn_auth_file
         # Require an authorized user
         Require valid-user
       </Location>

       OR to force users to login to write (anyone can read) add:
       <Location /repos/stuff>
         DAV svn
         SVNPath /var/www/svn/stuff
         # How to authenticate a user
         AuthType Basic
         AuthName "Authorization Realm"
         AuthUserFile /var/www/svn/stuff/svn_auth_file
         # For any operation other than these, require an authorized user
         <LimitExcept GET PROPFIND OPTIONS REPORT>
           Require valid-user
         </LimitExcept>
       </Location>

       Press escape
       Type :wq
       Press enter

 

Part 3: Restart the server

  1. Log into your Media Temple account
  2. Click on the 'Plesk' button next to your domain name
  3. Log into Plesk
  4. Click the 'Server' button in the left column
  5. Click the 'Reboot' button at the bottom of the page

 

Part 4: Connect to your Subversion repository

  1. Connect to your repo at https://www.yourdomain.com/repos/stuff
  2. Login with the names/passwords you made in part 2, steps 4/5
Share:
facebook myspace digg del.icio.us fark stumbleupon live spurl furl reddit yahoo

COMMENTS (displaying 1 comment)

1. Posted on October 22, 2009 by Bob
Finally a tutorial that works from start to finish!

POST (leave a comment)

Name:
Email:
Message:
Verify:
CAPTCHA Image