SVN (which stands for Subversion) is a version control system. So let me speak some english here for you. Lets say you make a website for a customer. When you are finished it is version 1. A month or so later the customer calls you back and wants to add a page or 2. This would then be version 2. So you upload ver 2 to replace ver 1 and the customer hates it. Oh my I did not back up ver 1 and there are many changes that happened. Well if you are using SVN you can go in and tell the code to revert back to ver 1 and then upload those files and you are a happy camper.
Well with the quick explaining what the SVN is, now lets show you how to setup the server for this. I will be installing this on a Ubuntu 9.04 box. I have tested this way with versions 8.04 and 8.10. Now I am assuming that you have Apache 2 and up already installed and configured.
Lets installing the app Subversion and install the apache module libapache2-svn
Now that we got that installed lets add a new group for subversion
Next we make a main directory that will hold all of our SVN. You can have multiple sites or repositories as they are called for different sites or projects
Note: There is really no wrong place that you can setup the svn directory
Now we just need to make some permission changes to the directory we just made
Next we are going to create the SVN. For this example I will name the SVN myWebsite . Now you can name your repository pretty much anything you want.
We now have the SVN setup but now we need to get this configure so users can now connect to this SVN. We now need to edit /etc/apache2/mods- available/dav_svn.conf and make some changes to that file. You can add the following to the end of the file
1 2 3 4 5 6
If you have multiple repositories you would just add another section and change myWebsite to the name of the other repo. Now lets add 2 username and passwords that can connect to the SVN.
1 2 3 4
Lets go ahead and finish up
1 2 3
That is it. You know have a working SVN server. In a later tutorial I will show you how to setup an SVN client to connect to this repositories. Below is a youtube video showing you how to do what I described above.