Linux CVS确认系统中是否安装xinetd

运维 系统运维
首先确定系统中没有安装Linux CVS,如果没有则安装:yum install Linux CVS 注:fedora中可以使用光盘安装,个人认为容易点哦。在Fedora 6中这个没有默认安装。如果没有安装则安装:yum install xinetd 注:这个我是用命令行在网上自动下载安装的,中间还出现了个错误,忽略了

Linux CVS对于电脑使用的玩家的常用软件,然后我就学习及深入的研究Linux CVS,在这里和大家一起探讨Linux CVS的使用方法,希望对大家有用。重装了一次系统,重装了N次的Linux CVS,终于让linux下的Linux CVS理论上可以进行开发。还要感谢超少在忙VB时热心的做测试……虽然现在是凌晨3点整,还是得总结一下:

1、咱先把Linux CVS装上吧

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

2、确认系统中是否安装xinetd,

在Fedora 6中这个没有默认安装。如果没有安装则安装:yum install xinetd    注:这个我是用命令行在网上自动下载安装的,中间还出现了个错误,忽略了

3、修改/etc/xinetd.d/Linux CVS

  1. [root@fc6 Linux CVSROOT]# cat /etc/xinetd.d/Linux CVS   
  2. # default: off  
  3. # description: The Linux CVS service can record the history of your source \  
  4. #files. Linux CVS stores all the versions of a file in a single \  
  5. #file in a clever way that only stores the differences \  
  6. #between versions.  
  7. service Linux CVSpserver  
  8. {  
  9.  disable   = no 
  10.  port2401 
  11.  socket_typestream 
  12.  protocol  = tcp 
  13.  waitno 
  14.  userroot 
  15.  passenv   = PATH 
  16.  server    = /usr/bin/Linux CVS  
  17. #envHOME=/zyf/Linux CVS  
  18.  server_args= -f --allow-root=/zyf/Linux CVS pserver  
  19. #bind127.0.0.1  

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

5、增加用户
 groupadd Linux CVS
 useradd Linux CVSroot -g Linux CVS

6、设置目录权限

chmod 777 /zyf/Linux CVS

7、修改/zyf/Linux CVS/Linux CVSROOT/config文件

  1. [root@fc6 Linux CVSROOT]# cat config  
  2. # Set this to "no" if pserver shouldn't check system users/passwords  
  3. SystemAuth=no  注:这里默认是注释掉的。  
  4. # Put Linux CVS lock files in this directory rather than directly in the repository.  
  5. #LockDir=/var/lock/Linux CVS  
  6.  
  7. # Set `TopLevelAdmin' to `yes' to create a Linux CVS directory at the top  
  8. # level of the new working directory when using the `Linux CVS checkout'  
  9. # command.  
  10. #TopLevelAdmin=no 
  11.  
  12. # Set `LogHistory' to `all' or `TOEFWUPCGMAR' to log all transactions to the  
  13. # history file, or a subset as needed (ie `TMAR' logs all write operations)  
  14. #LogHistory=TOEFWUPCGMAR 
  15.  
  16. # Set `RereadLogAfterVerify' to `always' (the default) to allow the verifymsg  
  17. # script to change the log message.  Set it to `stat' to force Linux CVS to verify  
  18. # that the file has changed before reading it (this can take up to an extra  
  19. # second per directory being committed, so it is not recommended for large  
  20. # repositories.  Set it to `never' (the previous Linux CVS behavior) to prevent  
  21. # verifymsg scripts from changing the log message.  
  22. #RereadLogAfterVerify=always 

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

8、增加/zyf/Linux CVS/Linux CVSROOT/passwd文件

[root@fc6 Linux CVSROOT]# cat passwd
zyf:woXRXXMqwnmWs:Linux CVSroot

注:这个密码文件中第2段是md5的密码。多个用户为每行一个.  这个密码真的不太好得到,每次都是建用户。

9、增加/zyf/Linux CVS/Linux CVSROOT/readers文件

这个文件中存储着所有只读用户的用户名,一行一个.

10、增加/zyf/Linux CVS/Linux CVSROOT/writers文件

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

11、关闭SELinux

[root@~]#setenforce 0注:Linux CVS和SELinux有“冲突”,必须关闭,不然客户端会提示没有权限。修改/etd/services文件 ,加入以下内容:

  1. Linux CVSpserver    2401/tcp     # Linux CVS client/server operations  
  2. Linux CVSpserver    2401/udp     # Linux CVS client/server operations 

Linux CVS服务由inted来唤起,因此需要改动inetd提供的服务,我的redhat使用的是inetd 方式则在文件/etc/inetd.conf中加入如下的内容:Linux CVSpserver stream tcp nowait root /usr/bin/Linux CVS Linux CVS --allow-root=/home/Linux CVSroot pserver

FC6使用的是xinetd方式,所以在xinetd.d目录下添加需要启动的服务:

  1. cd /etc/xinetd.d  
  2. vi Linux CVSpserver 

文件内容:

  1. service Linux CVSpserver  
  2. {  
  3. disable = no 
  4. flags = REUSE 
  5. socket_type = stream 
  6. wait = no 
  7. user = root 
  8. server = /usr/bin/Linux CVS  
  9. server_args = -f --allow-root=/home/Linux CVSroot pserver  
  10. log_on_failure += USERID  

12.重新启动inetd或者xinetd:

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

13.检查Linux CVSpserver服务是否已经启动

netstat -l |grep Linux CVSpserver

结果如下:tcp 0 0 *:Linux CVSpserver *:* LISTEN以上结果全部通过,但是在客户机上执行Linux CVS -d :pserver:steven@192.168.211.72:/home/Linux CVSroot login 输入密码后,没有收到任何消息,即表示成功^_^ no news is a good news!!在客户端,设置环境变量如下:export Linux CVS_RSH=ssh export Linux CVSROOT=:pserver:username@ip:/home/Linux CVSroot

你可以

  1. echo $Linux CVS_RSH  
  2. ssh  
  3. echo $Linux CVSROOT  
  4. :pserver:username@ip:/home/Linux CVSroot 

这样你在客户端就可以直接输入 Linux CVS login登陆了其它操作都可以直接Linux CVS command 了

12、启动服务

service xinetd start

13、防火墙开2401端口 

 注:我是把防火墙关了。还要注意:writers一定要设置好权限,为了这个颇费了一阵子劲儿。

【编辑推荐】

  1. Linux配置文件与用户管理相关系统文件
  2. Linux交换分区简介与实验场景及过程
  3. 学习Linux操作系统推荐首先从Fedora开始
  4. Linux hostname主机名配置文件与文件 /etc/hosts解说
  5. Linux文件重定向和文件过滤器
责任编辑:佚名 来源: CSDN
相关推荐

2010-04-06 15:53:48

CentOS系统

2019-06-10 15:50:54

LinuxNTP命令

2009-08-10 09:49:35

2009-06-23 08:49:39

LinuxCVSCVSTRAC

2009-06-24 10:42:18

Linux

2009-12-18 09:48:26

Linux中应用

2009-12-03 13:56:05

Suse Linux开xinetd

2010-03-05 14:20:49

Ubuntu硬盘安装

2009-12-16 16:54:56

Linux操作系统

2017-01-05 14:42:49

LinuxUnix服务器

2011-08-23 17:46:20

xinetd中文man

2010-05-14 16:57:31

MySQL 安装备份

2011-02-25 09:32:01

2011-03-02 17:56:13

Xinetd启动Proftpd

2009-12-16 10:43:52

安装db2

2010-01-11 10:15:47

wine安装

2010-01-13 14:18:36

CentOS Open

2010-11-09 13:53:33

2010-03-02 10:15:41

Linux tomca

2014-08-08 09:56:28

LinuxSwap分区
点赞
收藏

51CTO技术栈公众号