Management of xinetd-based services installed with RPM packages in Linux

Management of xinetd-based services installed with RPM packages in Linux

Preface

There are fewer and fewer xinetd based services in Linux systems now, but there are still xinetd -based services in Linux systems, so we still need to understand the management of xinetd -based services.

1. Startup management based on xinetd service

We use the telnet service as an example. telnet service is used for remote management of the process system, and the port is 23. However, it should be noted that the remote management data of telnet is transmitted in plain text on the network, which is very unsafe. Therefore, we do not recommend starting telnet service on the production server ( server side of telnet service is unsafe). We just use it as an example here and delete it after use. On production servers, remote management uses the ssh protocol, ssh is encrypted and more secure.

telnet service is based on xinetd .

(1) Telnet service installation

telnet service is not installed by default in Linux systems.

telnet service has two installation packages:

telnet-client software package provides telnet client program. telnet-server software package is telnet service in the Linux system.

So we only need to install telnet-server package.

# 1. Check whether the telnet service is installed in the Linux system [root@localhost ~]# rpm -q telnet-server
package telnet-server is not installed

# 2. Telnet service in yum mode# 2.1 View the telnet service RPM package in the yum library [root@localhost ~]# yum list |grep telnet
telnet.x86_64 1:0.17-49.el6_10 updates
telnet-server.x86_64 1:0.17-49.el6_10 updates

# 2.2 Install telnet service [root@localhost ~]# yum -y install telnet-server-0.17-49.el6_10.x86_64

# 2.3 Check whether the telnet service is installed successfully [root@localhost ~]# rpm -q telnet-server
telnet-server-0.17-49.el6_10.x86_64 (indicates that the telnet service is installed successfully)

We then use the [root@localhost ~]# chkconfig --list command to check whether telnet service is installed.

As shown in the following figure:

(2) Telnet service startup

telnet service is based on xinetd , so it cannot be started using the service command, nor can it be started using the /etc/init.d/ path.

Because xinetd -based services do not have the function of independent startup, xinetd service is required to start telnet service.

The /etc/xinetd.d directory is a directory based on the xinetd service, which contains configuration files for xinetd -based services.

As shown in the following figure:

We need to modify the /etc/xinetd.d/telnet configuration file to change the startup status of telnet service.

[root@localhost ~]# vim /etc/xinetd.d/telnet

# The content is as follows:
# default: on
# description: The telnet server serves telnet sessions; it uses \
# unencrypted username/password pairs for authentication.
service telnet The name of the service is telnet.
{
        flags = REUSE The flag is REUSE, which sets the TCP/IP socket to be reusable.
        socket_type = stream uses TCP protocol data packets.
        wait = no allows multiple clicks to connect simultaneously.
        user = root The user who starts the service is root.
        server = /usr/sbin/in.telnetd service startup program.
        log_on_failure += USERID After a login failure, record the user's ID.
        disable = yes The service is not started.
}

We just need to change the disable option to no .

Then we need to restart:

[root@localhost ~]# service xinetd restart
Stop xinetd: [OK]
Starting xinetd: [ OK ]

Then check whether telnet service is started successfully, as shown in the following figure:

Use chkconfig --list to view the automatic startup status of the telnet service, as shown in the following figure:

Why is the automatic startup status also changed when I set the startup status of telnet service?

See the following point for an explanation.

2. Self-start management based on xientd service

(1) Use chkconfig command to manage auto-startup

[root@localhost ~]# chkconfig service name on|off

Notice:

Services based on xinetd do not have their own running levels, but rely on the running levels of xinetd services. So you don't need to specify the --level option, and you must not write it. The running level of the service based on xinetd follows the running level of the xinetd service, that is to say, the running level of the xinetd service is the running level of the service based on xinetd .

Another thing to note is that, for services based on xientd , setting the startup management to startup means starting telnet service. In fact, at the same time, the self-start management of telnet service is also set to on. The two are common. Such a setting is very unreasonable. We just need to know it.

(2) Use the ntsysv command to manage auto-startup

This is the end of this article about the management of xinetd-based services installed with RPM packages in Linux. For more information about the management of xinetd-based services installed with RPM packages in Linux, please search for previous articles on 123WORDPRESS.COM or continue to browse the following related articles. I hope you will support 123WORDPRESS.COM in the future!

You may also be interested in:
  • Detailed explanation of Linux rpm and yum commands and usage
  • RPM packaging process under Linux
  • RPM installation command in Linux command

<<:  0.1 seconds worth! A brief discussion on the problem of speeding up the front-end web pages

>>:  MySQL graphical management tool Navicat installation steps

Recommend

MySQL data type optimization principles

MySQL supports many data types, and choosing the ...

Detailed tutorial on uploading and configuring jdk and tomcat on linux

Preparation 1. Start the virtual machine 2. git t...

MySQL transaction autocommit automatic commit operation

The default operating mode of MySQL is autocommit...

How to add ansible service in alpine image

Use apk add ansible to add the ansible service to...

How to quickly copy large files under Linux

Copy data When copying data remotely, we usually ...

Detailed process of installing various software in Docker under Windows

1. Install MySQL # Download mysql in docker docke...

Tutorial on deploying nginx+uwsgi in Django project under Centos8

1. Virtual environment virtualenv installation 1....

2 methods and precautions for adding scripts in HTML

How to add <script> script in HTML: 1. You c...

Implementation of building Kubernetes cluster with VirtualBox+Ubuntu16

Table of contents About Kubernetes Basic environm...

How to Install Xrdp Server (Remote Desktop) on Ubuntu 20.04

Xrdp is an open source implementation of Microsof...

An article to help you learn more about JavaScript arrays

Table of contents 1. The role of array: 2. Defini...