Tuesday, 27 October 2009

How to Configure multi CVS repository in fedora

  1. First of all Install xinetd package.yum -y install xinetd

  2. Install cvs package.yum -y install cvs*

  3. Create a group cvs.

  4. Create a user cvsroot and assing it to cvs group.

  5. Now make sure that following entries are present in your /etc/services file if the entries are not present then add it manually save & exit.

  6. Than Create 2 directory to be used for cvs repository
# mkdir /test

# mkdir /test2

# chmod 777 /test

# chmod 777 /test2

Initialize the repository for the first time

# cvs -d /test init

# cvs-d /test2 init

Now this steps are important

execute # cvs -d /test1/ init

# cvs -d /test2/ init

now enter into /test1 or /test2
  1. Assign permission chmod 771 CVSROOT

  2. This time,all local real system users can log into CVS server with their own passwords.

    If you want to disable, you can do by:

# chmod 644 /test/CVSROOT/config

# chmod 644 /test2/CVSROOT/config

Here you need to uncomment the line where #SystemAuth = yes. And set SystemAuth = no.

  1. Check your /etc/xinetd.d/cvs file and check that following entries are available and if now as above add it manually for multi cvs repository.

Entry will look like this:-

# default: off

# description: The CVS service can record the history of your source

# files. CVS stores all the versions of a file in a single

# file in a clever way that only stores the differences

# between versions.

service cvspserver


port = 2401

socket_type = stream

protocol = tcp

wait = no

user = test

server = /usr/bin/cvs

server_args = -f --allow-root=/test --allow-root=/test2 pserver


now save & exit this file.

  1. Now restart your xinetd service using following command

#service xinetd restart or /etc/init.d/xinetd restart

#chkconfig xinetd on

Now Disabled firewall & selinux.

Then now your system user cannot use cvs services with their own system password.

# cd /test1/CVSROOT or cd /test2/CVSROOT

# touch passwd (make passwd file manually)

If passwd file is not available then create user by executing following commands:-

# htpasswd -d -c /test1/CVSROOT/passwd user

# htpasswd -d -c /test2/CVSROOT/passwd user

To add additional user:-

# htpasswd -d /test1/CVSROOT/passwd user2

Check cvs Repository-:

# su - user1

# export CVSROOT=:pserver:user1@localhost:/test1

# cvs login

There should be no error when you have successfully login to the CVS server.