Subversion is a fantastic version management and software configuration management tool for teams and individuals to manage software applications. It offers many advantages over it's CVS ancestor such as it's built-in compatibility with Apache through the WebDAV protocol giving easy remote access over HTTP.
(Your server will require an external IP address to be accessed from an external location)
This tutorial will take you step-by-step through the install and set-up process for Subversion.
SETTING UP YUM
The easiest way to install and manage packages on Linux is using yum. It can detect dependencies and resolve them for you - easing many headaches! If you do not have it installed then you can quickly install it from the terminal.
Run the following commands to install it (hit y where necessary to confirm the process):
mod_dav_svn allows integration with Apache through the WebDAV protocol.
You may find that SVN is already installed by default.
Enter svnadmin into the terminal to confirm correct installation.
SETTING UP SUBVERSION
1. First you must create a directory for your svn repository. Through this tutorial my repository will be in the / directory and called repos. You should change the paths throughout the tutorial if you want to place the repository in a different place.
To create your repository and assign permissions open the terminal and run the following commands:
2. Within /etc/httpd/conf.d you will find a file called subversion.conf. This file configures SVN to work with Apache. You must edit it to specify your SVN repository and secure it.
First copy and paste the file renaming it to subversion-backup.conf. This is just incase you make any mistakes - you can restore the file to its original with little hassle.
Then delete the contents of the original file. Add in the following to the file, changing directories where necessary to your own repository.
This is all the changes you need to make to Apache. You have now told Apache where your SVN repository is and told it to authenticate the user. The last thing we need to do is create the username and password for the user
3. From your terminal enter the following commands to set the SVN username and password.
Whichever username and password you choose - it will be required to authenticate when you attempt to connect to the SVN repository over HTTP.
You should note that your password is stored in plain-text and sent over the web in plain text unless you use SSL. This is outside the scope of this article.
Thats all there is to setting up SVN. Restart Apache to make all your changes take effect.
Comments (0)