Build a version control CVS server

Source: Internet
Author: User

Build a version control CVS server

1. Installation:

1) Check whether the CVS package is installed on the local machine:

# Rpm-Qa | grep CVS

# Which CVS

 

2) If not install CVS rpm, build it:

I. # Rpm-IVH cvs-x-x.i386.rpm

II. Binary source tar

# Tar xzvf

#./Configure

# Make

# Make install

 

2. Configure the CVS server

1) # mkdir/home/src

# CVS-D/home/src init

/* Create the cvsroot directory under/home/src to indicate that the execution is successful */

 

2)

# Groupadd cvsuser

# Useradd usera-G cvsuser

# Passwd usera

 

3) modify directory permissions

# Chgrp cvsuser/home/src-R

# Chmod 775/home/src

 

4) vi/etc/xinetd. d/cvsserver

Service cvspserver

{

Port = 2401

Socket_type = stream

Wait = No

User = root

Server =/usr/bin/CVS

Server_args = -- allow-root =/home pserver/* CVS is supported by the pserver Service */

Only_from = 192.168.1.0/24/* used to control access permissions */

}

 

5) #/etc/init. d/xinetd restart

 

6) Check whether xinetd is started

PS-Ef | grep xinetd

 

3. CVS client configuration and Common commands

# Export cvsroot =: pserver: user @ server:/home/src

/*

* Pserver is an access method, which indicates password authentication.

* User is the user name of CVS.

* The server is the name or IP address of the CVS server.

*/Home/src is the path of cvsroot

*/

You can write environment variables in/etc/profile;

 

4. Log on to the CVS server and use common commands

# CVS Login

# CVD import-M "write some comments here" project_name vendor_tag release_tag

 

/* Check out project */

# CVS Co myproject

 

/* CVS Update file should develop the "good habit of synchronization and modification "*/

 

/* After checking out, someone adds a new file or directory. You need to retrieve them */

# CVS Update-d

 

/* If you have modified the local file and do not want to submit it, you want to obtain the new file again */

# CVS Update-C filename

 

 

/* Submit changes */

# CVS add readme

# CVS Ci

 

/* Del File */

# CVS remove-F readme

# CVS Ci

 

/* Branch management */

# CVS tag tag_name

/* Delete a tag */

# CVS tag-D tag_name

/* Rename the tag */

# CVS tag-r tag_name_old tag_name_new

 

/* Extract code based on tags */

# CVS co-r tag_name myproject

/* Update by TAG */

# CVS update-r tag_name

 

 

/* Return an individual file, and return a version */

# CVS-Q Update-p-r 1.1 Foo. c> Foo. c

 

/* Return the project */

# CVS up-J head-J tag_name

 

 

 

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.