Linux HOWTOs

About | Home | Search


HOWTO: viewvc
Description: Browser interface for CVS and Subversion repositories
Click here for ChangeLog
NOTE: I use GNU tar >= 1.13.25 so it's -j for .tar.bz2 files,
it's safe to assume that make, gcc, binutils, fileutils/coreutils, gawk, sed, and grep are prerequisites for almost everything


# ViewVC 1.1.20
# =============
# Prerequisites for CVS:
# Python >= 1.5.2, < 3.x
# RCS' rlog, rcsdiff, and co
# GNU diff (must have -u)
# A locally accessible CVS or Subversion repository
#
# Prerequisites for Subversion:
# Python >= 2.0, < 3.x
# Subversion >= 1.3.1 (and Python bindings)
#
# Optional:
# A web server like Apache HTTP
# MySQL >= 3.22 and MySQLdb >= 0.9.0
# Pygments >= 0.9 (syntax highlighting)
# CvsGraph >= 1.5.0 (graphical CVS tree)


# If you do want to install Pygments, install/upgrade it using
# 'easy_install' from setuptools:
su -c "easy_install --upgrade Pygments"


# Get ViewVC
cd
test -f installed/viewvc-1.1.20.tar.gz &&
 mv -f installed/viewvc-1.1.20.tar.gz
test ! -f viewvc-1.1.20.tar.gz &&
 wget http://viewvc.tigris.org/files/documents/3330/49275/\
viewvc-1.1.20.tar.gz

# Verify tarball w/ md5sum:
echo "f046a2b438a331a393015f3056650632  viewvc-1.1.20.tar.gz" | md5sum -c

# Extract the tarball
mkdir -p -m 0700 src
cd src
tar xzvf ~/viewvc-1.1.20.tar.gz
cd viewvc-1.1.20
test $UID = 0 && chown -R root:root .

# Become root to install it
su

# Read INSTALL, but here's a very, very shortened summary:
(echo ; echo ) | ./viewvc-install
cd /usr/local
test -L viewvc && rm viewvc
ln -s viewvc-1.1.20 viewvc
cd viewvc
test -d /usr/local/apache2/cgi-bin &&
 for script in viewvc.cgi query.cgi; do
  ( cp bin/cgi/${script} /usr/local/apache2/cgi-bin/
    chown root:nobody /usr/local/apache2/cgi-bin/${script}
    chmod 750 /usr/local/apache2/cgi-bin/${script})
 done
test -d /var/www/cgi-bin &&
 for script in viewvc.cgi query.cgi; do
  ( cp bin/cgi/${script} /var/www/cgi-bin/
    chown root:apache /var/www/cgi-bin/${script}
    chmod 750 /var/www/cgi-bin/${script})
 done

# Make sure MySQL's bin directory is in your PATH
test -f /etc/profile.d/mysql.sh && . /etc/profile.d/mysql.sh

# Now, fix up /usr/local/viewvc/viewvc.conf
#  (I have a sample here)
# Run /usr/local/viewvc/bin/make-database, using your root user and pw to
#  create it
# Use mysql_setpermission (or do it in SQL with 'mysql -p' to give read/write
#  permissions to the MySQL username and password you put in viewvc.conf
# For CVS, run '/usr/local/viewvc/bin/cvsdbadmin rebuild /cvs'
#  (where /cvs is your repo)
# Change the cvsmodule line in cvsgraph.com (if you enabled it) that has
#  "ttt" to ""
# Try http://localhost/cgi-bin/viewvc.cgi

# Become your non-root user again
exit

# Save the source for later
cd
mkdir -p -m 0700 installed
rm -f installed/viewvc-*.tar.*
mv viewvc-1.1.20.tar.gz installed/

Back to the list


Last updated: Wed, 29 Apr 2020 22:04:50 -0400
Jason Englander <jason at englanders dot us>