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