Concurrent Versions System (CVS) Installation and Configuration

What is CVS ?

CVS is a version control system, which allows you to keep old versions of files (usually source code), keep a log of who, when, and why changes occurred, etc., like RCS or SCCS. Unlike the simpler systems, CVS does not just operate on one file at a time or one directory at a time, but operates on hierarchical collections of directories consisting of version controlled files.

CVS helps to manage releases and to control the concurrent editing of source files among multiple authors. CVS allows triggers to enable/log/control various operations and works well over a wide area network.

Download CVS

CVS Documentation

First you need to install Openssh For this check here

Installing CVS in Debian

#apt-get install cvs

This will install the CVS binaries which you can now use to create the repository for storing your code.

When you do this you'll be asked a couple of questions - if you wish to create a repository or start a server. Answer with the defaults, which will be to not launch a server, if you answer yes here you'll be running an insecure server

In the following example We create a repository which is owned by the user and group cvs and is located at /home/cvs:

#useradd cvs

#groupadd cvs

#mkdir /home/cvs

#cvs -d /home/cvs init

#chown -R cvs:cvs /home/cvs

#chmod -R 770 /home/cvs

#chmod 770   /home/cvs/CVSROOT

Now any local account that needs to write to the repository should be added to the cvs group and will then be able to add and modify projects.

If they have remote access to the server which the repository is contained upon then they will be able to checkout copies as follows

#export CVS_RSH=ssh

#cvs -d :ext:[email protected].name:/home/cvs login

#cvs -d :ext:[email protected].name:/home/cvs co moduleName

They will be prompted for their login password and will be able to do a full checkout of the code.

Of course you add a module to CVS in the first place!

Assuming that you have a project held in a directory on the local machine which you wish to import simply run

#cd ~/project

#cvs -d /home/cvs import -m "Initial Import" project myname release

Once this is done you can move to a different directory and try to check it out:

#cvs -d /home/cvs checkout project

Setup CVS to allow anonymous read-only access to your repository

For this setup you need to answer the following question at the time of installation

Finally you'll be offered the chance to run the "CVS Peserver", to this question say yes.

Once you have the CVS server up and running you need to add a new system account with no shell for the anonymous user using the following command

#useradd -s /bin/false anonymous

The next step is to configure the anonymous user to be a valid user with no password for CVS logins. This involves adding a line to a file passwd beneath your CVSROOT directory.

Our CVS repository is located in /home/cvs, so for me the command is

#echo "anonymous:" >> /home/cvs/CVSROOT/passwd

Then to make sure this is only used for read-only access add the anonymous user to the file readers in the same directory

#echo "anonymous" >> /home/cvs/CVSROOT/readers

This should be sufficient to allow the anonymous user to login and checkout code without being able to modify anything.

The syntax for the client would be:

$ cvs -d :pserver:[email protected]:/home/cvs login
Logging in to :pserver:[email protected]:2401/home/cvs
CVS password:  [Enter here = blank password]

$ cvs -d :pserver:[email protected]:/home/cvs co module

The anonymous client will now be able to keep up to date with the codebase and not be able to modify anything upon the server. Attempting to commit a local change will result in the following error message:

#cvs [server aborted]: "commit" requires write access to the repository

#cvs commit: saving log message in /tmp/cvsXXX

Webinterface,Frontend or GUI tools for CVS


view CVS Repositories via HTTP
The ViewCVS software was inspired by cvsweb (by Henner Zeller). ViewCVS can browse directories, commit-logs, and specific revisions of files. It can display diffs between versions and show selections of files based on tags or branches.

This version support also subversion repository.

If you want to install this in your debian machine just run the following command

#apt-get install viewcvs


a CGI interface to your CVS repository
cvsweb is a WWW CGI script that provides remote access to your CVS repository. It allows browsing of the full tree, with configurable access controls. It will display the revision history of a file, as well as produce diffs between revisions and allow downloading any revision of the whole file.

If you want to install this in your debian machine just run the following command

#apt-get install cvsweb