Finally, CVS in Linux is implemented.

Source: Internet
Author: User
After re-installing the system and re-installing cvs for n times, the CVS in Linux can be developed theoretically.

I would also like to thank Chao Shao for his enthusiastic efforts in testing when he was busy with VB ......

Although it is three o'clock AM, we should summarize the following:

1. Install CVS first.

First, make sure that CVS is not installed in the system. If not, install it:
Yum install CVS Note: fedora can be installed on a CD. I think it is easy.

2. Check whether xinetd is installed in the system. In fedora 6, this is not installed by default. If not, install:
Yum install xinetd Note: I used the command line to automatically download and install the tool on the Internet. An error occurs in the middle, ignoring

3. Modify/etc/xinetd. d/CVS

[Root @ fc6 cvsroot] # Cat/etc/xinetd. d/CVS
# Default: Off
# Description: The CVS service can record the history of your source \
# Files. CVs stores all the versions of a file in a single \
# File in a clever way that only stores the differences \
# Between versions.
Service cvspserver
{
Disable = No
Port = 2401
Socket_type = stream
Protocol = TCP
Wait = No
User = root
Passenv = path
Server =/usr/bin/CVS
# Env = home =/ZYF/CVS
Server_args =-f -- allow-root =/ZYF/CVS pserver
# Bind = 127.0.0.1
}

4. initialize the CVS service.
CVS-D/ZYF/CVS init
 Note: The path must be consistent with that in/etc/xinetd. d/CVS and can be customized as needed.

5. Add users
Groupadd CVS
Useradd cvsroot-G CVS

6. Set Directory Permissions
Chmod 777/ZYF/CVS

7. Modify the/ZYF/CVS/cvsroot/config file.
[Root @ fc6 cvsroot] # Cat config
# Set this to "no" if pserver shouldn't check system users/passwords
Systemauth = no note: This is commented out by default.

# Put CVS lock files in this directory rather than directly in the repository.
# Lockdir =/var/lock/CVS

# Set 'topleveladmin' to 'yes' to create a CVS directory at the top
# Level of the new working directory when using the 'cvs checkout'
# Command.
# Topleveladmin = No

# Set 'loghistory 'to 'all' or 'toefwupcgmar' to log all transactions to
# History file, or a subset as needed (ie 'tmar 'logs all write operations)
# Loghistory = toefwupcgmar

# Set 'rereadlogafterverify 'to 'alway' (the default) to allow the verifymsg
# Script to change the log message. Set it to 'STAT' to force CVS to verify
# That the file has changed before reading it (this can take up to an extra
# Second per directory being committed, so it is not recommended for large
# Repositories. Set it to 'never '(the previous CVS behavior) to prevent
# Verifymsg scripts from changing the log message.
# Rereadlogafterverify = always

Note: This change is used to ignore system users during user authentication. This prevents many system accounts from being created and affects security.

8. Add the/ZYF/CVS/cvsroot/passwd file.
[Root @ fc6 cvsroot] # Cat passwd
ZYF: woxrxxmqwnmws: cvsroot
Note: Section 2nd in this password file is the MD5 password. Multiple users have one password per line. This password is really bad, and every time a user is created.

9. Add the/ZYF/CVS/cvsroot/readers file.
This file stores the usernames of all read-only users, one row.

10. Add the/ZYF/CVS/cvsroot/writers file.
This file stores all the usernames with write permissions, one row.
 Note: Do not enter the same user in/ZYF/CVS/cvsroot/readers and/shanmin/CVS/cvsroot/writers, if this parameter is set, use the parameter in/ZYF/CVS/cvsroot/readers.

11. Disable SELinux
[Root @ ~] # Setenforce 0
 Note: CVs conflicts with SELinux and must be disabled. Otherwise, the client will prompt that the client has no permission.

Modify the/ETD/services file and add the following content:

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

The CVS service is aroused by inted, so we need to modify the service provided by inetd. My RedHat uses inetd.
In the/etc/inetd. conf file, add the following content: cvspserver stream tcp Nowait Root
/Usr/bin/CVS CVs -- allow-root =/home/cvsroot pserver

Fc6 uses the xinetd method. Therefore, add the services to be started in the xinetd. d directory:

CD/etc/xinetd. d

VI cvspserver

File Content:

Service cvspserver

{

Disable = No

Flags = Reuse

Socket_type = stream

Wait = No

User = root

Server =/usr/bin/CVS

Server_args =-f -- allow-root =/home/cvsroot pserver

Log_on_failure + = userid

}

12. Restart inetd or xinetd:

/Etc/rc. d/init. d/xinetd restart

13. Check whether the cvspserver service has been started.

Netstat-L | grep cvspserver

The result is as follows:

TCP 0 0 *: cvspserver *: * listen

All the above results are passed, but are executed on the client.

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

After the password is entered, no message is received, indicating that the message is successful.

Pai_^ no news is a good news !!

On the client, set the environment variables as follows:

Export cvs_rsh = SSH

Export cvsroot =: pserver: username @ IP:/home/cvsroot

You can

Echo $ cvs_rsh

SSH

Echo $ cvsroot

: Pserver: username @ IP:/home/cvsroot

In this way, you can directly enter CVS login to log on to the client.

Other operations can be directly run CVs command.

12. Start the service
Service xinetd start

13. enable port 2401 on the firewall. Note: I disabled the firewall.

Note: writers must set the permissions for a while.

Related Article

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.