Linux CVS check whether xinetd is installed in the system

Source: Internet
Author: User

Linux CVS is a commonly used software for computer gamers. Then I will study and study Linux CVS in depth. Here I will discuss with you how to use Linux CVS, hoping to help you. After re-installing the system and re-installing Linux cvs n times, the linux CVS under 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 Linux CVS first.

First, make sure that Linux CVS is not installed in the system. If not, install: yum install Linux CVS. Note: You can use a CD to install it in fedora. I think it is easy.

2. Check whether xinetd is installed in the system,

In Fedora 6, this is not installed by default. Install yum install xinetd if it is not installed. Note: I used the command line to automatically download and install it online. An error occurs in the middle, ignoring

3. Modify/etc/xinetd. d/Linux CVS

 
 
  1. [root@fc6 Linux CVSROOT]# cat /etc/xinetd.d/Linux CVS   
  2. # default: off  
  3. # description: The Linux CVS service can record the history of your source \  
  4. #files. Linux CVS stores all the versions of a file in a single \  
  5. #file in a clever way that only stores the differences \  
  6. #between versions.  
  7. service Linux CVSpserver  
  8. {  
  9.  disable   = no 
  10.  port= 2401 
  11.  socket_type= stream 
  12.  protocol  = tcp 
  13.  wait= no 
  14.  user= root 
  15.  passenv   = PATH 
  16.  server    = /usr/bin/Linux CVS  
  17. #env= HOME=/zyf/Linux CVS  
  18.  server_args= -f --allow-root=/zyf/Linux CVS pserver  
  19. #bind= 127.0.0.1  

4. initialize the Linux CVS Service
Linux CVS-d/zyf/Linux CVS init note: this path must be consistent with that in/etc/xinetd. d/Linux CVS and can be customized as needed.

5. Add users
Groupadd Linux CVS
Useradd Linux CVSroot-g Linux CVS

6. Set Directory Permissions

Chmod 777/zyf/Linux CVS

7. Modify the/zyf/Linux CVS/Linux CVSROOT/config file.

 
 
  1. [Root @ fc6 Linux CVSROOT] # cat config
  2. # Set this to "no" if pserver shouldn't check system users/passwords
  3. SystemAuth=NoNote: This is commented out by default.
  4. # Put Linux CVS lock files in this directory rather than directly in the repository.
  5. #LockDir=/Var/lock/Linux CVS
  6.  
  7. # Set 'topleveladmin' to 'yes' to create a Linux CVS directory at the top
  8. # Level of the new working directory when using the 'linux CVS checkout'
  9. # Command.
  10. #TopLevelAdmin=No 
  11.  
  12. # Set 'loghistory 'to 'all' or 'toefwupcgmar' to log all transactions to
  13. # History file, or a subset as needed (ie 'tmar 'logs all write operations)
  14. #LogHistory=TOEFWUPCGMAR 
  15.  
  16. # Set 'rereadlogafterverify 'to 'alway' (the default) to allow the verifymsg
  17. # Script to change the log message. Set it to 'STAT' to force Linux CVS to verify
  18. # That the file has changed before reading it (this can take up to an extra
  19. # Second per directory being committed, so it is not recommended for large
  20. # Repositories. Set it to 'never '(the previous Linux CVS behavior) to prevent
  21. # Verifymsg scripts from changing the log message.
  22. #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/Linux CVS/Linux CVSROOT/passwd file.

[Root @ fc6 Linux CVSROOT] # cat passwd
Zyf: woXRXXMqwnmWs: Linux 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/Linux CVS/Linux CVSROOT/readers file.

This file stores the usernames of all read-only users, one row.

10. Add the/zyf/Linux CVS/Linux CVSROOT/writers file.

This file stores all the usernames with write permissions, one row. note: Do not enter the same user in/zyf/Linux CVS/Linux CVSROOT/readers and/shanmin/Linux CVS/Linux CVSROOT/writers, if this parameter is set, use the parameter in/zyf/Linux CVS/Linux CVSROOT/readers.

11. Disable SELinux

[Root @ ~] # Setenforce 0 Note: Linux 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:

 
 
  1. Linux CVSpserver    2401/tcp     # Linux CVS client/server operations  
  2. Linux CVSpserver    2401/udp     # Linux CVS client/server operations 

Linux CVS service is aroused by inted. Therefore, you need to modify the service provided by inetd. My redhat uses the inetd method in the file/etc/inetd. add the following content to the conf file: Linux CVSpserver stream tcp nowait root/usr/bin/Linux CVS -- allow-root =/home/Linux CVSroot pserver

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

 
 
  1. cd /etc/xinetd.d  
  2. vi Linux CVSpserver 

File Content:

 
 
  1. service Linux CVSpserver  
  2. {  
  3. disable = no 
  4. flags = REUSE 
  5. socket_type = stream 
  6. wait = no 
  7. user = root 
  8. server = /usr/bin/Linux CVS  
  9. server_args = -f --allow-root=/home/Linux CVSroot pserver  
  10. log_on_failure += USERID  

12. Restart inetd or xinetd:

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

13. Check whether the Linux CVSpserver service has been started.

Netstat-l | grep Linux CVSpserver

The results are as follows: tcp 0 0 *: Linux CVSpserver *: * LISTEN all the above results pass, but on the client execute Linux CVS-d: pserver: steven@192.168.211.72: /home/Linux CVSroot login did not receive any message after entering the password, which means success _ ^ no news is a good news !! On the client, set the environment variable as follows: export Linux CVS_RSH = ssh export Linux CVSROOT =: pserver: username @ ip:/home/Linux CVSroot

You can

 
 
  1. echo $Linux CVS_RSH  
  2. ssh  
  3. echo $Linux CVSROOT  
  4. :pserver:username@ip:/home/Linux CVSroot 

In this way, you can directly enter Linux CVS login on the client and log on to Linux CVS command for other operations.

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.

  1. Linux configuration files and user management related system files
  2. Introduction to Linux swap partition and experiment scenarios and processes
  3. To learn about Linux, we recommend that you start with Fedora.
  4. Linux hostname configuration file and file/etc/hosts
  5. Linux File redirection and file Filter

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.