Babar Haq

Monday, August 02, 2004

Installed cvs on red hat 9.
Quick Setup Of CVS Repository

Assumptions:
1.Red Hat Linux is installed
2.CVS rpm is installed (RPM is available on Red Hat CD if not installed)

Needed:
1.CVS Administration tool
Get the source file (.tar.gz format)from http://freshmeat.net/projects/cvsadmin
Extract
#tar -zxvf cvsadmin-x.x.x
#cd cvsadmin-x.x.x
type
# ./configure
type
# make
2.Create a user by the name of cvs using the following command
# useradd cvs

Repository Installation
1.Login in as root
2.Create repository using the following command
# cvs -d /home/cvsname init
The Directory can be created anywhere. cvsname can be replaced by any name you want to give your cvs root direcory. Normally cvsroot is used. After you have done this go to the directory you have created using the following command
# cd /home/cvsname
There must be a directory by the name of CVSROOT there. If its not there you have done something wrong so go back to steup 1 and start again.:)
3.Type
# export CVSROOT=/home/cvsname

4.Change owner and group of repository using the following command
# chown –R cvs.cvs /home/cvsname


5.Now to make cvs work on contemporary linux systems you have to use xinetd. Here is what you have to do
Save a config file in /etc/xinetd.d called cvspserver, (where the last line tells it the names(can be multiple) of your repositories):

service cvspserver
{
socket_type = stream
protocol = tcp
wait = no
user = root
passenv =
server = /usr/bin/cvs
server_args = --allow-root=/home/pauljohn/cvsroot -- allow-root=/home/pauljohn/cvsmisc pserver -f
}
Restart xinetd service by using the following command
# /etc/init.d/xinetd restart

Add User
1.Type
#cvsadmin add
Where username is the name of the user (with out the <>). You will be prompted to answer some simple questions. When asked for the system user to be used enter the user we created i.e cvs.

Thats all !