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

Use html-webpack-plugin' to generate HTML page plugin in memory

When we package the webpackjs file, we introduce ...

Win10 configuration tomcat environment variables tutorial diagram

Before configuration, we need to do the following...

Version numbers in css and js links in HTML (refresh cache)

background Search the keyword .htaccess cache in ...

Docker network principles and detailed analysis of custom networks

Docker virtualizes a bridge on the host machine. ...

Example of creating table statements for user Scott in MySQL version of Oracle

Overview: Oracle scott user has four tables, whic...

MySQL database constraints and data table design principles

Table of contents 1. Database constraints 1.1 Int...

JavaScript web form function communication full of practical information

1. Introduction Earlier we talked about the front...

Introduction to HTML Chinese Character Encoding Standard

In HTML, you need to specify the encoding used by...

How to create a test database with tens of millions of test data in MySQL

Sometimes you need to create some test data, base...

MySQL 8.0.15 installation graphic tutorial and database basics

MySQL software installation and database basics a...

How to build a standardized vmware image for kubernetes under rancher

When learning kubernetes, we need to practice in ...

Linux kernel device driver kernel linked list usage notes

/******************** * Application of linked lis...

js to call the network camera and handle common errors

Recently, due to business reasons, I need to acce...