While I was doing my research, I found out a lot of the tutorial, even the one on Ubuntu site is hooking up svn with Apache Server. What if you are not running Apache, and what if you just want a SVN server alone? Your solution is to use svnserve alone instead.
First thing first, download subversion and subversion-tools once you have it in place choose a place where you want your repository be. For myself, I choose to have the svn repository under home folder.
Before you actually creating the directory for your repository
Choose System > Administration > Users and Groups from your Ubuntu menu.
- Select the Group tab
- Click the 'Add Group' button
- Name the group 'subversion'
- Add yourself and as users to this group
After adding yourself to the group, you can then create your svn repository
$ sudo mkdir /home/svn
$ cd /home/svn
$ sudo mkdir svn-repo
$ sudo chown -R:subversion repo
$ sudo chmod -R ug+rw repo
The above code will create a folder name repository under /home/svn/ and the owner should be yourself and the permission settings are set to 755.
Now you have the folder and permission set, you can then use svnadmin create command to add your repository. (If you already have a full functional repository at this point, you can simply skip this step)
Now you will have an initial repository, however how can you start the SVN server and may be have it start up as a service ?
The only problem I ran into is the initial install of svnserve does not has a startup scrip under the /etc/init.d/
Thanks to the community, I was able to find a script here once you download it and you will be able to use it as the init.d script. This script will allow you to start, stop and restart the SVN server (I call mine svnserve).
Once you save this script under the /etc/init.d/ directory then make sure you change the owner and group to root and set the permissions to 755 and make this script executable
sudo chmod +x svnserveThen add the script to the boot sequence
sudo update-rc.d svnserve defaultsYou are all set, enjoy !






