Download, install and configure ViewVC for Subversion

by jagbir on April 22, 2008

ViewVC is a Subversion repository browser software having many useful features. You need python and a web browser to run it. If you are maintaining a Subversion server, you should install it to view repositories, files, branches, directories, versions or comparison between versions.

Step 1. Download and install
Get the latest version of viewvc from here, when writing of this article the latest version was 1.2-dev. I’m using the development branch, you can use more stable. Untar it and start installation:

$ tar xzf viewvc-1.2-dev.tar.gz
$ cd viewvc-1.2-dev
$ ./viewvc-install

Step 2. Installation
Answer simple questions. Default choice is okay for normal operation.

Step 3. Update Config
Edit its config file which is self explanatory. Various options are there, you should read carefully and make use of. For basic working just update following options related to your Subversion server:

$ cd /usr/local/viewvc-1.2-dev/
$ vi viewvc.conf
svn_roots = cgi-bin: /svn/cgi-bin
root_parents = /svn : svn
default_root = cgi
root_as_url_component = 1

here, root_parents is directory which contains all you repositories. It can be avoided in case your repositories are spread over multiple locations. default_root is the name of repository(set in svn_roots) to be displayed by viewvc automatically.

Step 4. Update Apache
Open your httpd.conf file for Apache settings and write:

$ vi /etc/httpd/conf/httpd.conf
ScriptAlias /viewvc /usr/local/viewvc-1.2-dev/bin/cgi/viewvc.cgi
ScriptAlias /queryvc /usr/local/viewvc-1.2-dev/bin/cgi/query.cgi

We are making a scriptalias to access viewvc through running its cgi script. The second line, which make alias of query.cgi is optional but recommended. It enables you to search for repositories, branches, files in your cvs/subversion.

ViewVC should run fine now, but in case you still found that its throwing some exception/error something like something like No module named svn found , pls proceed to the solution which I’ve posted here.

More related and helpful articles:
* 5 steps to secure your Linux Server
* Ensuring secure access to production Linux Servers
* Bash script to backup essential log files in Linux
* Quickly change your ssh port from defualt 22 to something higher
* SSH port forwarding from remote to local machine
* Save root or user history to check later
* Install and configure denyhost to prevent brute force attacks

  • merchant account

    Good writing here I really really like the way you write your blogs. I will continue to visit your site in the future to read more great blog posts like this one! This is an awesome post here. love on web fighters :)

  • Grafiktablett

    hi this blog entry was very helpful for me. But it was difficult to find it with Maybe you should improve it with seo plugins for wordpress like headspace. Just a tip ;)

  • Pingback: infinite gallery6

  • acid reflux

    Searched Google and ended up here – its good so I posted the link on my Facebook account !

  • jagbir

    Thanks acid reflux for comment and appreciation. Glad to know you find it helpful.. keep visiting :)

  • albanian airways

    I wanted to follow up and let you know how much I liked discovering your site today. I might consider it a great honor to operate at my company and be able to make real use of the tips shared on your blog and also be a part of visitors’ feedback like this. Should a position regarding guest article writer become offered at your end, i highly recommend you let me know.

  • vishal sahasrabuddhe

    good information and briefing about viewvc configuration in crisp way.

    here is some some information on ViewVC installation from source,

Previous post:

Next post: