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