Here's the first thing you ought to do: go to
http://ximbiot.com/cvs/manual and read it. I'm not being a smart alec, you need to have an understanding of what the Concurrent Versions System (CVS) is, how it works and what you need to do to get going.
Assuming your distribution either came with or provides a package for CVS, it will or will need to be installed on the server you've selected. You will need to work on that server and you will need root access there.
Until you have completed the following, do not attempt to execute CVS.
You will need to look at
/etc/services. There should be these entries
Code:
cvspserver 2401/tcp #CVS network server
cvspserver 2401/udp #CVS network server
cvsup 5999/tcp #CVSup file transfer/John Polstra/FreeBSD
The first two are mandatory, the last may or may not be there.
You will need to add a line to
/etc/inetd.conf (or wherever
inetd.conf lives) of this form if it's not already there:
Code:
#CVS services
cvspserver stream tcp nowait root /usr/bin/cvs cvs -f --allow-root=/usr/local/cvsroot pserver
# End of inetd.conf.
This entry assumes you're going to use TCP, referred in
/etc/inetd.conf and that's probably your best bet (try to avoid UDP if you can). Note that after you make the entry in
/etc/inted.conf you will need to do this:
Code:
prompt: head /etc/inetd.conf
# See "man 8 inetd" for more information.
#
# If you make changes to this file, either reboot your machine or send the
# inetd a HUP signal:
# Do a "ps x" as root and look up the pid of inetd. Then do a
# "kill -HUP <pid of inetd>".
# The inetd will re-read this file whenever it gets that signal.
The above is the first few lines of the file telling you what to do if you add or alter an entry.
Now, you may or may not want to do this but it's something I've done for years and I find it useful. I add a group (to
/etc/group on the CVS server named
cvsusesrs. By default,
/usr/local/cvsroot (your source code repository) will be owner and group
root. I change the group to
cvsusers and change the mode of the directory (only the directory) to 0775; i.e., use your system
groupadd utility to do this (see the man page for how to use the version on your system) then
Code:
chgrp cvsusers /usr/local/cvsroot
chmod 775 /usr/local/cvsroot
Then, on the CVS server only, add an administrative account for CVS. I use
cvsadmin as the account name with group membership in
users and
cvsusers. Again, you don't need to do this but I find it useful when I have to fiddle around doing administrative tasks every so often (and you don't need to be logged in as root then). You would use the
adduser utility to do this.
You must add an environment variable named
CVSROOT on the CVS server, and it needs to be user-specific to at least the
root account and, optionally, the
cvsadmin account if you did that. The best way to do that is in a home directory
.profile file
Code:
prompt: vi .profile
# Set the CVSROOT environment variable
CVSROOT=:pserver:${USER}@${HOSTNAME}:/usr/local/cvsroot
export CVSROOT
Note that you cannot duplicate all of the above on other servers; the
${HOSTNAME} must be replaced with the actual node name of the CVS server on your network (this is where you really want to consider fixed-IP for the CVS server so it's easy to find on your network). Let's say that you name the server
cvsserver and assign it the address
192.168.1.10, you make entries in
/etc/hosts (on all the servers that need access) like this
Code:
prompt: vi /etc/hosts
# For loopbacking.
127.0.0.1 localhost
192.168.1.10 cvsserver
This is easier than screwing around with DHCP all the time.
Once you've got all that done, logged in as root, you can (finally!) execute
to create the directories and files in
/usr/local/cvsroot.
From here on, you need to really dig into the manual for how to configure things for whatever type of access you want to allow -- and every user will need to be familiar with the commands needed along with the environment variable setting (they'll all have to have CVSROOT set individually).
The above is the result of a wasted youth and I hope it helps some.