CVS represents a collaborative Version System, which stores a group of files in the hierarchical directory tree to maintain synchronization. People can update their local Hierarchy Tree copies on the CVS server, send the modification results or new files back, or delete old files. CVS is based on Client/Server behavior to accommodate multiple users, making it easy to form a network.
The following is a summary of my steps in configuring the CVS server and client. I hope this will save you time and work in one step ^-^
To configure the server, perform the following steps:
First, check whether the CVS service is installed:
# Rpm-Qa | grep CVS
If the version number of CVS is displayed, the installation is successful.
Otherwise, download the RPM package from the http://www.cvshome.org.
Installation-you have installed and jumped to the next step.
Rpm-IVH cvsnt-2.0.58d-1.i386.rpm (RPM package name)
1: I am using mandrivia Linux 2006 free. When installing the system, I chose the CVS installation package.
2. Create a CVS User Group
# Groupadd CVS (if there is no groupadd command, use the root account)
3: Create a CVS directory under the same directory as the etc directory (actually the mount point/directory)
# Mkdir CVS
3. Create the cvsroot user and directory of the CVS Group
# Useradd-g cvs-D/CVS cvsroot
4: Add a password for the cvsroot user
# Passwd cvsroot
5. Change the Directory attribute of/CVS.
# Chmod 775/CVS
6: Initialize the source code library of CVS. This operation generates the directory/CVS/cvsroot, which contains some initialization files.
# CVS-D/CVS init
7. Create a user and password that can log on to the CVS service. The passwd file must be created.
# Vi/CVS/cvsroot/passwd
The file content is as follows:
Username: XXXXX: cvsroot
8. xxxxxx is the password,
Obtain method: edit the passwd. pl File: #> VI/cvsroot/passwd. pl. The content is as follows:
#! /Usr/bin/perl
Srand (Time ());
My $ randletter = "(INT (RAND (26) + (INT (RAND (1) +. 5) % 2? 65: 97 ))";
My $ salt = sprintf ("% C", Eval $ randletter, Eval $ randletter );
My $ plaintext = shift;
My $ crypttext = crypt ($ plaintext, $ salt );
Print "$ {crypttext}/T/N ";
#> Chmod A + x passwd. pl
9. If you want to generate a password of "123456", then:
#>./Passwd. pl "123456"
Press enter to obtain the encrypted password and replace xxxxxx in the passwd file
10. Join the CVS Service (My mandrivia 2006 has the CVS service by default, so do not add it)
# Vi/etc/services
Cvspserver 2401/tcp # pserver CVS Service
Cvspserver 2401/udp # pserver CVS Service
11. My mandrivia 2006 uses the CVS service in the xinetd mode. if the service is not enabled, you only need to modify the CVS file,
If you have installed your own RPM package, add the services to be started in the xinetd. d directory:
# Cd/etc/xinetd. d
# Vi cvspserver
File Content:
Service cvspserver
{
Disable = No
Socket_type = stream
Wait = No
User = root
ENV = home =
Server =/usr/bin/CVS
Server_args =-f -- allow-root =/CVS pserver
}
12. Restart xinetd:
/Etc/rc. d/init. d/xinetd restart
13. Check whether the cvspserver service has been started.
# Netstat-L | grep cvspserver
The result is as follows:
TCP 0 0 *: cvspserver *: * listen
All the above results are passed, but are executed on my client (redhat9 ).
14. test:
Obtain the IP Address:
# Ifconfig
# Export cvsroot =: pserver: username @ IP:/CVS
In this way, you can directly enter
# CVS Login