- CVS is a version control system, which can be used to maintain update logs
for your program source. In this receipe, I am going to set-up a CVS server that can be accessed over the network.
I did not find any good help on the Internet for this purpose and hence decided to write my own mini-Howto.
- If you are using RedHat 9.0, then chances are that u already have CVS installed. Check if CVS is present by using
the command rpm -qil cvs. This should give some output. Most probably (and in this case) your CVS version
might be 1.11.2-10. If you don't have this, please download and install a suitable rpm from
http://www.rpmfind.net/. From this point onwards, I will assume that you have
installed the CVS and the binary resides in /usr/bin/cvs.
- Create a new user/group (cvs/cvs). Instructions to create user/group from command line can be found
here. Create the home directory /home/cvs
and make sure that that the permissions are set to 755.
- Check if /etc/services has the following lines. If they are not present Add them.
shashank@multimedia:~> cat /etc/services | grep pserver
cvspserver 2401/tcp # CVS client/server operations
cvspserver 2401/udp # CVS client/server operations
- Since RH9 uses xinetd, you will have to create a new file /etc/xinetd.d/cvspserver.
Copy the following to this file. (You will have to be root for doing this).
shashank@multimedia:/etc/xinetd.d# cat cvspserver
service cvspserver
{
disable = no
socket_type = stream
protocol = tcp
wait = no
user = cvs
server = /usr/bin/cvs
server_args = -f --allow-root=/home/cvs pserver
}
Re-Start the xinetd service using the command service xinetd restart
- Now log on to the machine as the CVS user that you had created before (e.g. ssh cvs@multimedia). Initialize the
repository using the command:
shashank@multimedia>setenv CVSROOT /home/cvs
shashank@multimedia>cvs init
This will create a directory named CVSROOT in /home/cvs.
You will have to add some files to this directory.
- Now go to /home/cvs/CVSROOT and add the writers file. This tells CVS which users are allowed to
access this repository.
cvs@multimedia:~/CVSROOT> cat writers
shashank
You will also have to create a passwd file. This file contains entries similar to:
cvs@multimedia:~/CVSROOT> cat passwd
shashank:sFpEmIun2VTvc:cvs
You will need to create this entry using the htpasswd -nb shashank abc123 command. This command will only
outout the first two fields shashank:sFpEmIun2VTvc. You will have to manually add :cvs to the end.
- Now your CVS server is ready to allow you to checkout files in the repository you have created from
anywhere in the world. Try accessing it, by logging in some other machine say zidler and using the following
commands:
shashank@zidler>setenv CVSROOT :pserver:shashank@multimedia:/home/cvs
shashank@zidler>cvs login
Logging in to :pserver:shashank@multimedia:2401/home/cvs
CVS password: abc123
shashank@zidler>cvs checkout CVSROOT
cvs server: Updating CVSROOT
U CVSROOT/checkoutlist
U CVSROOT/commitinfo
U CVSROOT/config
U CVSROOT/cvswrappers
,...... ..... ......
----------------------------------------
- Play around with your CVS server by using different commands. This log will be updated when I do that.
- I have even tested this with Tortoise CVS system on windows and
it works perfectly. Installation for this is fairly simple, but requires a system reboot. After that
right-clicking the mouse button will show you the CVS options available.
- Also consider using VIEWCvs and
CVSGraph. Installation is pretty straighforward and
is clearly explained in the accompanying INSTALL files. Take a look at
our CVS Repository as an example.
I have modified the templates that come with VIEWCvs to adapt to my site.