CVS server establishment and permission configuration method

xiaoxiao2021-03-06  97

CVS introduction

CVS represents a collaborative version of the system, which is a system that puts a set of files in the hierarchical directory tree to keep synchronous systems. People can update their local hierarchy copies from the CVS server and send the modified result or new file; or delete the old file. CVS based on client / server behavior makes it easy to accommodate multiple users, and it is convenient to constitute a network. This feature allows CVS to become the first choice when people in different locations have handled data files (especially the source code of the program).

server

1. Initializing CVS server environment

#CVS -D / TMP / SOURCE INIT

The command is established under / usr / local / source, which is an initialized CVS server profile.

2. Put the CVS server in xinetd

#Vi /etc/xinetd.d/cvspserver to establish a service file and add content

Server CVSPSERVER

{

Flags = Reuse

Socket_type = stream

Wait = NO

User = root

Protocol = TCP

Server = / usr / bin / cvs

Server_Args = -f -Allow-root = / tmp / source pserver

Disable = no

}

Where Server_args a parameter specifies the source code path, one specified server uses a password authentication method.

Then make sure there are two lines in the / etc / service file

CVSPSERVER 2401 / TCP CVSPSERVER 2401 / UDP

Finally restart the Xinetd service.

test

Assume that the CVS server is on 192.168.0.192, there is a user CVS on the system. Log in to another Linux machine, perform the following command to complete the test.

$ export cvsroot =: pserver: cvs@192.168.0.192: 2401 / tmp / SOURCE

$ cvs login

Enter your password, no error message indicates successful landing.

$ cvs logout

User Authentication

The CVS server has a set of its own user authentication mechanism. This method uses the system's user as a CVS server user, using Linux group, user permission to implement such functions.

For example, there are two development groups A, B on the Linux system, which have user A-USER1, A-USER2, B-USER1, and B-USER2.

Module A-SOURCE, I hope A group members can read and write, and the B group does not have any permissions, using the following command:

#Chown -R A-User1 a-Source

#Chgrp -r a a-source

#CHMOD -R 770 A-SOURCE

If you want A-Source, only A-user1 can be written, other users can read, the B group does not have any permissions, and the chmod command is changed to -r 750.

Description

When a user Checkout code in CVS is time to generate a lock file under the current module, if this user does not write permissions to the current module, read is impossible. With the above permissions settings, you must change the following CVS server configuration. Change into the current module directory growing lock file, turn the lock file to a directory of reading and writing permissions. Modify configuration file cvsroot / config

#Put cvs Lock Files in This Directory Rather Than Directly in the repository. # Lockdir = / var / lock / cvs

It is possible to set LockDir.

System is built into multiple source code libraries

1. Use a different path

2. A new task profile is created in the /etc/xinetd.d directory, such as CVSPSERVER1, the first row Server name in the file must distinguish. If it is changed to Server CVSPServer1, Server_args makes the corresponding change. Also in the / etc / service file, add new server ports, such as CVSPServer1 2402 / TCP. Restart the xinetd.

CVS usage process

1. Login, just do it. You need password authentication unless you are allowed to log in anonymous, otherwise you must enter your password for your CVS Server administrator.

2. Take out the entire entire entire entire entire entire day (similar file download). At this point, there will be an original code directory of a project in your hard disk, which is called a working directory.

3. According to your program intent, modify a certain process.

4. The query program is in the library status. (3, 4 these two action can be intermoded or combined)

5. Applying in the library status, the difference between the difference (DIFF), adjusts the modified program (whether conflict with some of others modified, if there is no conflict, it is very simple, and after the modification, please deposited directly (Commit) / ci) Archivery (Repository)

6. If there is a conflict, in the mailling list, discuss with others and achieve coordination.

7. Use the modified file commission to the CVS file cabinet (commonly known as Checkin, similar file upload), please be sure to make your intent in the program code.

8. Take Mailing List to illustrate your ideas and discuss with you.

9. Every time you have a period, you should query in the library status and update your working directory (Update).

转载请注明原文地址:https://www.9cbs.com/read-96478.html

New Post(0)