InstallationLinux

Installation on Linux and Unix

Prerequisites

Get, Configure, Make, and Install

         tar -zxf cvsnt-2.0.xx.tar.gz
        rpm -e cvs 
        ./configure
        make
        make install

Install from RPM's

        rpm -e cvs 
        tar -zxvf cvsnt-*-rpm.tar.gz
        cvsnt-2.5.03.2382-1.i386.rpm
        cvsnt-database-mysql-2.5.03.2382-1.i386.rpm
        cvsnt-database-odbc-2.5.03.2382-1.i386.rpm
        cvsnt-database-sqlite-2.5.03.2382-1.i386.rpm
        cvsnt-protocol-gserver-2.5.03.2382-1.i386.rpm
        cvsnt-protocol-sserver-2.5.03.2382-1.i386.rpm
        rpm -ivh cvsnt*.rpm

CVS Server configuration

CVS Inetd configuration

You need to set up CVS to run under xinetd, inetd, or on startup with an init script. The typical configuration is to run CVSNT using xinetd or inetd depending on the distribution.

CVS run with xinetd

        service cvspserver
        {
                disable        = no
                socket_type    = stream
                wait           = no
                user           = root
                group          = root
                log_type       = FILE /var/log/cvspserver
                env            = 'HOME=/home/cvsroot'
                server         = /usr/local/bin/cvsnt
                server_args    = authserver
        }

CVS run with inetd

For inetd systems (e.g. Debian), simply add the following line to your /etc/inetd.conf. The account for starting cvs has to be 'root' to make PAM support work. Make sure your /etc/services knows about 'cvspserver'.

        cvspserver      stream  tcp     nowait  root     /usr/local/bin/cvsnt cvsnt authserver

Lockserver configuration

LockServer is a replacement for file based locks that eliminates some problems. LockServer reports not just that a lock exists, but also who is holding it and automatically removes stale locks. Because Lockserver is used by all CVS users and needs to persist across CVS sessions, you should run it as a daemon instead of with xinetd or inetd.

    $ cvslockd

Example Lockserver startup script: Red Hat 9

An example script to start your Lockserver at boot on Red Hat 9 is attached. To install it:

    su -
    cp cvslockd /etc/init.d/cvslockd
    chkconfig --add cvslockd
    chkconfig --list | grep cvslockd

Repository Setup

    cvs -d :local:/path/to/new/repository  init

Permissions

To be completed

To be added: Detail out CVS group / user and impersonation information

Active Directory Authentication

Assuming you have already set up Samba for Active Directory authentication using the winbind daemon, you can make CVSNT do likewise by adding the file /etc/pam.d/cvsnt with the contents

#%PAM-1.0
auth    sufficient      /lib/security/pam_winbind.so
auth    required        /lib/security/pam_unix.so
account sufficient      /lib/security/pam_winbind.so
account required        /lib/security/pam_unix.so

Also ensure that you do not have System''Auth=no in your CVSROOT/config file.

You can enable SSPI server support using the ntlm_wrap program that is part of the winbind installation. Uncomment the WinbindWrapper line in your /etc/cvsnt/PServer, substituting the correct location of the ntlm_wrap program.

Test

To do: List other protocols available and how to set them up! sserver, others?

Setting up :sserver:

*** THIS IS A WORK IN PROGRESS ***

(See the script on [WWW] http://lena.franken.de/linux/create_certificate.html for an easier way to do this).

First, you need to generate a certificate authority (if you have not done so already):

        /usr/lib/ssl/misc/CA.pl -newca

Press enter to let the script choose the filename. Then enter a suitable pass phrase (twice). Now you must enter at least the Country Name and the Organization Name. The other fields may be left blank.

Then, make a certificate:

        /usr/lib/ssl/misc/CA.pl -newreq-nodes

Here, you must enter at least the Country Name, the Organization Name, and the Common Name. The other fields may be left blank.

Sign the certificate:

        /usr/lib/ssl/misc/CA.pl -sign

Enter the passphrase from before, and answer 'y' twice.

Copy the first part of the generated newreq.pem (the lines from -----BEGIN RSA PRIVATE KEY----- to -----END RSA PRIVATE KEY----- inclusive) file to a new file named /etc/cvsnt/key.pem.

Copy the last part of the generated newcert.pem (the lines from -----BEGIN CERTIFICATE----- to -----END CERTIFICATE----- inclusive) to a new file named /etc/cvsnt/cert.pem.

Then edit /etc/cvsnt/PServer to include the lines

        CertificateFile=/etc/cvsnt/cert.pem
        PrivateKeyFile=/etc/cvsnt/key.pem

In addition to these steps, the /etc/cvsnt/cert.pem file must be made available to the clients.

TODO: now what?

Extra facilities: gserver

Note that the gserver -> Win2000 support is not entirely stable due to a lack of developer time. If security is not an issue then Unix CVSNT can also use an SSPI (NTLM) connection to the server

CVSNT can integrate with CVSNT servers running on Windows 2000 using the gserver protocol. This allows a secure, single-sign-on mechanism (particularly effective if you set up linux workstations to authenticate against ADS using LDAP). To make this work you need CVSNT compiled with the GSSAPI / gserver protocols and Kerberos5 libraries.

First get kerberos working (some basic instructions [WWW] here); you should be able to do

    $ kinit 
    Password for user@COMPANY.COM:

where COMPANY.COM is your Kerberos realm, and corresponds to your Windows 2000 ADS Domain. Test with the klist command to check you got a Ticket Granting Ticket:

    Ticket cache: FILE:/tmp/krb5cc_1234
    Default principal: user@COMPANY.COM

    Valid starting     Expires            Service principal
    08/19/03 11:25:04  08/19/03 21:25:04  krbtgt/COMPANY.COM@COMPANY.COM


    Kerberos 4 ticket cache: /tmp/tkt1234
    klist: You have no tickets cached

Then you can use a CVS root like:

    $ cvs -d :gserver:w2kserver.company.com:/repository ls
   ...
   <list of modules>
   $

Extra facilities: rcs wrappers

Standard RCS will parse most CVSNT repositories, but will throw up warnings about the new keywords used - this is normal and harmless. Use of advanced features such as binary and compressed deltas will render the file unreadable by RCS.
Note: These wrappers are available on the Win32 version of CVSNT as well

CVSNT provides wrappers for all read-only parts of the RCS process, which should be enough to use eg. ViewCVS on a CVSNT repository.

If you wish to continue using the standard RCS tools rather than the CVSNT RCS wrappers, specify --disable-rcs when running configure. You may need to modify your frontend to pass the '-q' option to RCS to suppress the warnings.

last edited 2007-04-27 18:57:17 by mondokat