在Linux下安装CVS服务

1、检查是否安装了cvs服务
# rpm -q cvs
# 如果没有安装,执行yum install cvs


2、检查是否安装了xinetd服务
# rpm -q xinetd
# 如果没有安装,执行yum install xinetd


3、创建cvs用户组
# groupadd cvs


4、创建cvsroot用户并修改密码
# useradd -g cvs cvsroot
# passwd cvsroot


5、修改cvs 配置文件
配置文件是/etc/xinetd.d/cvs
CentOS 7 没有这个文件,要自己创建,内容如下:
# 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=/var/cvs pserver
#       bind                    = 127.0.0.1
}
server_args 指定源代码库路径及认证方式,/var/cvs为源代码的路径,pserver为密码认证
disable改变no为yes


6、初始化cvs服务
# cvs –d /var/cvs init


7、重启xinetd服务
service xinetd restart


8、给cvs目录授权
chown -R cvsroot:cvs /var/cvs

猜你喜欢

转载自blog.csdn.net/ziele_008/article/details/78199984