Alex刺客

Dancing fingers, damage world. -- 舞动手指,破坏世界.

  BlogJava :: 首页 :: 新随笔 :: 联系 :: 聚合  :: 管理 ::
  57 随笔 :: 0 文章 :: 76 评论 :: 0 Trackbacks
1. 检查 cvs 跟 xinetd 是否已经安装 (cvs 多数系统默认已经安装)
1     $ rpm -qa | grep cvs
2     cvs-1.11.23-8.fc12.i686
3     $ rpm -qa | grep xinetd
4     xinetd-2.3.14-31.fc12.i686


2.如果没有安装执行以下命令
1      $ su
2      # yum install cvs xinetd

    
3.创建 cvs 组与 cvsroot 用户
1     # groupadd cvs
2     # useradd -m -g cvs -s /sbin/nologin cvsroot
3     # passwd cvsroot


4.cvs用户的目录权限配置
1     # cvs -d /home/cvsroot/ init
2     # chown -R cvsroot.cvs /home/cvsroot
3     # chmod -R ug+rwx /home/cvsroot
4     # chmod 644 /home/cvsroot/CVSROOT/config

    
5.修改cvs文件
1     # vim /etc/xinetd.d/cvs
2     
3     修改cvs文件
4     disable = yes
5     server_args  = ---allow-root=/home/cvsroot pserver

    
 1 service cvspserver
 2 {
 3         disable = yes
 4         port                    = 2401
 5         socket_type             = stream
 6         protocol                = tcp
 7         wait                    = no
 8         user                    = root
 9         passenv                 = PATH
10         server                  = /usr/bin/cvs
11         env                     = HOME=/var/cvs
12         server_args             = ---allow-root=/home/cvsroot pserver
13 #       bind                    = 127.0.0.1
14 }


6. 重启xinetd服务
1 # /etc/rc.d/init.d/xinetd restart

    
7.添加用户
   
1     # useradd -g cvs -M alexcvs
2     # passwd alexcvs
3     # cp /etc/shadow /home/cvsroot/CVSROOT/passwd
4     # chmod 0644 /home/cvsroot/CVSROOT/passwd 

    修改passwd文件,将除alexcvs之外的所有行删除,然后去掉每行第二个冒号以后的所有
    内容,并添上字符串cvsroot, 改为如下格式:
    alexcvs:ND5$J8N9BW5DKV.nPdxfdsh:cvsroot
   
1 # userdel -f alexcvs

8.在.bash_profile 添加一行

    export CVSROOT=:pserver:alexcvs@192.168.1.2:2401/home/cvsroot
    
9.用户初始化
    cvs login
    按提示输入口令
   
10.创建项目
    #cvs import -m "this is a test project" test v1 start
posted on 2010-08-23 04:53 Alex刺客 阅读(285) 评论(0)  编辑  收藏 所属分类: Linux

只有注册用户登录后才能发表评论。


网站导航: