`
Mybeautiful
  • 浏览: 297113 次
  • 性别: Icon_minigender_1
  • 来自: 武汉
社区版块
存档分类
最新评论

Linux配置CVS

阅读更多

 

Table of Contents
  • CVS Install
  • Install CVS Server
  • Config CVS Server
  • Sercuitry Config
  • Verify CVS Server
  • Firewall changes
  • Reference

CVS Install

1、验证是否已安装CVS
#rpm -q cvs
如果能显示出类似这样的版本信息,证明已安装CVS:
#cvs-1.11.2-10

 

 

The CVS must compile and install with root user
  • copy cvs source code to /usr/local/src

Install CVS Server

 

cp cvs-1.12.13.tar.gz /usr/local/src
cd /usr/local/src
gzip -d cvs-1.12.13.tar.gz
tar -xvf cvs-1.12.13.tar
cd cvs-1.12.13
  • make and install,You can use –prefix to set your cvs server installed folder
./configure --prefix=/usr/local/cvs
make
make install

 

Config CVS Server
  • Add CVS port on /etc/services file
cvspserver      2401/tcp                        # CVS client/server operations
cvspserver      2401/udp                        # CVS client/server operations
  • Create (as root) the file /etc/xinetd.d/cvspserver, like below:

 

# default: off
# description: cvspserver
service cvspserver
	{
#         id        = cvspserver
          socket_type    = stream
          protocol    = tcp
          user        = root
          wait        = no
          disable        = no
          server          = /usr/bin/cvs
        Port         = 2401
#       passenv     = PATH
        server_args     = --allow-root=/home/cvsroot -f pserver
#        env = HOME=/home/cvsroot
        log = /var/log/cvslog
	}                                                                              

 

Sercuitry Config

  • Create cvs system user and group, Issue following commands as root:

 

	export CVSROOT=/home/cvsroot
	# create group cvsadmin
	groupadd cvsadmin
	# create a nologin user cvsuser without creating home dir
	useradd -g cvsadmin -s /sbin/nologin  -M cvsuser
	mkdir $CVSROOT
	touch $CVSROOT/locks
	# creates $CVSROOT/CVSROOT
	cvs init
	chmod -R 775 $CVSROOT
	chgrp -R cvsadmin $CVSROOT
  • Change privileges, edit /home/cvsroot/CVSROOT/config like this:

 

      # Set this to "no" if pserver shouldn't check system users/passwords
      SystemAuth=no
      # Set `TopLevelAdmin' to `yes' to create a CVS directory at the top
      # level of the new working directory when using the `cvs checkout'
      # command.
      TopLevelAdmin=yes
  • To add cvs virtual user cvs_test, mike:
htpasswd -d -c /home/cvsroot/CVSROOT/passwd cvs_test
  • To add additional users:
