Complete CVS server creation and permission configuration Scheme

Source: Internet
Author: User
Article Title: full solution for CVS server establishment and permission configuration. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
Both the creation and configuration operations are performed on Redhat Linux8.0. The CVS executable program in the System is under/usr/bin. The version information is Concurrent Versions System (CVS) 1.11.2 (client/server ). The cvs executable program in the system can be used as a client or a cvs source code library Server.
  
   To create a source code library, follow these steps:
(1) initialize the cvs server environment.
# Cvs-d/usr/local/source init
Enter/usr/local/source, and you can see that there is a directory CVSROOT. The following is the initial CVS server configuration file. Remain unchanged for the moment.
  
(2) Place the cvs service in the xinetd system service.
First, generate the task configuration file cvspserver in the/etc/xinetd. d directory. The file name can be used at will.
  
The content is roughly as follows:
Service cvspserver
{
Flags = REUSE
Socket_type = stream
Wait = no
User = root
Protocol = tcp
Server =/usr/bin/cvs
Server_args =-f -- allow-root =/usr/local/source pserver
Disable = no
}
The server_args parameter specifies the path of the source code library and the server password authentication method.
Second, check that the/etc/services file contains the cvspserver keyword and assigns a port, for example, cvspserver 2401/tcp.
Third, restart the xinetd service and use the cvs service.
  
(3) test. Assume that the cvs server is on 192.168.0.205 and there is a user cvs on the system. Log on to another linxu machine and run the following command to complete the test:
$ Export CVSROOT =: pserver: cvs@192.168.0.205: 2401/usr/local/source
$ Cvs login
Enter the password. If no error message is displayed, the logon is successful.
  
If you want to create multiple source code libraries on a linux system, you can provide the cvs service. Repeat the preceding steps.
  
The first step is to use a different path.
The second step is to put it into the xinetd System Service, which is a little troublesome. In the/etc/xinetd. d directory, you must generate a new task configuration file, for example, cvspserver1. The service name in the file must be the first one, for example, service cvspserver1 and server_args. Add a new service port number to the/etc/services file, for example, cvspserver1 2402/tcp. Restart the xinetd service.
  
In step 3 test, you can set it as follows:
$ Export CVSROOT =: pserver: cvs@192.168.0.205: 2402/usr/local/source1
  
As a parallel version control system, cvs is required for multi-user read/write. But sometimes it is expected that some users can only check out and cannot submit new code. Sometimes it is expected that some users on cvs cannot check out some code, such as sharing one CVS with another development group, and that members in another group cannot check out their own code.
  
The cvs server has its own user authentication mechanism. I didn't use it when using it. Instead, I used the System user to directly serve as the cvs server user and implemented this function using linux groups and user permissions.
  
For example, on the linxu system to simulate the actual two development group a, B, respectively have user a-user1, a-user2, b-user1, b-user2.
  
Module a-source. If you want group a to be able to read and write data, group B does not have any permissions. You can use the following commands:
# Chown-R a-user1 a-source
# Chgrp-R a-source
# Chmod-R 770 a-source
  
If you want module a-source, only the a-user1 can be written, and other users in the same group can read, group B does not have any permissions, change the chmod command to-R 750.
  
It must be noted that when a user checkout code is used by default in cvs, a lock file is generated under the current module. if the user has no write permission on the current module, reading is impossible. In combination with the preceding permission settings, you must change the configuration of the cvs server. The lock file is not generated in the current Module Directory, and the lock file is centralized to a directory where all users have read and write permissions. Modify the configuration file CVSROOT/config:
# Put CVS lock files in this directory rather than directly in the repository.
# LockDir =/var/lock/cvs
Set LockDir.

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.