Friday, February 06, 2009

Make CVS service available in pserver mode

This process applied on Fedora.

1. Create a CVS repository, suppose the location is /home/cvs and configuration file will be /home/cvs/CVSROOT/config.

2. Edit /etc/services file to allow tcp/udp port 2401.
cvspserver 2401/tcp # CVS client/server operations
cvspserver 2401/udp # CVS client/server operations
cvsup 5999/tcp CVSup # CVSup file transfer/John Polstra/FreeBSD
cvsup 5999/udp CVSup # CVSup file transfer/John Polstra/FreeBSD
ssm-cvs 2477/tcp # SecurSight Certificate Valifation Service
ssm-cvs 2477/udp # SecurSight Certificate Valifation Service
Well, the first 2 lines should be enough.

3. Edit /etc/xinetd.d/cvs file to enable the CVS pserver.
[root@host]# cat /etc/xinetd.d/cvs
service cvspserver
disable = no
port = 2401
socket_type = stream
protocol = tcp
wait = no
user = root
passenv = PATH
server = /usr/bin/cvs
env = HOME=/home/cvs
server_args = -f --allow-root=/home/cvs pserver
4. Restart xinetd by running "/etc/init.d/xinetd restart".

5. Edit /etc/sysconfig/iptables to allow network packages pass through port 2401. Notice that the order of the rules is important.
-A INPUT -m state --state NEW -m tcp -p tcp --dport 2401 -j ACCEPT
6. If necessary, run "/usr/sbin/setenforce 0" to put SELinux to Permissive mode. See "man setenforce" for details. Or edit the /etc/selinux/config file to persist the change.

7. When necessary, create a /home/cvs/CVSROOT/passwd file to authenticate user logins. Details will be available in CVS document.

That's probably all necessary steps.


No comments: