Install & Configure CVS on RHEL, Fedora 9/10.

Hi Friends,
I am Sharing method to Install & configure a basic steps to installing and configure CVS on RHEL Fedora 9 /10.

  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.

    You can check entries by executing this command cat /etc/services | grep cvspserver

    cvspserver 2401/tcp # CVS client/server operations

cvspserver 2401/udp # CVS client/server operations

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

    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 = root

    server = /usr/bin/cvs

    server_args = -f –allow-root=/home/cvsroot pserver

    }

  2. Now restart your xinetd service using following command

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

  3. Now allow port 2401 which is cvspserver port from iptables and also allow

    SELinux exceptions.you can do that by doing this ( In “System”->”Administration”->”Security Level and Firewall”, add firewall exception of port “2401” corresponding to “cvspserver” service, and also remember to “Modify SELinux policy”->”SELinux Service Protection”->”Disable ELinux Service Protection for cvs”. )

    Now this steps are important

  4. Login as a “cvsroot”

  5. execute cvs -d /home/cvsroot/ init

  6. now enter into /home/cvsroot/

  7. Assign permission chmod 771 CVSROOT

  8. 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:

  9. chmod 644 /home/cvsroot/CVSROOT/config

  10. vim CVSROOT/config

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

Then now your system users cannot use CVS service with their own system passwords, except you assign them manually in file /home/cvsroot/CVSROOT/passwd.

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

htpasswd -d -c /home/cvsroot/CVSROOT/passwd raghu (option -c is only use when you are creating first time)

To add additional user:-

htpasswd -d /home/cvsroot/CVSROOT/passwd rajiv

16. To control user access in CVS, there are three files in /home/cvsroot/CVSROOT/, respectively named passwd, readers, writers. The file readers and writers are not there by default, so you have to create them manually.

In file “passwd”, ithere stores the shadow files for username and password, following the rule:

{cvs usrname}:[encrypted pwd]:[equivalent system usrname]

where the second field is encrypted with crypt(3), just like in /etc/shadow.

The thrid field equivalent system usrname means the corresponding system priviledge the cvs usrname has.

In file “readers”, there stores the list of cvs usrnames of whom you want to enable to only have read acess.

Similarly, in file “writers”, there stores the list of cvs usrnames of whom you want to enable to only have read acess.

Now, let us suppose we have CVS users “raghu”, “rajiv”, “anonymous”. And we don’t want to give them system access, which means the corresponding system priviledge the cvs usrnames have are all null. So, we need to create an equivalent system user, which names “roadies”, who has no system priviledge at all.

$ useradd -g CVS -M -s /sbin/nologin roadies

Then edit file “passwd”, make it like:

raghu:$fajkdpaieje:roadies

rajiv:fjkal;ffjieinfn/:roadies

anonymous::roadies

Now suppose we want to let raghu has write acess while rajiv and anonymous only have read acess.

Then edit file “readers”, make it like:

rajiv

anonymous

And edit file “writers”, make it like:

raghu

Then it is all finished.

(14) Test login:

$export CVSROOT=:pserver:raghu@the_server_name:/home/cvsroot

$ cvs login

(System will ask for password for raghu)

Passwd:xxxxxxxx

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

Please Click on Google +1 button and Add your ratings if this works for you and you like it.

Enjoy CVS 🙂 Enjoy Linux and Open Source 🙂

Content Protection by DMCA.com

You can follow any responses to this entry through the RSS 2.0 feed. Both comments and pings are currently closed.


-->