Repository Initialization

First create a directory to be used as CVS repository and initialize it as shown below.

[root@techpulp ~]# mkdir /cvsroot
[root@techpulp ~]# chmod 1777 /cvsroot

Initialize the repository for the first time

[root@techpulp ~]# cvs -d /cvsroot init

Install inetd or xinetd

The CVS server requires either legacy “inetd” or latest “xinetd” package be installed in the system. If you don’t know how to find it, look for the presence of “/etc/inetd.conf” file for “inetd” package and look for the presence of “/etc/xinetd.d” directory for “xinetd” package. If none of them is present, you should install “xinetd” package. You can install a package using “yum” in Fedora or RedHat Linux and using “apt-get” in Ubuntu or Debian Linux.
In Fedora or RedHat Linux,

[root@techpulp ~]# yum install -y xinetd

In Ubuntu/Debian,

[root@techpulp ~]# apt-get xinetd

Configure inetd or xinetd

If the system has inetd, open “/etc/inetd.conf” file and add the following line.

echo "2401  stream  tcp  nowait  root  /usr/bin/cvs cvs -f --allow-root=/cvsroot pserver"

If the system has xinetd, create a file “/etc/xinetd.d/cvspserver” with the following text in it.

service cvspserver
{
	port        = 2401
	socket_type = stream
	protocol    = tcp
	wait        = no
	user        = root
	passenv     = PATH
	server      = /usr/bin/cvs
	server_args = -f --allow-root=/cvsroot pserver
}

Enable inetd or xinetd service

Now ensure that the “inetd” or “xinetd” service is enabled in the system and running. In case of RedHat or Fedora Liux, you can do the following.

For inetd,

[root@techpulp ~]# /sbin/chkconfig --level 12345 inetd on
[root@techpulp ~]# /sbin/chkconfig --list inetd
inetd          0:off   1:on   2:on   3:on    4:on    5:on    6:off
[root@techpulp ~]# /sbin/service inetd restart

For xinetd,

[root@techpulp ~]# /sbin/chkconfig --level 12345 xinetd on
[root@techpulp ~]# /sbin/chkconfig --list xinetd
xinetd          0:off   1:on   2:on   3:on    4:on    5:on    6:off
[root@techpulp ~]# /sbin/service xinetd restart

Firewall Issues

If Firewall is present in the system, the TCP connection will be reset for CVS users. The CVS server operates on port 2401 (TCP). You need to open port 2401 for allowing incoming CVS connections from CVS users.

Verifying CVS access from remote system

A user must have a valid user account in the server system to connect to cvs server. In the following CVSROOT example, “nick” is the user name of the account in CVS server (IP 192.168.200.200) and /cvsroot is the base of CVS repository at server.

[nick@techpulp ~]# export CVSROOT=:pserver:nick@192.168.200.200:/cvsroot
[nick@techpulp ~]# cvs login
Password:
[nick@techpulp ~]# cvs co project1