Add a user ‘cvs‘ and a group ‘cvs‘ #useradd -M -s /sbin/nologin cvs #useradd -M -s /sbin/nologin anonymous
Edit /etc/group to add another user to cvs group #vi /etc/group cvs:x:502:user1,user2,anonymous
Check whether the following 2 lines has been added on file /etc/services cvspserver 2401/tcp cvspserver 2401/udp
If can’t find, you have to add the lines.
Check whether xinetd service has installed on your system, by type on terminal: #service xinetd status
If xinetd not yet installed on your system, on Fedora Core you can install by type: #yum install xinetd
For others distro you have to find by your self
Create a configuration file, name it cvs in /etc/xinetd.d #vi /etc/xinetd.d/cvs
Add the following lines into it
service cvspserver
{
disable = no
socket_type = stream
protocol = tcp
wait = no
user = root
passenv = PATH
server = /usr/bin/cvs
server_args = -f --allowroot=/usr/local/cvsroot pserver
}
Start/Restart xinetd service #/etc/init.d/xinetd restart
Check whether port for CVS service is aktivated #nmap localhost
Create a repository server, the location of repository (CVS root) must be same as server_args value on file /etc/xinetd.d.
First, do initialization #cvs -d /usr/local/cvsroot init
Create folder /usr/local/cvsroot and set access right # export CVSROOT=/usr/local/cvsroot
# chown -R cvs.cvs $CVSROOT
# chmod ug+rwx $CVSROOT
# chmod o-rwx $CVSROOT
# chmod g+s $CVSROOT