LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-16-2010, 04:36 AM   #1
ashishkhandelwal
Member
 
Registered: Jan 2010
Posts: 34

Rep: Reputation: 15
CVS installation and configuration


Hello everyone

I have been given a task to install and configure CVS(Control Version system) on linux server in such a way that every user with a user id and password in the network should be able to connect to CVS server where all code resides.Can anyone tell me the steps by which i can install and configure CVS to fulfill my boss requirement.

Thank you in advance.
 
Old 01-16-2010, 10:20 AM   #2
tronayne
Senior Member
 
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,479

Rep: Reputation: 1020Reputation: 1020Reputation: 1020Reputation: 1020Reputation: 1020Reputation: 1020Reputation: 1020Reputation: 1020
Here's the first thing you ought to do: go to http://ximbiot.com/cvs/manual and read it. I'm not being a smart alec, you need to have an understanding of what the Concurrent Versions System (CVS) is, how it works and what you need to do to get going.

Assuming your distribution either came with or provides a package for CVS, it will or will need to be installed on the server you've selected. You will need to work on that server and you will need root access there.

Until you have completed the following, do not attempt to execute CVS.

You will need to look at /etc/services. There should be these entries
Code:
cvspserver      2401/tcp   #CVS network server
cvspserver      2401/udp   #CVS network server
cvsup           5999/tcp   #CVSup file transfer/John Polstra/FreeBSD
The first two are mandatory, the last may or may not be there.

You will need to add a line to /etc/inetd.conf (or wherever inetd.conf lives) of this form if it's not already there:
Code:
#CVS services
cvspserver stream  tcp  nowait  root  /usr/bin/cvs cvs -f --allow-root=/usr/local/cvsroot pserver
# End of inetd.conf.
This entry assumes you're going to use TCP, referred in /etc/inetd.conf and that's probably your best bet (try to avoid UDP if you can). Note that after you make the entry in /etc/inted.conf you will need to do this:
Code:
prompt: head /etc/inetd.conf
# See "man 8 inetd" for more information.
#
# If you make changes to this file, either reboot your machine or send the
# inetd a HUP signal:
# Do a "ps x" as root and look up the pid of inetd. Then do a
# "kill -HUP <pid of inetd>".
# The inetd will re-read this file whenever it gets that signal.
The above is the first few lines of the file telling you what to do if you add or alter an entry.

Now, you may or may not want to do this but it's something I've done for years and I find it useful. I add a group (to /etc/group on the CVS server named cvsusesrs. By default, /usr/local/cvsroot (your source code repository) will be owner and group root. I change the group to cvsusers and change the mode of the directory (only the directory) to 0775; i.e., use your system groupadd utility to do this (see the man page for how to use the version on your system) then
Code:
chgrp cvsusers /usr/local/cvsroot
chmod 775 /usr/local/cvsroot
Then, on the CVS server only, add an administrative account for CVS. I use cvsadmin as the account name with group membership in users and cvsusers. Again, you don't need to do this but I find it useful when I have to fiddle around doing administrative tasks every so often (and you don't need to be logged in as root then). You would use the adduser utility to do this.

You must add an environment variable named CVSROOT on the CVS server, and it needs to be user-specific to at least the root account and, optionally, the cvsadmin account if you did that. The best way to do that is in a home directory .profile file
Code:
prompt: vi .profile
# Set the CVSROOT environment variable
CVSROOT=:pserver:${USER}@${HOSTNAME}:/usr/local/cvsroot
export CVSROOT
Note that you cannot duplicate all of the above on other servers; the ${HOSTNAME} must be replaced with the actual node name of the CVS server on your network (this is where you really want to consider fixed-IP for the CVS server so it's easy to find on your network). Let's say that you name the server cvsserver and assign it the address 192.168.1.10, you make entries in /etc/hosts (on all the servers that need access) like this
Code:
prompt: vi /etc/hosts
# For loopbacking.
127.0.0.1               localhost
192.168.1.10            cvsserver
This is easier than screwing around with DHCP all the time.

Once you've got all that done, logged in as root, you can (finally!) execute
Code:
prompt: cvs init
to create the directories and files in /usr/local/cvsroot.

From here on, you need to really dig into the manual for how to configure things for whatever type of access you want to allow -- and every user will need to be familiar with the commands needed along with the environment variable setting (they'll all have to have CVSROOT set individually).

The above is the result of a wasted youth and I hope it helps some.
 
Old 01-21-2010, 04:07 AM   #3
ashishkhandelwal
Member
 
Registered: Jan 2010
Posts: 34

Original Poster
Rep: Reputation: 15
I have successfully configured CVS server and now developers are able to connect to cvs repositories.Now the problem is that i want that some users should be able to both read and write in the repository and some users should be only able to read in the repository.How can i do that.Another thing is that one of the foreigner client wants to see the code of a project.How can he connect to the repository and can only view that specific project code and not any other projects.
 
  


Reply

Tags
cvs


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
cvs repository cvs-1.11.21.tar.gz installation problem on redhat 5 linux version ajaytiwary Linux - Newbie 1 09-30-2007 01:58 PM
CVS configuration karan101 Linux - Software 1 12-31-2004 02:41 PM
cvs configuration gamecoders Linux - Software 2 04-11-2004 09:06 PM
samba/cvs configuration mehesque Linux - Networking 0 02-24-2004 07:31 PM


All times are GMT -5. The time now is 10:31 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration