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