Discuss CVS usage from the server and client perspectives

Source: Internet
Author: User
Keywords Server CVS
Tags access aliyun client collaborative development control control system deleted development

CVS is an abbreviation for Concurrent version system (parallel version systems) for versioning. If you have been involved in too many people http://www.aliyun.com/zixun/aggregation/13700.html "> Collaborative development projects, we certainly have such a painful experience: as multiple people simultaneously modify the same file, His painstaking modification of the program was completely deleted by others. In addition, if your software/program has released three versions, and the user needs you to modify the second version of the item, you may be crying because you have only kept the latest version. There is a few changes you have made to the program, but the changes are very little, you just want to send a distance to colleagues in a two version of the difference between the file, so you can avoid the mailbox is not big enough, the speed is too slow and so on. To solve similar problems, such as generating patch files, historical revisions, and so on, a bunch of hackers developed CVS based on the mature SCCS and RCS of the original Unix system. (Sccs:source Code Control System,rcs:revision control System).

The basic work of CVS is this: Build a warehouse on a single server that can store the source programs for many different projects. These source programs are managed uniformly by the warehouse administrator. In this way, it's as if only one person is modifying the file. Avoid conflicts. Before each user uses the warehouse, the project files in the warehouse are downloaded locally. Any modifications made by the user are done locally, and then submitted with a CVS command, which is uniformly modified by the CVS warehouse administrator. This allows you to track file changes, conflict control, and so on.

Since CVS is a typical software of C/s structure, it is also divided into two parts, server and client. But most CVS software has been combined. Here we discuss the use of CVS separately from the server and client perspectives.

CVS Server Installation

First make sure that the system is installed with CVS:

[Root@mail xinetd.d]# rpm-qa|grep CVS
Cvs-1.11.1p1-3

If the command output resembles the above output, the system has CVS installed, or you will need to install the CVS RPM package from the installation CD.

To create a CVS master User:

# useradd-d/cvsroot CVS
# chmod 771/CV Sroot

Ii. establishment of a CVS repository (CVS initialization)

# su CVS
$ cvs-d/cvsroot Init
$exit
#

Third, start the CVS server

Create the file Cvspserver in the/etc/xinetd.d/directory as follows:

# Default:on
# description:the CVS server sessions;

Service Cvspserver
{
Socket_type = Stream
wait = no
user = root
Server =/usr/bin/cvs
Server_args =-F--allow-root=/cvsroot pserver
Log_on_failure + + USERID
Only_from = 192.168.0.0/24
}

Where Only_from is used to restrict access, can not be based on the actual situation or modify.

Modify the file permissions:

# chmod 644 Cvspserver

Then restart XINETD:

#/etc/rc.d/init.d/xined Restart

Then see if the CVS server is running:

[Root@mail xinetd.d]# Netstat-lnp|grep 2401
TCP 0 0 0.0.0.0:2401 0.0.0.0:* LISTEN 7866/xinetd

Indicates that the CVS server is already running.

Iv. creating users to access CVS

The CVS user created earlier is a CVS warehouse management user and requires an Access user in order for the user to access:

# Useradd Cvspub
# usemod-g CVS Cvspub

A user cvspub is added here and the user is added to the CVS group.

Related Article

Beyond APAC's No.1 Cloud

19.6% IaaS Market Share in Asia Pacific - Gartner IT Service report, 2018

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.