Linux CVS Server
服务器端配置
首先添加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
[C语言系列]C# 和 Linux 时间戳转换 [Web开发]PHP flock文件锁介绍 [Web开发]flock() Linux下的文件锁 [电脑应用]Linux下的六个免费的虚拟主机管理系统介绍 [电脑应用]Linux数据库大比拚 [操作系统]在Windows中玩转Linux操作系统 [Sql Server]Sql精妙语句--各种求值函数 [网页制作]网页表格之---多个表格纵向排列 [网页制作]JavaScript另类用法--读取和写入cookie [网页制作]号称非常安全的上网工具---360安全浏览器介绍
|