Professional Documents
Culture Documents
a. Installation
i. Download CVS
To compile and install from source, untar the package into a directory. Then,
from within that directory, configure, make, and make install.
On Linux, this should automatically create a group called cvs. If that group
was not created, manually create the cvs group:
# groupadd cvs
Edit the /etc/group file to add other users to the cvs group (including the
anonymous user).
cvs:x:501:sandy,tom,billy,anonymous
service cvspserver
{
port = 2401
socket_type = stream
protocol = tcp
wait = no
user = root
passenv = PATH
server = /usr/local/bin/cvs
server_args = -f --allow-root=/cvs pserver
}
NOTE: be sure to change the "allow-root" value to the correct path of the CVS
repository (which is created in the next section).
b. Configuration
i. Create Directories
As the root user, decide where the CVS files will be stored and set the
environment variable CVSROOT to that location:
# export CVSROOT=/usr/local/cvsroot/
Make sure that the path chosen matches the path indicated in the
/etc/xinetd.d/cvspserver file, or that a symbolic link is created to point one to
the other.
Next, create the CVS root directory and change the ownership and permissions:
# mkdir $CVSROOT
# chown -R cvs:cvs $CVSROOT
# chmod ug+rwx $CVSROOT
# chmod o-rwx $CVSROOT
# chmod u+s $CVSROOT
# ln -s $CVSROOT /cvs
Login as one of the users in the CVS group. Set the CVSROOT environment
variable to equal the CVS root directory (as specified in the previous step). Run
the following command:
$ export CVSROOT=/usr/local/cvsroot/
$ cvs init
This command will exit silently but should have created a directory called
CVSROOT inside your CVS root directory (in other words $CVSROOT/CVSROOT).
While CVS can use the system /etc/passwd file to authenticate users, this is
not recommended. Create a file $CVSROOT/CVSROOT/passwd with the format:
username:crypt_password:run_as_user
Since only the cvs group can access the repository (as per our file
permissions), all users should run as the cvs users once authenticated. In more
advanced configurations, you can use several different usernames to further limit
which modules can and cannot be accessed. This will not be covered by this
document.
For the anonymous user, the password can be left blank. For the other users,
use a crypt tool to create a encrypted password (for instance, try htpasswd -n).
sally:$1$E7W5p/WI3ASSEDQIU.hi16m0:cvs
tom:$1$xbtEICBf$xssx8Yds4njDT6/:cvs
billy:$1$.cUuopYjkCtK0kqCZrsceEY1:cvs
anonymous::cvs
Next, to limit the anonymous user to read-only access, create a file called
$CVSROOT/CVSROOT/readers with only the following line:
anonymous
cd to /class/bfennema/project
Next
If your were importing your own program, you could now delete the original source.
(Of course, keeping a backup is always a good idea)