Select Page

Here are some handy instructions for setting up a CVS server. I’m really posting them for my own benefit, but perhaps this will help someone else out there. I’ll be posting a follow up sometime with a walk-through of basic cvs use.
Server Setup

  1. .On your Red Hat 7.1 or higher box (I recommend this because it’s what I’ve used), make sure cvs is installed. If it’s not, get it and install it.
  2. .Decide where you’re going to put CVS. I installed it in /home/cvs/cvs
  3. .Edit the file
    /root/.bash_profile

    and add the variable

    CVSROOT=/home/cvs/cvs

    as well as adding

    CVSROOT

    to the list of variables in the export list.

     

  4. .At the prompt, type:
    $CVSROOT

     

  5. .The console should return:
    /home/cvs/cvs is a directory
  6. .If it doesn’t, at the prompt, type:
    export CVSROOT=/home/cvs/cvs

     

  7. .Go to the directory you want to be the repository (i.e.
    /home/cvs/cvs

    ). Once inside, at the prompt, type:

    cvs init

     

     

  8. .This will create a folder within your repository called
    CVSROOT

    . Enter that directory.

  9. .Now we will set up users. For the first user, type:
    htpasswd -c passwd username

     

  10. .You will be prompted to enter the user’s password. Make sure you remember it.
  11. .For each additional user, type:
    htpasswd passwd username
  12. .For each additional user, you’ll enter a password.
  13. .Edit the file
    passwd

    where you will see each user in the following format: username:scrambled password. Add to the end of each one :projectname so that each user is now username:scrambledpassword:projectname

  14. .Make a new file in
    /etc/xinetd.d/

    called

    cvspserver

     

     

  15. .In that file, put the following:
    # CVS configuration for xinetd don't forget to specify your CVSROOT in
    #  /etc/cvs/cvs.conf.
    
    service cvspserver
    {
            disable             = no
            socket_type         = stream
            protocol            = tcp
            wait                = no
            user                = root
            server              =/usr/bin/cvs
            server_args         = -f --allow-root=/home/cvs/cvs pserver
            log_type            = SYSLOG authpriv
            log_on_success      = HOST PID
            log_on_failure      = HOST
    
    
    }

     

  16. .Restart the xinetd service.
  17. .Run
    netstat -pant

    to see if the server is now listening on port 2401.