1、安装
yum install cvs
yum install xinetd
2、修改/etc/xinetd.d/cvs
# 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
{
###
disable = no
###
port = 2401
socket_type = stream
protocol = tcp
wait = no
user = root
passenv = PATH
server = /usr/bin/cvs
# env = HOME=/var/cvs
###
server_args = -f --allow-root=/home/cvsroot pserver
###
# bind = 127.0.0.1
}
3、执行
groupadd cvs
useradd -g cvs -s /sbin/nologin cvsroot
passwd cvsroot
4、初始化cvs服务
cvs -d /home/cvsroot init
5、执行
chown -R cvsroot /home/cvsroot
chown -R cvsroot.cvs /home/cvsroot
chmod -R ug+rwx /home/cvsroot
chmod 644 /home/cvsroot/CVSROOT/config
6、添加用户
useradd -g cvs -M cvsuser
passwd cvsuser
7、执行
cp /etc/shadow /home/cvsroot/CVSROOT/passwd
chmod 644 /home/cvsroot/CVSROOT/passwd
8、修改/home/cvsroot/CVSROOT/passwd
删除不需要cvs服务的用户所在的行。去掉每行第二个冒号以后的所有内容,并添上字符串cvsroot。留下来的用户名即为可以使用cvs的用户