安装xinetd
root操作
groupadd cvs
useradd -G cvs -g cvs -d /home/cvsroot cvsroot
passwd cvsroot
chown -R cvsroot.cvs /home/cvsroot
chmod -R 775 /home/cvsroot
/etc/services文件确保有
cvspserver 2401/tcp # CVS client/server operations
cvspserver 2401/udp # CVS client/server operations
修改/etc/xinetd.d/cvs
service cvspserver
{
port = 2401
disable = no
flags = REUSE
socket_type = stream
wait = no
user = root
server = /usr/bin/cvs
env = HOME=/home/cvsroot
server_args = -f --allow-root=/home/cvsroot pserver
log_on_success += USERID
log_on_failure += USERID
nice = 10
}
/etc/profile添加:
#set cvs environment
CVSROOT=/home/cvsroot
export CVSROOT
cvsroot操作
cvs -d /home/cvsroot init
cvsroot操作
chmod 640 /home/cvsroot/CVSROOT/config
chown cvsroot.cvs /home/cvsroot/CVSROOT/config
cvsroot操作
vi /home/cvsroot/CVSROOT/config
把里面的“SystemAuth=yes”的注释去掉,然后改为“SystemAuth=no”
CVSROOT目录下
htpasswd -c passwd 用户名 --添加用户
输入密码后,修改passwd
用户名:加密密码:cvsroot
重启xinetd(最好重启linux)
service xinetd restart
检查cvspserver服务是否已经启动
netstat -l |grep cvspserver
验证登陆
cvs -d pserver:用户名@localhost:/home/cvsroot login
环境:SELinux禁用 防火墙禁用(最好配一下,而不是禁止)
cvs permission denied
编辑/etc/selinux/config,找到这段:
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - SELinux is fully disabled.
SELINUX=enforcing
把 SELINUX=enforcing 注释掉:#SELINUX=enforcing ,然后新加一行为:
SELINUX=disabled
保存,关闭。