`
rensanning
  • 浏览: 3570112 次
  • 性别: Icon_minigender_1
  • 来自: 大连
博客专栏
Efef1dba-f7dd-3931-8a61-8e1c76c3e39f
使用Titanium Mo...
浏览量:38604
Bbab2146-6e1d-3c50-acd6-c8bae29e307d
Cordova 3.x入门...
浏览量:609091
C08766e7-8a33-3f9b-9155-654af05c3484
常用Java开源Libra...
浏览量:684543
77063fb3-0ee7-3bfa-9c72-2a0234ebf83e
搭建 CentOS 6 服...
浏览量:90601
E40e5e76-1f3b-398e-b6a6-dc9cfbb38156
Spring Boot 入...
浏览量:403245
Abe39461-b089-344f-99fa-cdfbddea0e18
基于Spring Secu...
浏览量:69987
66a41a70-fdf0-3dc9-aa31-19b7e8b24672
MQTT入门
浏览量:92355
社区版块
存档分类
最新评论

搭建 CentOS 6 服务器(14) - CVS、SVN、Git

 
阅读更多
(一)CVS
安装xinetd
# rpm -q xinetd
# yum install xinetd
# chkconfig xinetd on
# /etc/init.d/xinetd start


安装CVS
# rpm -q cvs
    cvs-1.11.23-15.el6.x86_64 (CentOS自带)
# yum install cvs


创建用户
# groupadd cvsgroup
# useradd -G wheel,cvsgroup cvsuser
# passwd cvsuser


设置
# mkdir /usr/local/cvsrepo
# cd /usr/local/cvsrepo
# cvs init
# chown -R root:cvsgroup /usr/local/cvsrepo
# chmod –R 775 /usr/local/cvsrepo

# touch /etc/xinetd.d/cvs
# vi  /etc/xinetd.d/cvs
    service cvspserver
    {
        disable                 = no      # <-
        port                    = 2401
        socket_type             = stream
        protocol                = tcp
        wait                    = no
        user                    = root
        passenv                 = PATH
        server                  = /usr/bin/cvs
        env                     = HOME=/usr/local/cvsrepo
        server_args             = -f --allow-root=/usr/local/cvsrepo pserver
    }
# chmod 644 /etc/xinetd.d/cvs
# /etc/init.d/xinetd restart


确认
# cvs -d ':pserver:root@localhost:/usr/local/cvsrepo' login
# cvs -d ':pserver:root@localhost:/usr/local/cvsrepo' logout


(二)SVN
安装
# yum list | grep "^subversion"
# cd /usr/local/src
# wget http://apache.fayea.com/subversion/subversion-1.8.13.tar.gz
# tar -zxvf subversion-1.8.13.tar.gz
# cd subversion-1.8.13
# ./configure --prifix=/usr/local/svn
# make
# make install
# svnserve --version


设置
# mkdir -p /usr/local/svndata
# svnadmin create /usr/local/svndata/myproj/
# cd /usr/local/svndata/myproj/
# ls -l
# cd conf
# ls -l
# vi svnserve.conf
    [general]
    anon-access = none
    auth-access = write
    password-db = /usr/local/svndata/myproj/conf/passwd
    authz-db = /usr/local/svndata/myproj/conf/authz
# vi passwd
    [users]
    username=password
# vi authz
    [groups]
    project_p = pm
    
    [project:/]
    @project_p = rw
    * =


启动服务
# svnserve -d -r /usr/local/svndata/myproj/


停止服务
# ps -aux|grep svnserve
# kill -9 ID号


确认
# svn co svn://localhost/myproj


(三)Git
安装
# yum list | grep "^git"
# cd /usr/local/src
# wget https://www.kernel.org/pub/software/scm/git/git-2.3.2.tar.gz
# tar -zxvf git-2.3.2.tar.gz
# cd git-2.3.2
# ./configure
# make
# make install
# git --version


设置
# touch /etc/xinetd.d/git-daemon
# vi /etc/xinetd.d/git-daemon
    service git
    {
        disable         = no      # <-
        socket_type     = stream
        wait            = no
        user            = nobody
        server          = /usr/libexec/git-core/git-daemon
        server_args     = --base-path=/var/lib/git --export-all --user-path=public_git --syslog --inetd --verbose
        log_on_failure  += USERID
    }
# /etc/init.d/xinetd restart


创建repository
# mkdir -p /var/lib/git/public_git/test.git/
# cd /var/lib/git/public_git/test.git/
# git --bare init --shared
# groupadd gitgroup
# usermod -G wheel,gitgroup gituser
# passwd gituser
# chown -R gituser:gitgroup /var/lib/git/


客户端确认
# cd /home/gituser/src
# mkdir test
# cd test
# echo "Git Test." > test.txt
# git init
# git add test.txt
# git commit -m "First Commit"
# git remote add test ssh://gituser@localhost:56722/var/lib/git/public_git/test.git
# git push origin master

分享到:
评论

相关推荐

    持续集成-Git 常见的版本控制系统及比较 cvs,svn,git都是版本控制系统 腾讯 tapd、百度 icafe、阿里

    - **CVS和SVN**:这两种系统都属于集中式版本控制系统,意味着所有的版本信息都集中在一台服务器上,客户端需要连接服务器进行操作。这意味着在网络环境不佳的情况下,操作可能会变得缓慢。 - **Git**:与CVS和SVN...

    可视化方式构建自己的SVN服务器端

    6. **检查SVN服务器端状态**: - 通过VisualSVN Server查看服务器端文件列表,确认文件已成功上传。 #### 使用场景与优势 - **项目协作**:SVN支持多用户同时访问代码仓库,方便团队成员协同工作。 - **版本管理*...

    openstack安装包(一)

    sgabios-bin-0-0.3.20110621svn.el6.noarch.rpm spice-server-0.12.4-6.el6_5.1.x86_64.rpm tunctl-1.5-3.el6.x86_64.rpm usbredir-0.5.1-1.el6.x86_64.rpm vgabios-0.6b-3.7.el6.noarch.rpm yajl-1.0.7-3.el6.x86_...

    openstack安装包(二)

    sgabios-bin-0-0.3.20110621svn.el6.noarch.rpm spice-server-0.12.4-6.el6_5.1.x86_64.rpm tunctl-1.5-3.el6.x86_64.rpm usbredir-0.5.1-1.el6.x86_64.rpm vgabios-0.6b-3.7.el6.noarch.rpm yajl-1.0.7-3.el6.x86_...

    redmine 安装手册

    提供丰富的功能,包括对多个项目的管理、灵活的角色访问控制、问题跟踪系统、甘特图、日历、新闻、文件管理、电子邮件通知、wiki、论坛、实时跟踪、自定义字段,以及与多种版本控制系统(如 SVN, CVS, Git, ...

    hudson 学习资料

    - **SCM 类型:** 选择使用的源代码管理系统类型(如 Git、SVN 等)。 - **仓库地址:** 输入源代码仓库的具体位置。 - **构建触发器:** - **定时触发:** 设置定时任务来自动触发构建。 - **手动触发:** ...

    maven-scm-javadoc-1.8.1-2.el7.x64-86.rpm.tar.gz

    Maven SCM插件是用于处理源代码控制系统(如CVS、SVN、Git、Mercurial、Perforce等)的Maven插件。它不仅支持Maven的生命周期集成,还提供了额外的功能,如检测源代码文件的变化、处理元数据文件以及为源代码提供...

    Devops_之—基于Gitlab与Jenkins的CI与CD.pdf

    并且列举了一些常见的持续集成开源工具,如 CVS、SVN、Gitlib 等。 在第二页中,着重介绍了 Gitlab 的部署和使用,包括下载并部署 Gitlab、Ubuntu 系统环境准备和 Centos 系统环境准备等内容。 在版本控制系统分类...

    maven-scm-1.8.1-2.el7.x64-86.rpm.tar.gz

    SCM插件用于集成多种版本控制系统,如CVS、SVN、Git等,它在构建过程中帮助获取项目源代码。版本号1.8.1-2.el7表示这个插件是针对RHEL 7系列(例如CentOS 7)的64位系统优化过的,即rpm包对应于企业版Linux发行版的...

    Unix教程基础篇,介绍unix 的基础知识

    8. **版本控制系统**:Unix系统上,版本控制系统如CVS、SVN和Git的使用非常普遍,它们帮助开发者追踪代码变更和协同工作。 9. **软件安装与管理**:Unix系统通常使用包管理器,如apt(Debian/Ubuntu)、yum(Red ...

Global site tag (gtag.js) - Google Analytics