Setup and use of cvs servers in Ubuntu

Source: Internet
Author: User

 

1. Install software

 

1) install the cvs Client

$ Apt-getinstall cvs

 

2) install the cvs service user

$ Apt-get install cvsd

 

2. Server Configuration

 

1) configure the main directory of cvs

$ Mkdir/exports/cvsroot/

$ Cvsd-buildroot/exports/cvsroot

 

2) create a warehouse

$ Mkdir/exports/cvsroot/myrepos/

$ Cvs-d/exports/cvsroot/myrepos/init

$ Chown cvsd. cvsd/exports/cvsroot/myrepos/-R

 

3) join users

$ Cvsd-passwd/exports/cvsroot/myrepos/xieyan

Enter the password after the prompt

 

4) modify the configuration file

$ Vi/etc/cvsd. conf

Modify RootJail to the directory you just set.

RootJail/exports/cvsroot/

Specifies the available warehouse. The directory is the path relative to the main directory and starts with a backslash.

Repos/myrepos

Specify the IP address and port (some systems need to specify the specific address, otherwise the bind will fail to be reported)

Listen IP address 2401

 

5) restart the cvsd background service.

$/Etc/init. d/cvsd restart

 

3. Client usage

 

1) Declare Environment Variables

$ Export CVSROOT =: pserver: xieyan @ IP Address:/myrepos

 

2) log on

$ Cvs login

 

3) create a project (import the source file to the cvs warehouse)

$ Cd xxx (enter the source file directory)

$ Cvs import-m "Description"-koxyname projectname mark

Xyname is the path generated under/export/cvsroot/myrepos /.

Projectname is the project name in use.

Mark is the identifier

 

4) obtain the source code

$ Mkdir yyy

$ Cd yyy

$ Cvs co xyname

$ Cd xyname

$ Ls

 

5) Update the modified File

$ Cvs diff (view the files modified in the current directory)

$ Cvs commit (upload all modified files)

$ Cvs commit xxx. cpp (only upload the modified xxx. cpp file)

(Note: You must use commands such as cvsadd to delete files or directories)

 

6) obtain the latest file from the service

$ Cvs update

Related Article

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.