CVS server configuration and client use

xiaoxiao2021-03-06  22

CVS server and client

First, server erasure

1. system introduction

Server system: Fedora 2

CVS:

2. Set the startup CVS service

On Linux, CVS service can be launched by inetd, xinetd, or tcpwrapper, where inetd has been replaced by XINETD due to safety reasons. Here we use xinetd to start CVS services.

Create a profile for the CVS service in the /etc/xinetd.d directory, such as: /etc/xinetd.d/cvspserver, edit /etc/xinetd.d/cvspserver, enter the following:

Service CVSPServer

{

Disable = no

Socket_type = stream

Wait = NO

User = root

ENV = Home =

Server = / usr / bin / cvs

Server_Args = -f - allowow-root = / home / cvsroot pserver

}

Note:

1) PSERVER is a password-certified approval method, which is the most common way, other Gserve, KServer, EXT, if you want more security, you can use SSH to encrypt passwords and data streams, but here for users Easy, still selected PSERVER

2) - allow-root is the directory specified by Repository, you can create multiple repository

Then restart xinetd:

[root @ Terry Bin] # /etc/rc.d/init.d/xinetd Restart

Stopping Xinetd: [OK]

Starting Xinetd: [OK]

After restarting the XINETD service, the CVS service has also begun to work, theoretically, but my machine has never gone. Finally, I will get up again.

You can use NetStat -l | GREP CVSPSERVER to see if the service is available.

3. Create repository on the CVS server side

First create a group called CVS and a user named cvsroot, and users who want to access CVS services will join CVS group:

[root @ Terry root] # GroupAdd CVS

[root @ Terry root] # UserAdd -g cvs -s / sbin / nologin cvsroot

[root @ Terry root] #passwd cvsroot

[root @ Terry root] # chown -r cvsroot / home / cvsroot

Next, initialization:

[root @ Terry root] # cvs -d / home / cvsroot init

Such a CVS server that can be logged in with a cvsroot user is built. Do not consider safety, so you can test and familiar with CVS operation.

4. Establish a multi-user secure CVS server

After the initialization is completed, the cvsroot directory is generated in the / home / cvsroot directory, which stores some configuration files, such as config, then set permissions:

[root @ Terry root] # chown -r cvsroot.cvs / home / cvsroot

[root @ Terry root] # chmod -r ug rwx / home / cvsroot

[root @ Terry root] # chmod 644 / home / cvsroot / cvsroot / config

For the security of the CVS system, we want to modify the / home / cvsroot / cvsroot / config file, remove the "#systemauth = no", "即", that is, change to "systemauth = no", then give developers one by one Establish an account, create a newly created user directory, because it will be used as a virtual user account, specific commands such as [root @ Terry root] # UserAdd -g CVS -M Bogus

[root @ Terry root] # Passwd Bogus

The above command created a user Bogus without the home directory, then copied the SHADOW file of the system to CVSROOT and renamed Passwd:

[root @ Terry root] # cp / etc / shadow / home / cvsroot / cvsroot / passwd

[root @ Terry root] # chmod 0644 / home / cvsroot / cvsroot / passwd

The Passwd file is then modified, and will be deleted except for all rows that have just set using CVS users Bogus, then remove everything after each line of colon, and add string cvsroot, change to the following format:

Bogus: ND5 $ j8n9bw5dkv.npdxfdsh: cvsroot

Then, delete the user bogus that is just added to the system:

[root @ Terry root] # Userdel -f bogus

Ok, do it, CVS's server is installed, so your CVS users can only log in to your CVS server with users specified in Passwd, pay attention to: Add users in this article The method is suitable for a small number of users, and if there is a large-scale developer, it is recommended to use the LDAP or database to perform the user's authentication service. Through these four-layer protection, I believe that you can use the CVS service you can safely, but this article is just the simplest introduction, I hope I can give you a reference role.

5.

Second, the client is used

1. Command Line

2. WinCVS

Third, endless

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

New Post(0)