P U R E B S D 
OpenBSD and FreeBSD resources 
  /root | OpenBSD | FreeBSD
   >>  Main | System | Network | Daemons | Security | Software | Various

Sections  

DJBDNS  
Qmail  
NTP  
DHCP  
ProFTPD  
Apache  
CVS server  

MySQL  
Setting up a CVS server

Here I'll describe how to setup a CVS server that is accessed by CVS clients via the "pserver protocol". The end result is a service that CVS clients connect to in order to use the CVS repositories on your system.
  1. Edit /etc/inetd.conf to add the "cvs" service:
    cvspserver stream tcp nowait cvs /usr/libexec/tcpd /usr/bin/cvs -f --allow-root=/home/cvs pserver
     
  2. Edit /etc/services to add the cvspserver protocol:
    cvspserver 2401/tcp
     
  3. Edit /etc/hosts.allow to allow connections from certain hosts to the "cvs" service:
    cvs: 192.168.0. botte-coders.example.org .aars.it
     
  4. Add the "cvs" user mentioned in /etc/inetd.conf to /etc/master.passwd:
    cvs:*:80:80::0:0:CVS:/home/cvs:/usr/local/bin/bash
    Run pwd_mkdb -p /etc/master.passwd to regenerate /etc/passwd.

    Create the group "cvs":
    /etc/group:
    cvs:*:80:

    Create the home directory for user "cvs":
    mkdir /home/cvs
    chmod 700 /home/cvs
     
  5. Init the CVSROOT directory in /home/cvs:
    su -l cvs
    cvs -d /home/cvs init
     
  6. Create and/or edit the file /home/cvs/CVSROOT/passwd. This file will list the users able to connect to the "cvs" service:
    su -l cvs
    cd /home/cvs/CVSROOT
    touch passwd
    chmod 600 passwd
    vi passwd

    The file will look something like this:
    harry:ZrLzRsjAPL7iQ:cvs
    klaas:Rf0DZbqhHM.Z.:cvs
    sjaak:kLruwLTHOsOXT2:cvs
    cvsusers:ORA7SfF0sRkD.:cvs

    "harry", "klaas" and "sjaak" are the cvs users. "cvsusers" is the common user account for the developers working on a certain website project. It is mainly meant for doing cvs checkouts in the production environment.
     
  7. Finally, create the common user account "cvsusers" to keep your developers happy. You know how to do that, don't you? (-:
     
  8. Now all developers should set their CVSROOT environment and execute a cvs login:
    export CVSROOT=":pserver:<username>@yourserver.com:/home/cvs"
    cvs login
    cd ~public_html/
    cvs -q checkout PROJECTNAME
 

Contact | Feedback | License | Copyright © 2000,2001,2002,2003,2004,2005,2006 PureBSD.com
All rights reserved.
simonpam@purebsd.com