Subversion server, with web access on ubuntu
October 29, 2009 | linux, toolsauthor: Karol Zielinski | comments: 0 | views: 1767
Tags: apache, server, subversion, svn
Today I will present how to install subversion server (+ repository) with the apache module and web access protected by password.
Subversion is an open source version control system. Using Subversion, you can record the history of source files and documents. It manages files and directories over time. A tree of files is placed into a central repository. The repository is much like an ordinary file server, except that it remembers every change ever made to files and directories.
Now… let’s fun.
I assume that you have apache installed.
First, make directory for SVN repository… I want to have my repository in ‘/home/svn’
sudo mkdir /home/svn cd /home/svn sudo mkdir myproject sudo chown -R www-data:www-data myproject
Create SVN repository:
sudo svnadmin create /home/svn/myproject
sudo apt-get install subversion libapache2-svn
sudo vim /etc/apache2/mods-enabled/dav_svn.conf
Uncomment line:
DAV svn
Set SVNPath. The SVNPath line should be set to the same place your created the repository with the svnadmin command. So I have…
SVNPath /home/svn
Turn on authentication:
AuthType Basic AuthName "Subversion Repository" AuthUserFile /etc/apache2/dav_svn.passwd Require valid-user
Now save and close the file.
Create user on the repository. To do it – use the following command:
sudo htpasswd2 -cm /etc/apache2/dav_svn.passwd
Note that you should only use the -c option the FIRST time that you create a user. After that you will only want to use the -m option, which specifies MD5 encryption of the password, but doesn’t recreate the file.
Restart apache:
sudo /etc/init.d/apache2 restart
The end.
Everything should be ok right now. You should have an access to your SVN repository via web browser. Try to look at it via http://your_domain/svn.
If you don’t know any of SVN commands – learn them via this site or this one.
Hello, I'm Karol Zielinski, internet evangelist, an entrepreneur, project manager and a web developer from Gdynia, Poland. I like creative design, good advertisement, social media and all kind of stuff around the web.