`
javasee
  • 浏览: 926260 次
  • 性别: Icon_minigender_1
  • 来自: 北京
文章分类
社区版块
存档分类
最新评论

Linux CVS Server + jCVS-5.3.2 Client分布式开发(二)

阅读更多

Linux CVS Server<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

服务器端配置

首先添加cvs用户和用户组,以root用户运行下面命令(如果是FreeBSD 请用pw 命令):

# groupadd cvs

# useradd g cvs cvsroot

创建cvs的主目录:

# mkdir /export #注:/export是你的cvsroot目录。

修改/export目录的属组为cvsroot用户和cvs组权限为770使同组成员可以读写该目录:

# chown cvsroot /export

# chgrp cvs /export

# chmod 770 /export

初始化cvs服务的主目录:

# cvs d /export init

修改/etc/inetd.conf文件使cvs服务能够响应客户端的cvs请求,在/etc/inetd.conf文件里面加入一行:

cvspserver stream tcp nowait root /usr/bin/cvs cvs -b /usr/bin --allow-root /export pserver

修改/etc/services,如果该文件里没有下面两行请自己加上:

cvspserver 2401/tcp # CVS client/server operations

cvspserver 2401/udp # CVS client/server operations

请注意这里的服务器名cvspserver是和/etc/inetd.conf文件中一致的。

重新启动inetd进程使改变生效:

# /etc/rc.d/init.d/inetd restart或运行

# killall HUP inetd

也可以达到同样的目的。但在这里我建议你reboot

这时在cvs服务器上运行

$ netstat na|grep 2401

就应该可以看到cvs服务侦听在2401端口

tcp 0 0 0.0.0.0:2401 0.0.0.0:* LISTEN

这时cvs的服务器环境就基本搭建好了。

Redhat Linux pserver 启动:

如果是Redhat Linux 在xinetd.d中加一个文件。启动pserver

1修改/etc/services,如果该文件里没有下面两行请自己加上:

cvspserver 2401/tcp # CVS client/server operations

cvspserver 2401/udp # CVS client/server operations

2. 在/etc/xinetd.d/下创建cvspserver 文件。

service cvspserver{

disable=no

socket_type=stream

wait =no

user =cvsroot

server = /usr/bin/cvs

server_args = --allow-root=/cvsroot

log_on_suceess +=USERID

log_on_failure +=USERID

}

如果有多个源代码库,如下:

server_args = --allow-root=/cvsroot --allow-root=/product

3. 重启xinet.d

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics