The Perfect Subversion Server - Debian Lenny [ISPConfig3]
|
Submitted by indemnity83 (Contact Author) (Forums) on Fri, 2010-05-14 14:20. :: Debian | ISPConfig | Apache
The Perfect Subversion Server - Debian Lenny [ISPConfig3]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". This guide will help you setup the subversion system, and integrate it with your existing ISPConfig3 installation allowing you control over disk usage, quota and other factors in a very familiar way. Perhaps one day, somebody can use this process to create a plug in for ISPConfig3 that does all of this automatically.
RequirementsObviously, this how-to requires that you already have ISPConfig3 setup and running. The steps outlined below may work with ISPConfig2 as well, but it has not been tested and will not be supported. If you haven't already done so, follow falko's guide to The Perfect Server- Debian Lenny [ISPConfig3] before continuing. To allow for a single web site to have multiple repositories, we'll be putting everything under a 'svn' folder, and ultimately the public path to your repository will look something like http://example.com/svn/myrepo. But before we can get started, you need to create the site for 'example.com'. Creating the site and setting quota options is outside the scope of this how-to, but its fairly straight-forward if you haven't done it before.
Install SubversionInstallation of Subversion, and the required Apache module(s) is fairly straight forward (run as root, or use sudo): apt-get install subversion libapache2-svn
Create a Repo(sitory)By default, ISPConfig stores the sites in /var/clients/clientx/weby/, you'll need to know which client ID (x) and site ID (y) corresponds to the site you want to setup the repository on. If you've made any adjustments to the default paths you'll need to modify the commands below to match your directory structure. Start by creating the svn directory (you only need to do this once for each site): mkdir /var/clients/clientx/weby/svn Next, you'll need to create the repository and correct the permissions on everything (important for quota checks). svnadmin create /var/clients/clientx/weby/svn/myrepo
Sharing and Securing the RepositoryWe will be using apache to share and secure access to our repository and while the sharing steps are always the same, we have three options for securing the repository.
Assuming you choose either a shared or private repository, you'll need to create the passwords file that stores usernames and passwords of 'authorized' users (to add additional users, omit the '-c' option from the command). htpasswd -c /var/clients/clientx/weby/svn/myrepo.passwd [username1] <-- you'll be asked to enter a password for username1 Finally, you need to add the appropriate directive to tell Apache what to do when a user requests http://example.com/svn/myrepo. Depending on the security method you wish to use, copy the appropriate directive below and paste it in the 'Apache Directives' box, on the 'Options' tab of your site in ISPConfig (don't forget to fix the directories with the appropriate x and y values).
Public Repo<Location /svn/myrepo> Shared Repo<Location /svn/myrepo> Private Repo<Location /svn/myrepo> It may take a minute for the site to start working once you make the changes, but at this point you should have a working and secured Subversion repository. If you want to add more, just repeat everything starting at 'Create a Repo(sitory)'
ThanksI hope you find this how to useful. Please feel free to add comments or corrections.
|

![Creative Commons Attribution License [Creative Commons Attribution License]](http://creativecommons.org/images/public/somerights20.gif)


Recent comments
12 hours 11 min ago
17 hours 16 min ago
21 hours 40 min ago
23 hours 29 min ago
1 day 13 hours ago
1 day 13 hours ago
1 day 18 hours ago
2 days 1 hour ago
2 days 2 hours ago
2 days 3 hours ago