Linux下配置CVS服务器
时间:2009-03-23 来源:sjhf
1.redhat下缺省安装CVS 查询版本信息 [root@localhost ~]# cvs -v Concurrent Versions System (CVS) 1.11.17 (client/server) 2.建立cvs用户组和cvsroot用户 groupadd cvs useradd cvsroot –g cvs passwd cvsroot 3.改变/home/cvsroot的目录属性 chmod 775 /home/cvsroot 4.初始化cvs源代码库,此操作生成目录/home/cvsroot/CVSROOT,其下为一些初始化文件 cvs -d /home/cvsroot init 5.创建文件passwd htpasswd –c /home/cvsroot/CVSROOT/passwd jeff jeff是登陆cvs服务器的用户名. CVS系统默认使用system user 登陆,需做如下修改: [1]打开 /home/cvsroot/CVSROOT/config 将第二行的 #SystemAuth = no 去掉注释,即改为 SystemAuth = no [2]打开/home/cvsroot/CVSROOT/passwd 在jeff:xxxxx后面加上:cvsroot,即 jeff:xxxxx:cvsroot 这样就可以使用用户名jeff登录了(而不必使用系统用户cvsroot). 6.检查是否加入cvs服务(redhat缺省就有cvs服务) vim /etc/services cvspserver 2401/tcp #pserver cvs service cvspserver 2401/udp #pserver cvs service 7.使用xinetd方式启动服务 在目录/etc/xinetd.d下新建并编辑文件cvspserver,该文件名必需与上面的/etc/services中的cvspserver名字一致 cd /etc/xinetd.d vim cvspserver 文件内容:(这里必需注意,所有的等号两边都必须有一个空格!否则找不到服务) service cvspserver { disable = no flags = REUSE socket_type = stream wait = no user = root server = /usr/bin/cvs server_args = -f --allow-root=/home/cvsroot pserver log_on_failure += USERID } 8.重新启动xinetd [root@localhost ~]# /etc/init.d/xinetd restart 停止 xinetd: [ 确定 ] 启动 xinetd: [ 确定 ] 9.检查cvspserver服务是否已经启动 [root@localhost ~]# netstat -l|grep cvspserver tcp 0 0 *:cvspserver *:* LISTEN 如果没有这一行,很有可能是service cvspserver{}中没有注意空格问题. 10.使用Eclipse检验 在Window-Open Perspective-CVS Repository Exploring下 New-Repository Location -Finish-配置完成. |
相关阅读 更多 +