FlyZhy.Org logo Projects - CVS Server

Before
HowTo
Installing
Configuring
Using
After

CVS is a version control system, an important component of Source Configuration Management (SCM). I always knew it, however, I used it just a few days ago.

Before

HowTo

Installing

Most of GNU/Linux distros have cvs installed as default, however if you are unlucky to type cvs with the response of

bash: cvs: command not found

you should check your Linux Install CD or download from the Internet.1

Configuring

The first thing to use cvs is to configure the CVS Server on your Linux system, and this is whole process to configure CVS server on my Slackware Linux system.

  1. Create a new group named cvs:
    #groupadd cvs
    
  2. Create a new user named cvsroot with cvs as its group:
    #useradd -g cvs -p ****** -s /bin/bash cvsroot
    
  3. Make home for cvsroot:
    #mkdir /home/cvsroot
    #chown cvsroot:cvs /home/cvsroot
    #chmod 771 /home/cvsroot
    
  4. Initialize cvs repository using cvsroot user:
    #su cvsroot
    #cvs -d /home/cvsroot init
    
  5. Modify the file /etc/inetd.conf by adding a line as follows:
    cvspserver	stream	tcp	nowait	root	/usr/bin/cvs	cvs -f --allow-root=/home/cvsroot pserver
    
  6. Modify the file /etc/services (if you always have the following line then donot change it):
    cvspserver	2401/tcp   #CVS network server
    
  7. Add your user to cvs group by add the name of user to the end of group cvs in file /etc/group:
    ... ...
    cvs:x:103:user
    
  8. Configure CVS Client for your user by setting the variable CVSROOT with a line added in your $HOME/.bashrc:
    export CVSROOT=":pserver:${USER}@${HOSTNAME}:/home/cvsroot"
    
    then execute
    #. ~/.bashrc
    
  9. Restarting cvs server (for slackware):
    #/etc/rc.d/rc.inetd restart
    

Using

#cvs login
Password: xxxxxx
#cd /path/to/your/project

After

You should set up an example project to test CVS server refer to Using section. And then read more materials about how to use cvs.


1. May be Google can help you to get this.