2007年5月22日星期二

CVS Install on Linux

CVS Install on Linux

 1 Create a cvs user and a cvs group to own repository files. We won't give any password to this user, so login will be disabled. We'll later add real users to the cvs group.

   $ su

        Password: {enter password}

       # /usr/sbin/groupadd cvs

     # /usr/sbin/useradd �CM �Cg cvs cvsadmin

            #/usr/sbin/useradd �CM �Cg cvs cvscommon

This command normally creates both a user named cvs and a group named cvs.

 

2 Create cvs repository directory in a location of your choice

# mkdir /var/cvsroot

# chown cvsadmin.cvs /var/cvsroot

 

3 Set the 'group sticky bit' on all directories used by CVS

# chmod -R g+ws /var/cvsroot

 

4 Initialize the repository using cvs init

# su cvsadmin

$ cvs �Cd /var/cvsroot init

$ ls -l /var/cvsroot

total 4

drwxrwsr-x 3 cvs cvs 4096 Mar 5 05:32 CVSROOT

 

5 Setting up config

            $ cd /var/cvsroot/CVSROOT

$ chmod u+w config

$vi config

... uncomment or change the line that defines auth...

for example: SystemAutho=no

 

6 Add virtual cvs users

       $ htpasswd  -c �Cd /var/cvsroot/CVSROOT/passwd admin

          Input password for admin

       $ htpasswd   �Cd /var/cvsroot/CVSROOT/passwd tester

          Input password for tester

       Map the virtual cvs users to system user, and the format is "cvsuser:password:systemuser".

       $ vi /var/cvsroot/CVSROOT/passwd

         Append ":cvsadmin" to admin, and append ":cvscommon" to tester.

$ exit

 

7 Start CVS Server

       Check if the cvspserver exists in the path "/etc/xinetd.d", if not please create one under Linux as following.

       #vi /etc/xinetd.d/cvspserver

 service cvspserver

{

        id              = cvspserver

        flags           = REUSE

        socket_type     = stream

        protocol        = tcp

        user            = root

        wait            = no

        server          = /usr/bin/cvs

        server_args     = -f --allow-root=/var/cvsroot pserver

        disable         = no

}

#service xinetd restart

#netstat �Cna |grep 2401

 The port for cvs server is 2401,  and check the server status.

 

9 Check the CVS Server status

          # export CVSROOT=:pserver:tester@localhost:2401/var/cvsroot

          #cvs login

              Input your password. All is ok if no problem.

         #cvs logout

 

10 Update cvs version

       #cd /usr/local/src

       #wget https://ccvs.cvshome.org/files/documents/19/874/cvs-1.12.12.tar.gz

       #tar zxpvf cvs-1.12.12.tar.gz

       #cd cvs-1.12.12

       #./configure

       #make

       #make install

      Install is finished now, please do check again.

       #cvs �Cversion

       #cvs login

          Input your password for tester

      #cvs logout

 

Your sincere,
------------
Henry Zhu
2007-05-23

没有评论: