Ubuntu: Configuring Subversion

Introduction
The following is a step-by-step guide for configuring Subversion for Ubuntu Linux. Additional information can be found on the Ubuntu Help page.
Requirements
You will need to have the Apache HTTP Server configured prior to setting up Subversion. For more infomration, visit my Ubuntu page.
Steps
- Issue the following command to install subversion on your system:
sudo apt-get install subversion libapache2-svn. - It is a good idea to try to maintain only one repository but it does not hurt to plan for supporting multiple repositories. With that in mind, figure out where on your system you want all repositories to reside. For example:
/cache/subversion. - Create as many repositories as you like by issuing the following command:
svnadmin create. For example: svnadmin create /cache/subversion/my-new-repository-1svnadmin create /cache/subversion/my-new-repository-2- Create and store a password for each of your Subversion users. For example, issue this command:
htpasswd -cm /etc/subversion/passwd user_name. By the way, the “-c” option needs to be used only for the first user you create. Consult the htpasswd man pages for more info. - Edit your Apache virtual host configuration file (example: /etc/apache2/sites-enabled/my-site) and add location information for Subversion:

Notice that I use the SVNParentPath. This is what allows me to support multiple repositories. Also, the password file, created earlier, needs to be referenced here as well. - Save the Apache virtual host configuration file.
- Ensure proper file permission is set up for your Subversion repositories. In my case, I ended up using the same user and group information as used for my web files. For example: www-data.
- Restart your Apache server:
sudo /etc/init.d/apache2 restart.
Conclusion
Subversion is now configured for use. To test, enter the URL of one of your previously created Subversion repositories. For example: http://<your server name>/svn/<your repository name>. Notice that “svn” is part of your URL path. This is because we defined it that way in the <Location /svn> information defined earlier.
Keep in mind that this setup is not secure as user password information, though encrypted, is transmitted in plain text.
No comments yet.
Leave a comment
You must be logged in to post a comment.
Search
Categories
- Adventures
(91)
- Announcements
(28)
- Business
(16)
- Electronics
(21)
- Epicurean
(9)
- Games
(3)
- Literature
(1)
- Mechanical
(4)
- Meetings
(14)
- Movies
(2)
- Music
(26)
- Photography
(1)
- Services
(24)
- Software
(102)