CVS tutorials
Setting up CVS on Linux/Solaris
Requirements
CVS - www.cvshome.org
CVS Installation
Follow the installation instructions. I've not had any problems at this stage but if you do then let me know and I'll add the info here.
CVS Setup
First add a cvs user and group:
groupadd cvs
useradd -c "CVS User" -g cvs -m -d /usr/home/cvs -s /bin/bash cvs
Make sure the cvs user is in the default group too, i.e, I have user simon in 'users' group so make sure the user cvs is in the 'users' group
This is to stop any problems occurring when updating or commiting code.
usermod -G users cvs
note: make sure user you use has default group of 'users' too...
Set up system variables and set cvs repository (init) - using bash here, alter for your required shell
export CVSROOT=/usr/home/cvs
cvs init
Add global CVSROOT variable and the text editor to use for the check-in message
Edit /etc/profile (all logins include this)
CVSROOT=/usr/home/cvs;
export CVSROOT
CVSEDITOR=vi;export CVSEDITOR
Edit /etc/inetd.conf to add cvs access
2401 stream tcp nowait root /usr/local/bin/cvs cvs -f --allow-root=/usr/home/cvs pserver
If you want to use 'cvspserver' as a symbolic name instead of 2401 (above) then add the following to /etc/services and change 2401 in the above command to 'cvspserver'
note: I did it this way as the first way failed....
cvspserver 2401/tcp
CVS Usage
cd to location of code to import (in the folder required)
in the command below, -m is description flag followed by the description in quotes
next is directory structure to use in the cvs repository (so repository code will sit in /home/cvs/sites/test)
next is vendor tag (I just default it to the project name)
and finally the last command is the starting tag (I just default it to start)
cvs import -m "test" sites/test/ projectname start
The best thing to do when importing for the first time is to try it out a few times till you know what its doing. If you get stuck then simply delete the 'sites' folder in /home/cvs (or wherever your cvs directory is) and start again. DONT delete this folder if you have a project on the go as you will lose it!


