On this page
CVS Installation and Configuration
Installation
Debian
apt-get install cvs xinetd
Red Hat
up2date cvs
Creating Admin Group and Directories
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
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:
# 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:
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:
cvsadmin:x:509:username
Last updated 26 Dec 2008, 18:57 +0200.