htpasswd -d /home/cvsroot/CVSROOT/passwd mike
  • Add a colon and 'cvsuser' after each encrypted password in /home/cvsroot/CVSROOT/passwd file:

 

	cvs_test:WEOI$(@(@(#JD(:cvsuser
	mike:WEfe$(@#$@(#DE(:cvsuser
  • Edit /home/cvsroot/CVSROOT/cvswrappers:

 

# This file affects handling of files based on their names.
#
# The -t/-f options allow one to treat directories of files
# as a single file, or to transform a file in other ways on
# its way in and out of CVS.
#
# The -m option specifies whether CVS attempts to merge files.
#
# The -k option specifies keyword expansion (e.g. -kb for binary).
#
# Format of wrapper file ($CVSROOT/CVSROOT/cvswrappers or .cvswrappers)
#
# wildcard [option value][option value]...
#
# where option is one of
# -f from cvs filter value: path to filter
# -t to cvs filter value: path to filter
# -m update methodology value: MERGE or COPY
# -k expansion mode value: b, o, kkv, &c
#
# and value is a single-quote delimited value.
# For example:
#*.gif -k 'b'
*.gif -k 'b'
*.tga -k 'b'
*.bmp -k 'b'
*.psd -k 'b'
*.tif -k 'b'
*.png -k 'b'
*.iff -k 'b'
*.aiff -k 'b'
*.obj -k 'b'
*.dat -k 'b'
*.exe -k 'b'
*.com -k 'b'
*.dll -k 'b'
*.dsw -k 'b'
*.dsp -k 'b'
*.lwo -k 'b'
*.lws -k 'b'
*.p -k 'b'
*.ico -k 'b'
*.frx -k 'b'
*.class -k 'b'
*.jar -k 'b'
*.zip -k 'b'
*.lzh -k 'b'
*.lha -k 'b'
*.rar -k 'b'
*.arj -k 'b'
*.arc -k 'b'
*.avi -k 'b'
*.mov -k 'b'
*.asf -k 'b'
*.smk -k 'b'
*.jpg -k 'b'
*.mpg -k 'b'
*.swf -k 'b'
*.frx -k 'b'
*.fli -k 'b'
*.flc -k 'b'
*.tiff -k 'b'
*.bin -k 'b'
*.dat -k 'b'
*.wad -k 'b'
*.ppt -k 'b'
*.pdf -k 'b'
*.3ds -k 'b'
*.max -k 'b'
  • Set access privileges for files
chmod -R 775 $CVSROOT
chgrp -R cvsadmin $CVSROOT
  • Restart xinetd:
/etc/init.d/xinetd restart

 

Verify CVS Server

  • Try if it works:
export CVSROOT=:pserver:cvs_test@127.0.0.1:/home/cvsroot
cvs login

Firewall changes

  • To open firewall to access this server from (for example) host 192.168.0.88 , add a line to /etc/sysconfig/iptables:

 

      
-A RH-Firewall-1-INPUT -s 192.168.0.88 -p tcp --dport 2401 -j ACCEPT
and restart iptables:
/etc/init.d/iptables restart
  • Connect to cvs with WinCVS Cline as below URL:
:pserver;username=dev;password=123456;hostname=192.168.0.88;port=2401:/home/cvsroot

 

Reference

  • Read cvs docs:
info -f cvs
0
0
分享到:
评论

相关推荐

    linux安装cvs操作手册

    #### 四、设置CVS工作目录权限 1. **创建项目目录**:进入`/cvsroot/`目录下,创建项目目录,例如`mkdir project1`和`mkdir project2`。 2. **调整目录权限**: - 调整`/cvsroot/`目录及其子目录的权限,确保CVS...

    linux下的cvs

    本文详细介绍了在Linux环境下如何配置和使用CVS,包括安装、配置CVS用户和组、设置文件权限、初始化CVS仓库、配置CVS服务器以及从客户端连接使用CVS等关键步骤。通过遵循这些步骤,可以确保CVS系统在Linux环境下稳定...

    linux下CVS的配置与安装

    Linux 下 CVS 的配置与安装 安装 CVS 在 Linux 系统中,安装 CVS 服务器端非常重要。首先,需要确认系统是否已经安装了 CVS。如果没有安装,可以使用以下命令安装: ``` # yum install cvs ``` 配置 CVS 服务器 ...

    linux下CVS使用帮助

    ### Linux 下 CVS 使用指南 #### 一、简介 CVS (Concurrent Versions System) 是一款开源的版本控制系统,主要用于管理软件开发过程中的源代码版本控制。它能够支持多个开发者同时在一个项目上工作,并确保每个人...

    linux下cvs维护说明

    在Linux环境下,CVS的使用和维护涉及到多个方面,包括安装、库的创建、权限设置以及故障排查。以下是详细的知识点解析: 1. **Linux下CVS的创建** - **Linux安装**:以Red Hat Enterprise Linux 4.2.18为例,需要...

    linux下cvs安装配置全过程

    Linux 下 CVS 安装配置全过程 CVS(Concurrent Version System)是一种版本管理系统,广泛应用于多人团队开发中。它的基本工作思路是:在一台服务器上建立一个仓库,仓库里可以存放许多不同项目的源程序。由仓库...

    linux下教你如何配置CVS服务器

    本文将详细介绍如何在Linux环境下配置CVS服务器,包括搭建环境、用户管理、权限设置以及服务启动等步骤。 #### 一、搭建CVS服务器基础环境 1. **建立CVS用户组** - 使用命令`groupadd cvs`来创建名为“cvs”的...

    LinuX下 CVS 安装部署备份恢复等

    Linux 下 CVS 安装部署备份恢复等 本文档详细介绍了在 Linux 操作系统下安装、部署、备份和恢复 CVS 服务器的步骤,旨在帮助读者快速搭建 CVS 服务器环境。 一、安装 Linux 服务器 在安装 Linux 服务器时,需要...

    Suse Linux 10.3配置cvs服务

    本文将详细介绍如何在 Suse Linux 10.3 上配置并设置 CVS 服务。 #### 二、环境准备与检查 在开始配置之前,首先需要确认系统是否已安装了 CVS 软件包。可以通过以下命令检查: ```bash # rpm -qa | grep cvs ```...

    Linux下CVS服务器配置

    在Linux环境下设置CVS服务器涉及几个主要步骤: 首先,你需要下载CVS的源代码包。你可以通过搜索引擎或直接访问CVS的官方网站cvshome.org获取最新的源代码。确保下载的版本是最新的,以防止潜在的安全风险。 下载...

    linux下cvs配置说明

    ### Linux 下 CVS 配置详解 #### 一、概述 本文档主要介绍如何在 Linux 系统中配置 CVS (Concurrent Versions System) 版本控制系统。CVS 是一种广泛使用的开源版本控制系统,适用于团队协作开发环境。通过合理的...

    linux服务器端和windows客户端cvs.rar

    下面将详细介绍如何在Linux服务器上设置CVS服务器,并在Windows客户端上安装并配置CVS客户端。 一、Linux服务器端CVS服务器的安装与配置 1. **安装CVS服务端** 在Linux系统中,通常使用包管理器来安装CVS。例如,...

    Linux下CVS服务器的配置.doc

    ### Linux下CVS服务器的配置知识点详解 #### 一、验证是否已安装CVS 在开始配置CVS服务器之前,首先要确认系统是否已经安装了CVS。可以通过以下命令检查: ```bash # rpm -qcvs ``` 如果系统中已安装CVS,此命令...

    Linux与Windows CVS服务器配置与使用

    【知识点详解】 ...在Linux(尤其是Redhat Linux)上配置CVS服务器涉及安装、配置服务、设置认证方式、管理用户权限以及初始化仓库等一系列步骤。理解这些步骤对于有效地管理和控制项目代码至关重要。

    wincvs和linux下cvs使用的文档

    2. **LINUX下的CVS使用手册.doc**:这是一份针对Linux系统的CVS操作手册,可能会包含如何在Linux终端中设置CVS环境变量,安装和配置CVS服务器,使用基本的CVS命令如`cvs init`、`cvs checkout`、`cvs commit`、`cvs ...

    Linux下CVS服务器的配置.pdf

    【Linux下CVS服务器配置详解】 CVS (Concurrent Versions System) 是一款开源的版本控制系统,常用于软件开发中管理代码版本。在Linux环境下配置CVS服务器,可以帮助团队协同开发,跟踪代码变更历史。以下是对配置...

    Linux 下配置 CVS服务器CentOS(CentOS 5.2)

    ### Linux下配置CVS服务器(CentOS 5.2) #### 测试环境 - **操作系统**: CentOS 5.2 - **Tomcat版本**: apache-tomcat-5.5.23 #### 步骤一:安装必要的组件 在CentOS 5.2环境下配置CVS服务器的第一步是确保必要...

    meld-1.3.0 linux下图形化cvs工具

    3. **集成Meld**:通过设置CVS的图形前端选项,将Meld作为默认的diff和merge工具。在~/.cvsrc文件中添加以下行: ``` * diff = meld * merge = meld ``` 4. **执行CVS操作**:现在,当你执行`cvs diff`或`cvs ...

    如何在myeclipse中把工程共享到部署在红旗linux中的cvs服务器中.txt

    本文将基于提供的文件信息,深入探讨如何在MyEclipse中将项目共享至部署在红旗Linux中的CVS服务器,以及在红旗Linux上构建CVS服务器的方法。 ### 在红旗Linux中构建CVS服务器 #### 1. 安装CVS服务器 在红旗Linux...

Global site tag (gtag.js) - Google Analytics