Creating a subversion server in B3 Server
In order to keep a version control of my home projects, I decided to set up a subversion server in my B3 Server.
I will be using subversion an Apache.
B3 Server Installation
- Become root
1su
- Install subversion and support for Apache
1apt-get install subversion libapache2-svn
- Create a base directory for your subversion projects
1mkdir /var/svn
- Give permissions for Apache
1chown -R www-data:www-data /var/svn
- Configure Apache svn module
1vi /etc/apache2/mods-available/dav_svn.conf
- Here’s my dav_svn.conf. Be sure to alter SVNParentPath to your subversion projects base directory.
1 <Location /svn>
2
3 # Uncomment this to enable the repository
4 DAV svn
5
6 SVNParentPath /var/svn
7 SVNListParentPath on
8 AuthType Basic
9 AuthName "Subversion Repository"
10 AuthUserFile /etc/apache2/dav_svn.passwd
11
12 # The following three lines allow anonymous read, but make
13 # committers authenticate themselves. It requires the 'authz_user'
14 # module (enable it with 'a2enmod').
15 #<LimitExcept GET PROPFIND OPTIONS REPORT>
16 Require valid-user
17 SSLRequireSSL
18 #</LimitExcept>
19
20</Location>
- Restart Apache
1/etc/init.d/apache2 restart
- Create users for subversion
1htpasswd -cm /etc/apache2/dav_svn.passwd *yourusername*
- Create your projects with the right permissions
1svnadmin create /var/svn/yourproject
2chown -R www-data:www-data /var/svn/yourproject
- To remove projects
1cd /var/svn
2rm yourproject -R
Client Installation
- Install subversion
1sudo apt-get install subversion
- Connect and sync your projects. This will create a new directory yourproject in your home folder.
1svn co https://b3server/svn/yourproject
- Optionally you can install a graphical tool like rabbitvcs, with nautilus integration
1sudo add-apt-repository ppa:rabbitvcs/ppa
2sudo apt-get update
3sudo apt-get install rabbitvcs-nautilus3
4killall nautilus
You can check out the excito wiki for further details.