CVS version control software installation configuration and use
For http://www.chinaunix.net Author: After zdm modified release
CVS version control software installation configuration and use
(1) Installation of software: 1. Software Get: CVS is a typical Server / Client side software, with Unix version of CVS, Linux version of CVS, and Windows version of CVS, which already contains Server and Client, but we are Work is generally used using a Windows operating system, so we can download a Client-end software WinCVS of Windows under Windows. You can get the latest version of CVS at the following website. http://www.cvshome.org 2. Software version: Now Unix's latest version of CVS is CVS-1.11.5.tar.gz Windows CVS CLIENT Software WinCVS version is WinCVS1.3 3. Software installation: Put your downloaded CVS-1.11.5.tar.gz in a temporary directory of the UNIX machine, enter this directory, #gunzip CVS-1.11.5.Tar.gz gets CVS-1.11.5 .tar file, then execute: #TAR XVF CVS-1.11.5.TAR After getting a CVS-1.11.5 directory, enter this directory, execute the following command: #. / configure #make #Make Install if installed There is no error message in the process, indicating that your installation is successful. If there is a report, please check your system to check your system to set up the setup.exe file in the Source file in Windows under Windows. Specify the installed directory.
(2) Configuration of CVS software server side: 1. After we install this software, we can start configuring the server. Generally, the CVS is run as a service using the PServer as a service running on UNIX, so first determine the entrance to the CVS service in the system / etc / service file, if No) add two lines in this file: CVSPSERVER 2401 / TCP # CVS Client / Server Operations CVSPSERVER 2401 / UDP # CVS Client / Server Operations 2. The CVS service is started through xinetd, we need to modify the /etc/xinetd.conf file, add a statement CVSPSERVER STREAM TCP NOWAIT ROOT / USR / BIN / CVS CVS - Allow-root = / home / cvsroot PServer due to newer All Linux distributions (such as: redhat7.x) replace inetd with new xinetd, to start CVS service with xinetd, you need to enter the /etc/xinetd.d/ directory, then edit a text file (name casual) Here is the name of CVSPSERVER as a file name. The content of this file is as follows: Service CVSPServer {socket_type = streamwait = Nouser = rootenv = home = server = / usr / bin / cvsserver_args = --allow-root = / cvsroot pserver} pay attention The name of the above service must be the same as the CVS service name in the / etc / service file, in the Server_args line we specified CVS using the PServer authentication mode, which may easily misunderstand the env = home = this line, add this The purpose of a line is to solve the error in the read /Root/.cvsignore file generated during the execution of some CVS operations. The above ENV is the meaning of the environment to set the environment variable home when running the CVS service, so although the CVS is executed The user is root, but because there is no HOME environment variable, CVS will not read the /Root/.cvsignore file. It is recommended to use the latter to start CVSPSERVER, do not modify the /etc/xinetd.conf file, avoid conflicts
3. To make CVS normally, you need to set up users who need to use CVS, first create a user group CVS, then add a user cvsroot to modify the user cvsroot group properties to make it a CVS group member. GroupAdd Cvs UserAdd -g CVS CVSROOT 4. Create a directory, name, and path arbitrarily. This directory is a directory where the user source code is stored, that is, the user's data warehouse (repository), is the core part of CVS, so it should be built in a space that is large enough. Here I found a cvsroot directory in the root directory #mkdir CvsRoot 5. Create an environment variable cvsroot, this environment variable indicates the location where the data warehouse is located, if you use the shell is CSH, then you should edit your root directory. CSHRC file Add the following statement setenv cvsroot / cvsroot pay attention The path is the same as the directory path you as a data warehouse. 6. Initialize your data warehouse CVS -D / home / cvsroot init 7. After the initialization / cvsroot directory, you will automatically generate a cvsroot directory in / cvsroot directory. This file is a CVS configuration file. For several main files as follows: CheckoutList supports other management files for the cvsroot directory, allowing for each When the CVS command is fixed, the CMTINFO is executed when the cvs commit command is executed, this file specifies the command cvswrappers when the music file is submitted, the CVSWrapPers defines a packager when the file registration or checks the EditInfo, allowing you to start before log information before the commit command The script History, which is recorded, traces all the command loginfo that affects the warehouse is similar to COIMMITINFO, just after the file is submitted, execute Modules to define a symbol for a set of files, otherwise the file name of the CVS warehouse must be specified for each file ($ Cvsroot) Nitify Controls Notifications from "Watch". "Watch" is set by "CVS Watch Add" and "CVS Edit" Set RCSINFO to the commit log. Tag. TagInfo defines the programs executed after any "tag" operation. Readers sets a user list with read permissions (the system does not have this file, you must manually add) Writers sets a user list with read and write permissions (the system does not have this file, must be added manually)
So far, the configuration of the CVS server is finished, you can use your CVS server. You can test your CVS server, enter the following instructions in the command line to log in to the CVS server, if you don't prompt any information, you have already logged in to the CVS server CVS -D: PSERVER: cvsroot@192.168.7.183: / home / CVSROOT login (3) Configuration of CVS client software WinCVS: 1. Software Description: Although the CVS software installed on UNIX includes the Server side and the Client side, you need to remember those anti-cumbersome commands when using, now there is a software WinCVS to run a CVS under Windows. Client software, 2. Software Installation: Get the SETUP.EXE file inside after WinCVS installer, install it to your specified directory. 3. Software start: Start - Program - GNU-WinCVS1.3-WinCVS 4. Software configuration: Select the "General" page in the Adminature ..., pop-up window, the specific settings are as follows: Authentication: PServer, this is the default authentication method) Path: / home / cvsroot The path of the data warehouse on the server) Host Address: 192.168.7.183 (IP address of the server) User name: BJCVS (User Name) CVSROOT: After setting the above item, this will be automatically generated, here is not required 5. Cancel the following two check boxes Checkout Read-Only in the "Global" page (if you choose this item, the project is read-only) prune (not allowed to be empty) 6 . In the "WinCVS" page, fill in the "Home (Passwords and ~ / .cvs *", you fill in a directory of your native, after you do Check Out, Check IN operations are in this directory. "Default Viewer Used To "Setting the default editor 7." Command Dialogs "page No settings. (4) Select" admin "-" login "will pop up a window, let you enter your password, so you can log in to the CVS server, if you Seeing the following information indicates that your landing is success: cvs -z9 login logging in to: pserver: bjcvs@192.168.2.52: 2401 / home / cvsroot ***** CVS EXITED NORMALLY with code 0 ***** Any "CVS EXITED NORMALLY WITH CODE 0" last is not 0 states. After the landing failed, you don't have the end of the CVS in CVS. (5) WinCvs use: 1. Upload (Checkin):
Upload a directory: There is an Explore page on the middle of the form, click on it, select the folder you are uploaded; click on the Creat - >> Import Module from Selection of the menu bar, you will jump out of an Import Filter Form. If there is an error in your file, there will be Error or Warn flags in the Import Filter form. If this is true, you'd better take a look at the problem. The next hopped form is import setting, in Select The Module Name and Path on The Remote Server, after your file is passed, the CVS server will establish a code base with this name, store Just passed the document. Keep in mind that the drop-down box does not have a magical function, it can only remember what you fill in last time. Upload a file: After adding a new file to the local working directory, you will be submitted to the server. First select the file, then click "Add Selected" in the toolbar, after adding the file, then select Submit command "Commit Selection" in the right-click menu. 2. CHECKOUT:
Download a directory: After the previous step, you have source code in the server, and all developers can start working. Of course, developers need to download a copy to the local to modify it. Create a local working directory, create a directory on your own hard disk, such as a directory named "WORK", indicating that this is a work directory. Choose Creat - >> Checkout Module, the form that appears is Checkout Setting, fill in the module name in the previous step (upload file) in the Module Name and Path on the Server, upload to the module name in the server. Fill you in Local Folder to Checkout To
Download a file: If you accidentally delete a file in your local working directory, you can select a modules page on the center of the form, select the modules you work, right-click the file in the right window, select the file that you mistaken, Select Update Selection to synchronize the files and local files on the CVS server, and select "OK" directly without any options appearing. 3. Lock: In general, in the project team, the project manager will issue the latest foundation regularly, requiring the team members to further development on this foundation, and some members will complete work in advance, they submit changes The latest version will be higher than the foundation version of the project manager. Sometimes, some project members will intend to unintentionally modify the basic version, and specify the submit to the base version, if they allow them to submit changes, everyone may work in an error, and the consequences are unbearable. The operation of the lock file is as follows: the admin-> bomandline of the menu bar, enter this command: CVS admin -l version number file is not a space between the -L and version number. If you lock success, you will have the following tips: rcs file: /cvs/hrsystem/test/new.txt ,v 1.1.2.3 locked done ***** CVS EXITED NORMALLY with code 0 *****
About the CLIENT of CVS, I can only say so much. There are many information about WinCvs about WinCVS. You can go see, (6) Internal CVS account description: The company's internal CVS server has now been set up, On the Portal machine (192.168.2.52), and add a CVS user to everyone, the username is: your last name the first letter of the name, for example: Zhang Dao Ming's CVS account is ZHANGDM password and user The same name, and ZHANGDM is currently the use phase of testing and learning CVS. When you are more skilled in the use of CVS, you will be transferred from Microsoft Visual SourceSafe to CVS. (7) Need first to install python-2.2.1.exe before installing CVS (now there is a new script)