Install and configure CVS on aix5l

Source: Internet
Author: User
Tags tagname

1. Install CVS on aix5

First obtain the CVS installation media, can download to the official website: http://www.cvshome.org/, here I download cvs-1.11.22.tar.gz (pay attention to download the source package, rather than the Binary Package ). Upload to the AIX server and decompress the package. However, the GCC compiler needs to be installed in advance during the installation process. Therefore, if the GCC compiler is not installed on the server, you also need to install the GCC compiler (see my other article on how to install the GCC compiler on aix5 ). Run the following command as the root user:

CD cvs-1.11.22

./Configure (if the GCC compiler is not installed in advance, this step will report an error)

Make

Make install

Here, CVS is automatically installed under/usr/local/bin.

Run CVs in/usr/local/bin to check whether CVS is successfully installed.

Ii. Configure CVS on aix5

1. Create users and groups

Use Smitty to create user cvsroot and group CVs, add user cvsroot to the CVS group, and set the password for cvsroot. The cvsroot user is the administrator of the CVS server, make sure that the PATH environment variable of the cvsroot user contains the path/usr/local/bin.

2. initialize the root directory of the CVS server

Su-cvsroot

CVS-D/home/cvsroot init

In this way, the/home/cvsroot directory becomes the root directory of the CVS server. The directories created later will be stored in this directory by default.

3. Configure the service

Modify the/etc/services file to check whether there are the following two rows. If not, add:

Cvspserver 2401/tcp # CVS client/server operations
Cvspserver 2401/udp # CVS client/server operations

The CVS service is aroused by inted. Therefore, you need to modify the service provided by inetd, modify the file/etc/inetd. conf, and add:

Cvspserver stream tcp Nowait root/usr/local/bin/CVS-f -- allow-root =/home/cvsroot pserver

4,Restart service
$ Stopsrc-s inetd
$ Startsrc-s inetd 3. install and configure wincvs in WINXP

5. view port 2401
$ Netstat-A | grep CVS
Tcp4 0 0 *. cvspserv *. * listen

6,Configure the CVS Environment
 

There is a cvsroot directory in the home directory of the CVS administrator, which contains three configuration files: passwd, readers, and writers. You can configure the CVS server by setting these three files, the following describes the functions of these files:

Passwd: the user list file of the CVS user. Its format is like shadow file:

{CVS username}: [encrypted password]: [equivalent system username]

Readers: list of users with CVS read permission. Is a one-dimensional list. Users in this file have only read permission on CVs.

Writers: List Files of users with CVS write permission. Like readers, it is a one-dimensional list. Users in this file have the write permission on CVs.

Note: If the user exists in both the readers and writers files, the user only has the read permission and does not have the write permission.

Create a user and password that can log on to the CVS service. The passwd file must be created.
VI/home/cvsroot/passwd
The file content is as follows:
STEVEN: XXXXX: cvsroot

Here, Xxxxx is the ciphertext. You can create a temporary user in Smitty, set a password for it, and view the password in/etc/security/passwd. You can also use the following script to get the encrypted password:

1 #! /Usr/bin/perl
2 srand (Time ());
3 my $ randletter = "(INT (RAND (26) + (INT (RAND (1) +. 5) % 2? 65: 97 ))";
4 my $ salt = sprintf ("% C", Eval $ randletter, Eval $ randletter );
5 my $ plaintext = shift; my $ crypttext = crypt ($ plaintext, $ salt );
6 print "$ {crypttext} n ";

7,On the Unix/Linux client, you can connect to the server by using the following methods:

CVS-D: pserver: steven@10.82.66.48:/home/cvsroot Login

Prompt to enter the password. If the prompt is failed to open //. cvspass for reading: no such file or directory, touch. cvspass can create a file.

III,Operations on CVs in Unix/Linux

(1) log on to the CVS server

% CVS Login

CVS password :******

Note: If the system prompts that the. cvspass file does not exist, you only need to manually create one: % Touch. cvspass

(2) view help

% CVs -- Help

% CVS-help-Options

% CVS-help-Commands

(3) import the project to the server

