Install ViewCVS on RH FC2

This article was first written in May 2005 for the BeezNest technical
website (http://glasnost.beeznest.org/articles/259).

Introduction

This article is intended to help system administrators with very moderate knowledge of RedHat Fedora (Core 2) install ViewCVS 0.9.3

Getting the file

Apparently, there is no packaged version of ViewCVS for RHFC2 coming from a reliable source, so go get it on SourceForge (in this case, Ireland mirror) - ViewCVS from SourceForge You can do this like this:
wget http://heanet.dl.sourceforge.net/sourceforge/viewcvs/viewcvs-0.9.3.tar.gz

Trying quick start

Then the ideal solution would be to tell you to read the INSTALL file in the viewcvs archive, but it is pretty incomplete if you want to do it quick. First, the "GUI Operation" section says you can launch viewcvs right now, but this will merely result in a Python error:
Traceback (most recent call last):
  File "/home/ywarnier/viewcvs-0.9.3/standalone.py", line 511, in ?
    import viewcvs
ImportError: No module named viewcvs

Installing

So we have to do the whole install anyway. The "INSTALLING VIEWCVS" section is useful to state what packages should be installed for ViewCVS.cgi to work. Launch ./viewcvs-install as root user and answer the questions (the default value can be used by pressing "Enter").

Configuring

Edit /usr/local/viewcvs-0.9.3/viewcvs.conf and change the settings accordingly to your cvs install (probably at least cvs_roots) Edit /etc/httpd/conf/httpd.conf and add something like
ScriptAlias /viewcvs/ "/usr/local/viewcvs-0.9.3/cgi/"

Fixing missing RCS

Then if you try the alias in a browser (http://localhost/viewcvs/viewcvs.cgi), it might work, but if it doesn't, it is probably because RCS is not installed on your computer (even if the error is more about something like the files not corresponding to the filter). You can grab a RCS package here or do:
wget http://linuxsoft.cern.ch/cern/7.3.X/i386/RedHat/RPMS/rcs-5.7-15.i386.rpm
rpm -Uvh rcs-5.7-15.i386.rpm

Done

That should work now. Enjoy.

Misc

This article provides with a way to add PHP syntax highlighting in ViewCVS.