Redhat Linux under the installation configuration of CVS
Normally, RH Linux has installed CVS default. You can view if you install CVS # rpm -qa | GREP CVS if installed, you will return installed CVS version number # CVS-1.11.2-25 If not installed, download a latest RPM installation to www.cvshome.org can
Create User CVS #USERADD CVS Add Cryptt CVS to CVS Users Create Directory to Put the source code base to import #MKDIR / Home / CVS / CVSROOT Modify Directory Home #Chown -R CVS: CVS / Home / CVS / CVSRoot
1. Initialize the CVS source code library, this action generates directory / home / cvsroot / cvsroot, under the initialization file #CVS -D / home / cvs / cvsRoot Init can also build the cvsroot directory in other places #CVS -D / Space / CVSROOT INIT
* Join CVS service (default, there is often the default CVS service) #vi / etc / services #cvspserver 2401 / tcpserver 2401 / udp #pserver CVS Service
2. Put the CVS service into the xinetd system service #cd /etc/xinetd.d #vi cvspserver file content: service cvspserver {flags = reuse socket_type = stream wait = no user = root server = / usr / bin / cvs server_args = -f - allow-root = / home / cvs / cvsroot pserver log_on_failure = Userid disable = no} Confirm / etc / service file, there is a CVSPSERVER keyword, and allocated port, such as: CVSPSERVER 2401 / TCP restart xinetd : # / etc / rc.d / init.d / xinetd Restart
* Check if the CVSPSERVER service has started #NETSTAT -L | GREP CVSPServer should have the following results, indicating that the CVS server is installed successfully: TCP 0 0 *: CVSPSERVER *: * LISTEN
3. Log in to the CVS server (if the server IP is 192.168.2.253): Another Linux machine executes the following command: #EXPORT CVSROOT =: PServer: cvs@192.168.2.253: 2401 // Space / cvsroot # cvs login Enter password, no The error message indicates successful landing.
If you want to build multiple source code libraries on a Linux system, you provide CVS services. Repeat the above steps. Step 1 Pay attention to use a different path. Section 2 is placed in the XINETD system service. To generate a new task profile in the /etc/xinetd.d directory,
For example, CVSPSERVER1, the service name in the file must distinguish the first, such as service
CVSPSERVER1, Server_args makes the corresponding change. Also in the / etc / service file, join the new service port number,
For example: CVSPSERVER1 2402 / TCP. Restart the xinetd service. Step 3 Test, you can set this: #EXPORT CVSROOT =: PServer: cvs@192.168.2.253: 2402 / usr / local / source1 client needs to set the cvsroot variable, no need to log in next time Enter paths such as clients with user guo, add: cvsroot =: pserver: cvsRoot =: pserver: cvsRoot =: pserver: cvsRoot =: pserver: cvsRoot =: pserver: cvs@202.204.114.37: / Home / CVS / CVSROOT EXPORT CVSROOT Type Command Make Variable Settings Right to take effect: # Source /Home/weiqiong/.bash_profile
Import source code, if all code is in directory / home / guo / source #CD ~ / source #cvs import -m "initial code" test guo start to generate directory / home / cvs / cvsroot / test in TEST Source code