Installation

Debian

1
apt-get install cvs xinetd

Red Hat

1
up2date cvs

Creating Admin Group and Directories

1
2
3
4
5
6
7
adduser cvsadmin
mkdir -p /home/cvsadmin/repository
mkdir /home/cvsadmin/.lock
chown -Rf :cvsadmin /home/cvsadmin
chmod -Rf 775 /home/cvsadmin
chmod -Rf 777 /home/cvsadmin/.lock
ln -s /home/cvsadmin/repository /usr/local/cvsroot

Repository Initialization

1
2
3
export CVSROOT=/usr/local/cvsroot
cvs -d $CVSROOT init
chown -Rf root:cvsadmin /home/cvsadmin/repository/* && chmod -Rf 777 /home/cvsadmin/repository/*

Activating Lock Files

To ensure that lock files are stored in a directory writable by all, you need to modify the /usr/local/cvsroot-backup/CVSROOT/config file as follows:

1
2
# Put CVS lock files in this directory rather than directly in the repository.
LockDir=/home/cvsadmin/.lock

Xinetd Configuration

Add a file "/etc/xinetd.d/cvspserver" for the CVS PServer in the directory:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
service cvspserver
{
        port = 2401
        socket_type = stream
        protocol = tcp
        user = root
        wait = no
        disable = no
        type = UNLISTED

        # Debian
        server = /usr/bin/cvs
        # RedHat
        # server = /usr/local/bin/cvs

        server_args = -f --allow-root /usr/local/cvsroot pserver
}

User Management

Each user must have their own home directory and be the owner of it. By default, all users will have the ability to commit and write in each module (directories at the root of the repository) but not to create new modules. To allow a user to write inside the repository (create/delete modules, etc.), simply add them to the “cvsadmin” group by modifying the /etc/group file as follows:

1
cvsadmin:x:509:username

Last updated 26 Dec 2008, 18:57 +0200. history