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 Base ------------------------------------------------- ------------------ Also extracted a LINUX CVS installation configuration 1. Log in with root users, install CVS, here you can refer to Install Document 2, create a CVS group: # GroupAdd CVS Third, create a CVS master user: # useradd -g cvs cvsroot # passwd cvsroot 4, create a CVS home directory: MKDIR / HOME / CVSROOT 5, modify the / home / cvsroot directory group set for cvsroot users and CVS group permissions 770 The same group member can read and write this directory: # chown cvsroot / home / cvsroot # chgrp cvs / home / cvsroot # chmod 770 / home / cvsroot 6. Initialize the CVS source code library, this action generates directory / home / cvsroot / cvsroot It is some initialization file # cvs -d / home / cvsroot init, add CVS service, modify / etc / services, add CVSPServer 2401 / TCP # cvs Client / Server Operations CVSPServer 2401 / UDP if there is no next line # CVS Client / Server Operations 8. If you are using a XINETD method, add a service that you need to start under the xinetd.d directory, then add file CVSPServer, this name must be unanimously service cvspserver {Disable = no Flags = reuse socket_type = stream wait = no user = root server = / usr / local / cvs / bin / cvs server_args = -f --allow-root = / home / cvsroot pserver log_on_failure = userid} where / usr / local / cvs / bin / cvs are executed for the CVS command. Restart xinetd: /etc/rc.d/init.d/xinetd Restart 10, check if the CVSPServer service has started netstat -l | grep cvspserver should have the following results: TCP 0 0 *: CVSPSERVER *: * Listen 11, trial : CVS -D: PServer: Username @