手机版
你好,游客 登录 注册
背景:
阅读新闻

CentOS 5.3配置软件源以及CVS服务器

[日期:2010-08-15] 来源:Linux社区   作者:Linux [字体:大 中 小]

7 )、修改服务器配置

       在 /etc/xinetd.d/ 下找到 cvs 文件,修改成下面这样

service cvspserver

{

port                    = 2401
socket_type             = stream
protocol                = tcp
wait                    = no
user                    = root
passenv                 = PATH
server                  = /usr/bin/cvs
env                     = HOME=/bestcar
server_args             = -f --allow-root=/bestcar pserver
     # bind                    = 127.0.0.1
} 


<!-- [if gte vml 1]><v:shape id="_x0000_i1028" type="#_x0000_t75" style='width:414.75pt;height:206.25pt'> <v:imagedata src="file:///C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\msohtml1\10\clip_image005.png" o:title=""/> </v:shape><![endif]--><!-- [if !vml]--><!-- [endif]-->

8 )、 启动 cvs 服务

# /etc/rc.d/init.d/xinetd restart 重启动 xinetd 服务,需要注意,这个服务 CentOS5 默认并不安装,需要定制安装一下。

# netstat -lnp|grep 2401

tcp 0 0 0.0.0.0:2401 0.0.0.0:* LISTEN xxxxxx/xinetd

则说明 cvs 服务器已经运行。

PS. 如果发现没有输出,那么就证明配置有问题,可通过如下方式:

    ① . 将第七步里面的disable=yes 更改成disable=no

    ② . #/etc/rc.d/init.d/xinetd restart

    ③ . 通过 chkconfig --list 查看运行状态

              <!-- [if gte vml 1]><v:shape id="_x0000_i1029" type="#_x0000_t75" style='width:387pt;height:227.25pt'> <v:imagedata src="file:///C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\msohtml1\10\clip_image007.png" o:title=""/> </v:shape><![endif]--><!-- [if !vml]--><!-- [endif]-->

④ . 通过进程是看不到的,因为你的是通过 xinitd 来运行   ,也就是只有当客户端连接这个端口时 cvs 才会启动,所以通常是通过 netstat -an | less 来查看端口的状态的。

<!-- [if gte vml 1]><v:shape id="_x0000_i1026" type="#_x0000_t75" style='width:415.5pt;height:187.5pt'> <v:imagedata src="file:///C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\msohtml1\10\clip_image009.png" o:title=""/> </v:shape><![endif]--><!-- [if !vml]--><!-- [endif]-->

9 )、 注意要打开防火墙的 2401 端口,否则客户端还是连不上这个 cvs 的服务器。

10 )、 增加新用户。

用 root

#cd /

#chmod -R 775 cvsroot  让 cvsroot 组的所有成员都可以对 cvs 资源库目录的读写权限

#useradd -g cvsroot user0   创建新用户 user0 ,并且将其添加进入 cvsroot 用户组

#passwd user0    设置好密码

11 )、客户端连接

       在客户端安装 CVS ,服务器端的 IP 为: 192.168.12.241 ,然后在客户端输入

       cvs -d :pserver:user0@192.168.12.241/bestcar login

    ① . 错误提示为/bestcar /CVSROOT/config: Permission denied

           自己本身的用户 user0 已经加入到组中,并且组对 /bestcar 文件可读可写

    ② . 错误提示为:

cvs login: CVS password file /home/wq/.cvspass does not exist - creating a new file

该问题就是在客户端登录时要在 HOME 目录下有个 .cvspass 的文件即可。因此,解决方法就是在 /home/wq/ 下 :

linux
相关资讯       CentOS  CVS服务器 
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款