Chinaunix首页 | 论坛 | 博客
  • 博客访问: 762396
  • 博文数量: 790
  • 博客积分: 40560
  • 博客等级: 大将
  • 技术积分: 5065
  • 用 户 组: 普通用户
  • 注册时间: 2008-08-28 16:29
文章分类

全部博文(790)

文章存档

2011年(1)

2008年(789)

我的朋友

分类: LINUX

2008-08-28 17:15:14

 
重装了一次系统,重装了N次的cvs,终于让linux下的cvs理论上可以进行开发。

还要感谢超少在忙VB时热心的做测试……

虽然现在是凌晨3点整,还是得总结一下:

1、咱先把CVS装上吧

首先确定系统中没有安装CVS,如果没有则安装:
yuminstallcvs注:fedora中可以使用光盘安装,个人认为容易点哦

2、确认系统中是否安装xinetd,在Fedora6中这个没有默认安装。如果没有安装则安装:
yuminstallxinetd注:这个我是用命令行在网上自动下载安装的,中间还出现了个错误,忽略了

3、修改/etc/xinetd.d/cvs

[root@fc6CVSROOT]#cat/etc/xinetd.d/cvs
#default:off
#description:TheCVSservicecanrecordthehistoryofyoursource\
#files.CVSstoresalltheversionsofafileinasingle\
#fileinacleverwaythatonlystoresthedifferences\
#betweenversions.
servicecvspserver
{
disable=no
port=2401
socket_type=stream
protocol=tcp
wait=no
user=root
passenv=PATH
server=/usr/bin/cvs
#env=HOME=/zyf/cvs
server_args=-f--allow-root=/zyf/cvspserver
#bind=127.0.0.1
}

4、初始化cvs服务
cvs-d/zyf/cvsinit
注:这个路径要和/etc/xinetd.d/cvs中的一致,并且可以随便根据自己的需要定制.

5、增加用户
groupaddcvs
useraddcvsroot-gcvs

6、设置目录权限
chmod777/zyf/cvs

7、修改/zyf/cvs/CVSROOT/config文件
[root@fc6CVSROOT]#catconfig
#Setthisto"no"ifpservershouldn''tchecksystemusers/passwords
SystemAuth=no注:这里默认是注释掉的。

#PutCVSlockfilesinthisdirectoryratherthandirectlyintherepository.
#LockDir=/var/lock/cvs

#Set`TopLevelAdmin''to`yes''tocreateaCVSdirectoryatthetop
#levelofthenewworkingdirectorywhenusingthe`cvscheckout''
#command.
#TopLevelAdmin=no

#Set`LogHistory''to`all''or`TOEFWUPCGMAR''tologalltransactionstothe
#historyfile,orasubsetasneeded(ie`TMAR''logsallwriteoperations)
#LogHistory=TOEFWUPCGMAR

#Set`RereadLogAfterVerify''to`always''(thedefault)toallowtheverifymsg
#scripttochangethelogmessage.Setitto`stat''toforceCVStoverify
#thatthefilehaschangedbeforereadingit(thiscantakeuptoanextra
#secondperdirectorybeingcommitted,soitisnotrecommendedforlarge
#repositories.Setitto`never''(thepreviousCVSbehavior)toprevent
#verifymsgscriptsfromchangingthelogmessage.
#RereadLogAfterVerify=always

注:这个更改是为了用户验证的时候忽略系统用户,这样可以避免建立很多的系统帐户,而影响安全性。

8、增加/zyf/cvs/CVSROOT/passwd文件
[root@fc6CVSROOT]#catpasswd
zyf:woXRXXMqwnmWs:cvsroot
注:这个密码文件中第2段是md5的密码。多个用户为每行一个.这个密码真的不太好得到,每次都是建用户。

9、增加/zyf/cvs/CVSROOT/readers文件
这个文件中存储着所有只读用户的用户名,一行一个.

10、增加/zyf/cvs/CVSROOT/writers文件
这个文件中存储着所有可写权限的用户名,一行一个.
注:同一个用户不要在/zyf/cvs/CVSROOT/readers和/shanmin/cvs/CVSROOT/writers中都填写,如果都填写则以/zyf/cvs/CVSROOT/readers中的为准。

11、关闭SELinux
[root@~]#setenforce0
注:CVS和SELinux有“冲突”,必须关闭,不然客户端会提示没有权限。

12、启动服务
servicexinetdstart

13、防火墙开2401端口注:我是把防火墙关了。

还要注意:writers一定要设置好权限,为了这个颇费了一阵子劲儿。

阅读(286) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~