博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
第 178 章 cvs - Concurrent Versions System
阅读量:6936 次
发布时间:2019-06-27

本文共 3105 字,大约阅读时间需要 10 分钟。

178.1. installation

过程 178.1. install cvs

  1. install

    $ sudo apt-get install xinetd$ sudo apt-get install cvs

    show the cvs version

    $ cvs -vConcurrent Versions System (CVS) 1.12.13 (client/server)
  2. create cvs group and cvsroot user

    $ sudo groupadd cvs$ sudo adduser cvsroot --ingroup cvs

    change user become cvsroot

    $ su - cvsroot
  3. initialization 'CVSROOT'

    $ cvs -d /home/cvsroot init

    if you have successed, you can see CVSROOT directory in the '/home/cvsroot'

    $ ls /home/cvsroot/CVSROOT
  4. authentication

    default SystemAuth=yes, you can use system user to login cvs.

    but usually, we don't used system user because it isn't security.

    SystemAuth = no

    edit '/home/cvsroot/CVSROOT/config' make sure SystemAuth = no

    $ vim /home/cvsroot/CVSROOT/configSystemAuth = no

    create passwd file

    the format is user:password:cvsroot

    you need to using htpasswd command, if you don't have, please install it as the following

    $ sudo apt-get install apache2-utils

    or

    $ perl -e 'print("userPassword: ".crypt("secret","salt")."\n");'

    or

    $ cat passwd#!/usr/bin/perlsrand (time());my $randletter = "(int (rand (26)) + (int (rand (1) + .5) % 2 ? 65 : 97))";my $salt = sprintf ("%c%c", eval $randletter, eval $randletter);my $plaintext = shift; my $crypttext = crypt ($plaintext, $salt);print "${crypttext}\n";$ ./passwd "mypasswd"atfodI2Y/dcdc

    let's using htpasswd to create a passwd

    $ htpasswd -n neoNew password:Re-type new password:neo:yA50LI1BkXysY

    copy 'neo:yA50LI1BkXysY' and add ':cvsroot' to the end

    $ vim /home/cvsroot/CVSROOT/passwdneo:yA50LI1BkXysY:cvsrootnchen:GXaAkSKaQ/Hpk:cvsroot
  5. Go into directory '/etc/xinetd.d/', and then create a cvspserver file as the following.

    $ sudo vim /etc/xinetd.d/cvspserverservice cvspserver{   disable = no   flags = REUSE   socket_type = stream   wait = no   user = cvsroot   server = /usr/bin/cvs   server_args = -f --allow-root=/home/cvsroot pserver   log_on_failure += USERID}
  6. check cvspserver in the '/etc/services'

    $ grep cvspserver /etc/servicescvspserver      2401/tcp                        # CVS client/server operationscvspserver      2401/udp
  7. restart xinetd

    $ /etc/init.d/xinetdUsage: /etc/init.d/xinetd {start|stop|reload|force-reload|restart}
  8. port

    $ nmap localhost -p cvspserverStarting Nmap 4.53 ( http://insecure.org ) at 2008-11-14 16:21 HKTInteresting ports on localhost (127.0.0.1):PORT     STATE SERVICE2401/tcp open  cvspserverNmap done: 1 IP address (1 host up) scanned in 0.080 seconds
  9. firewall

    $ sudo ufw allow cvspserver

environment variable

CVSROOT=:pserver:username@ip:/home/cvsroot

vim .bashrcexport CVS_RSH=sshexport CVSROOT=:pserver:neo@localhost:/home/cvsroot

test

$ cvs loginLogging in to :pserver:neo@localhost:2401/home/cvsrootCVS password:neo@netkiller:/tmp/test$ cvs co testcvs checkout: Updating testU test/.projectU test/NewFile.xmlU test/newfile.phpneo@netkiller:/tmp/test$

178.1.1. chroot

$ sudo apt-get install cvsd

environment variable

neo@netkiller:~/workspace/cvs$ export CVSROOT=:pserver:neo@localhost:/home/cvsroot

ssh

export CVS_RSH=sshexport CVSROOT=:ext:$USER@localhost:/home/cvsroot

原文出处:Netkiller 系列 手札

本文作者:陈景峯
转载请与作者联系,同时请务必标明文章原始出处和作者信息及本声明。

你可能感兴趣的文章
敏捷个人:激励 2011-11-26期
查看>>
定风波 - 滑雪
查看>>
Amh/Nginx更改网站根目录
查看>>
ISAPI_Rewrite3.1相关知识
查看>>
软件测试工程师的角度看论证学问
查看>>
VCSA 6.5 HA配置 之三 :准备工作
查看>>
格式输出
查看>>
使用webpack打包的后,公共请求路径的配置问题
查看>>
linux program HEAP tracker
查看>>
直播源码:直播+内容营销新趋势
查看>>
Docker 健康检查功能
查看>>
mac pro下安装gdb和delve调试器
查看>>
SEO基础知识8大精华文章之第三篇 SEO的历史(连载)
查看>>
shell 批量添加用户健壮版
查看>>
java ASM 分析类
查看>>
计算机英语词汇
查看>>
一千个好听的音乐源代码奉上
查看>>
C语言之结构体以及结构体对齐访问
查看>>
SVN笔记
查看>>
nagios结合pnp4nagios图表
查看>>