... because from time to time I'm a web developer, too
About me
Projects
Contact
Links

Subversion server, with web access on ubuntu

October 29, 2009 | linux, tools
author: Karol Zielinski | comments: 0 | views: 1767
Tags: , , ,

Today I will present how to install subversion server (+ repository) with the apache module and web access protected by password.

What is Subversion?

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.

Create SVN repository

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

Install everything

sudo apt-get install subversion libapache2-svn

Configure Apache

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.

Bookmark and Share
Post Subversion server, with web access on ubuntu to develway Post Subversion server, with web access on ubuntu to Delicious Post Subversion server, with web access on ubuntu to Digg Post Subversion server, with web access on ubuntu to Facebook Post Subversion server, with web access on ubuntu to Reddit Post Subversion server, with web access on ubuntu to StumbleUpon

Related news and resources

Write a comment

Karol Zielinski :: Just a tech stuff 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.

Most popular posts

Much more links

Karol Zielinski    |   contact me
Gdynia, Poland
RSS - Just a tech stuff - python, java blog - web development blog Karol Zielinski on twitter Karol Zielinski on LinkedIn Karol Zielinski on facebook Karol Zielinski on delicious Karol Zielinski on digg Karol Zielinski on flickr Karol Zielinski on stumbleupon Karol Zielinski on technorati