Format: CVs import [-M "Description"] project name vendor name Mark
-M "Description" specifies the description for the import operation. In fact, the-M parameter is a common parameter. You can specify the description information for all commands that need to describe information. If this parameter is not added, CVS automatically starts the Notepad program and requires you to enter the description. Reference: How to specify descriptions for CVS operations

The project name CVS server creates a directory on the CVS server based on the name to save all imported files. Therefore, if you use a project name such as mydoc/Project, two directories will be created: mydoc and its sub-Directory Project.

The identifier of the vendor name Project vendor. For example, NES or Microsoft.

Specify an initial tag for the imported project. Init or start is generally used to indicate the start of the project.

Note: import all files (including subdirectories) in the current directory to the directory specified on the CVS server (the directory name is the same as the project name ). The first operation of each project is to import the CVS server. You do not need to perform this operation again on the same project in the future.

Operation example: chdir myproject
CVS import-M "Import project" myproject nes init

(4) update documents on the slave server

Format: CVs update [-p] [-D]
CVS up
-P: delete an empty directory.
-D: update all files in the subdirectory. If someone else adds a new directory to the project, you must add the-D parameter to update these new directories and their files to the local device.

Operation example: CVs Update-d


Note: update files from the CVS server to the local machine. The function is the same as that of the VSS checkout command.

(5) Check the source code (download the source code of the CVS server to the local device. The local content is a copy of the server)

Cvs co [-r tagname/revision] filename | directory

Example: % CVS co-r aiobs61_dev products/aiobs/aiip

% Cvs co [-d "1 Dec 2002"/2002-12-1/"1 Dec"] file1

(6) add files or directories to the CVS library.

$ CVS add filename | directory

(7) Submit a file

% Cvs ci [-r revision] [-M "Add new functions"] [filename]

After adding a file, you must execute the cvs ci Command to submit the file permanently.

After the directory is added, you do not need to execute another cvs ci Command.

(8) update files in the current working directory

% CVS update [-D] [filename]

-D: retrieve the newly added directory = CVS Co

(9) view the file history

% CVS log [filename]

All file modification records, version information, modifier, modification time and change description will be provided.

(10) Compare files

% CVS diff filename

CVS diff can be used to compare files in the local working directory and on the server, or to compare the differences between the two versions of files, to achieve row-based comparison. Invalid for binary files.

% CVS diff-r aiobs filename

Compare the file differences between local and other branches (the branch tag is aiobs)

% CVS diff-D 2002-1-3-r cbs_rm ora. SQL

Compare the file difference between a date and a branch

(11) display the current state of the file

$ CVS status filename

Three Common statuses: up-to-date, need-patch, and locally modified

Up-to-date: indicates that the file is consistent with the latest version on the CVS server.

Need-Patch: indicates that the local version of the file is earlier than the latest version on the server. You need to download the latest version from the server.

Locally modified: indicates that the file has been modified locally but has not been submitted to the server.

(12) delete an object ------ three steps

% RM filename (delete from working directory first)

% CVS remove filename (delete from CVS)

% CVS commit filename (permanently deleted)

(13) delete a directory

First, delete all files in the directory from CVS.

% Cd ..

% CVS Update-P

-P: tells update to delete these empty directories from the working directory.

That is, if all files in the directory are deleted, CVS considers that the directory has been deleted.

(14) Tag products/modules

It is equivalent to creating a tag or snapshot for a product or module.

CVS rtag tagname products/Module

Or CVS tag tagname products/Module

The functions of the preceding two commands are similar. The difference is that the rtag is directly added to the source code of the CVS server, and the source code checkout must be locally used to use the CVS tag command.

(15) create a branch

CVS rtag-B tagname products/Module

Or CVS tag-B tagname products/Module

Creating a branch is often used to track and fix program bugs. When executing the CVS tag/rtag command, if the-B parameter is used, it indicates that the tag is a branch tag. You can use this tag to modify and submit the program. For example, the common tag created in (12) can only be used for query.

4. For installation configuration of wincvs, see http://www.8848software.com/wincvs/

It has already been described in detail here, but note that the username used for wincvs login is created on AIX, and it takes effect only after wincvs is installed, otherwise, you cannot log on!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.