Middleware installation method and device, storage medium and electronic equipment

By automating the middleware installation process, including configuring role information and parameter information, selecting the installation directory, and performing necessary detection and confirmation, the problem of middleware installation is solved and a more efficient and accurate installation process is achieved.

CN119512578APending Publication Date: 2025-02-25BAIRONG ZHIXIN (BEIJING) TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411636327.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-15
Publication Date
2025-02-25

AI Technical Summary

Technical Problem

In the prior art, middleware installation efficiency is low, manual installation requires a lot of time and effort, and configuration parameter errors, omissions and other problems are prone to occur, resulting in the middleware not being able to run normally and need to be reinstalled.

Method used

Provides a middleware installation method, by receiving middleware installation commands, automatically configure the role information and parameter information of the middleware, select the installation directory, and automatically install the middleware on the target server. The method includes survival detection, environment variable confirmation, port confirmation, and server cluster status detection to ensure the accuracy and efficiency of the installation process.

Benefits of technology

It improves the installation efficiency of middleware, reduces manual errors, ensures the normal operation of middleware, and reduces the frequency of reinstallation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119512578A_ABST
    Figure CN119512578A_ABST
Patent Text Reader

Abstract

The invention discloses a middleware installation method and device, a storage medium and electronic equipment, relates to the technical field of computers, and mainly aims to improve the installation efficiency of middleware. The method comprises the following steps: receiving a middleware installation command, wherein the middleware installation command comprises a component type of middleware and a target server identifier; configuring role information and parameter information of the middleware according to the component type; selecting an installation directory of the middleware on the target server according to the component type; and when the installation information of the middleware does not exist in the installation directory on the target server and the survival detection of the target server is successful, sending an installation instruction to the target server, the installation instruction being used for instructing the target server to install the middleware in the installation directory according to the role information and the parameter information. The method and the device are used for installing the middleware on the target server.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a middleware installation method, device, storage medium and electronic device. Background Art

[0002] In modern software architecture, middleware plays a key role. It is located between the operating system and application software and can serve as a bridge between the two, enabling the application software and the operating system to share resources. When the application software and the operating system have different interfaces, the middleware can convert the interfaces and protocols used by the application software into interfaces and protocols that the operating system can recognize, thus achieving adaptation between different interfaces.

[0003] Currently, manual installation is usually used when installing middleware, which takes a lot of time and effort. Especially when dealing with complex configurations and dependencies, configuration parameter errors and omissions are prone to occur. These errors may cause the middleware to fail to run normally and need to be reinstalled, greatly reducing the efficiency of installing the middleware. Summary of the invention

[0004] In view of the above problems, the present application provides a middleware installation method, device, storage medium and electronic device, which solve the problem of how to improve the installation efficiency of the middleware.

[0005] In order to solve the above technical problems, this application proposes the following solutions:

[0006] In a first aspect, the present application provides a middleware installation method, the method comprising: receiving a middleware installation command, the middleware installation command comprising a component type of the middleware and a target server identifier; configuring role information and parameter information of the middleware according to the component type; selecting an installation directory for the middleware on the target server according to the component type; when the installation information of the middleware does not exist in the installation directory on the target server and the survival detection of the target server is successful, sending an installation instruction to the target server, the installation instruction being used to instruct the target server to install the middleware in the installation directory according to the role information and parameter information.

[0007] In combination with the first aspect, in another possible implementation method, the configuration information of the target server is mapped to the server cluster where the target server is located; a configuration information confirmation request is sent to each server in the server cluster, and the configuration information confirmation request is used to request each server in the server cluster to confirm whether the configuration information of the target server exists, and to feedback the configuration information confirmation result; if the configuration information confirmation result fed back by at least one server in the server cluster is that the configuration information does not exist, the installation instruction is not sent to the target server, and an alarm is issued.

[0008] In combination with the first aspect, in another possible implementation method, an environment variable confirmation request is sent to the target server, the environment variable confirmation request is used to request the target server to confirm whether the required environment variables exist, and to feedback the environment variable confirmation result, the required environment variables are used to indicate the operating environment of the middleware in the target server; if the environment variable confirmation result is that the required environment variables do not exist, an environment variable configuration instruction is sent to the target server, and an environment variable confirmation request is sent to the target server again after a preset time to confirm whether the required environment variables exist.

[0009] In combination with the first aspect, in another possible implementation method, a first port confirmation request is sent to the target server, and the first port confirmation request is used to request the target server to confirm whether the port indicated by the port number is occupied by a process, and to feedback the first port confirmation result; if the first port confirmation result is that the port is occupied by the process, the target server is instructed to stop starting the middleware; if the first port confirmation result is that the port is not occupied by the process, the target server is instructed to start the middleware.

[0010] In combination with the first aspect, in another possible implementation method, after receiving feedback information from the target server starting the middleware, a second port confirmation request is sent to the target server, and the second port confirmation request is used to request the target server to confirm whether the port indicated by the port number is being used by the startup process of the middleware, and to feedback the second port confirmation result; if the second port confirmation result is that it is being used by the startup process of the middleware, it is determined that the middleware startup is normal; if the second port confirmation result is that it is not being used by the startup process of the middleware, it is determined that the middleware startup is abnormal, and an alarm is issued.

[0011] In combination with the first aspect, in another possible implementation, the status information of the server cluster where the target server is located is obtained according to the component type of the middleware; the status information is parsed to obtain the cluster status of the server cluster; when the cluster status is abnormal, it indicates that the middleware installation has failed and an alarm is issued.

[0012] In combination with the first aspect, in another possible implementation method, the role information and installation directory of the middleware are obtained; the monitoring command format corresponding to the component type of the middleware is queried through a preset table, and the preset table is a table that stores the correspondence between middleware of different component types and the monitoring command format; the monitoring command is assembled according to the role information, installation directory and monitoring command format of the middleware, and sent to the target server; and the status information fed back by the target server based on the monitoring command is received.

[0013] In combination with the first aspect, in another possible implementation method, after receiving feedback information that the target server has completed the installation of the middleware in the installation directory, the parameter information is encapsulated into a parameter configuration file of the corresponding type of the middleware; a replacement instruction is sent to the target server, the replacement instruction includes the encapsulated parameter configuration file, and the replacement instruction is used to instruct the target server to replace the parameter information in the installation directory of the middleware with the parameter configuration file.

[0014] In the second aspect, the present application provides a middleware installation device, which includes: a receiving module for receiving a middleware installation command, the middleware installation command including the component type of the middleware and a target server identifier; a configuration module for configuring the role information and parameter information of the middleware according to the component type; a selection module for selecting the installation directory of the middleware on the target server according to the component type; an installation module for sending an installation instruction to the target server when the installation information of the middleware does not exist in the installation directory on the target server and the survival detection of the target server is successful, the installation instruction being used to instruct the target server to install the middleware in the installation directory according to the role information and parameter information.

[0015] In combination with the second aspect, in another possible implementation method, the verification module is also used to map the configuration information of the target server to the server cluster where the target server is located; send a configuration information confirmation request to each server in the server cluster, the configuration information confirmation request is used to request each server in the server cluster to confirm whether the configuration information of the target server exists, and to feedback the configuration information confirmation result; if the configuration information confirmation result received from at least one server in the server cluster is that the configuration information does not exist, the installation instruction is not sent to the target server, and an alarm is issued.

[0016] In combination with the second aspect, in another possible implementation method, the verification module is also used to send an environment variable confirmation request to the target server, the environment variable confirmation request is used to request the target server to confirm whether the required environment variables exist, and to feedback the environment variable confirmation result, the required environment variables are used to indicate the operating environment of the middleware in the target server; if the environment variable confirmation result is that the required environment variables do not exist, an environment variable configuration instruction is sent to the target server, and an environment variable confirmation request is sent to the target server again after a preset time to confirm whether the required environment variables exist.

[0017] In combination with the second aspect, in another possible implementation method, the verification module is also used to send a first port confirmation request to the target server, and the first port confirmation request is used to request the target server to confirm whether the port indicated by the port number is occupied by a process, and to feedback the first port confirmation result; if the first port confirmation result is that it is occupied by a process, the target server is instructed to stop starting the middleware; if the first port confirmation result is that it is not occupied by a process, the target server is instructed to start the middleware.

[0018] In combination with the second aspect, in another possible implementation method, the verification module is also used to, after receiving feedback information from the target server starting the middleware, send a second port confirmation request to the target server, and the second port confirmation request is used to request the target server to confirm whether the port indicated by the port number is being used by the startup process of the middleware, and to feedback the second port confirmation result; if the second port confirmation result is that it is being used by the startup process of the middleware, it is determined that the middleware startup is normal; if the second port confirmation result is that it is not being used by the startup process of the middleware, it is determined that the middleware startup is abnormal, and an alarm is issued.

[0019] In combination with the second aspect, in another possible implementation method, the verification module is also used to obtain the status information of the server cluster where the target server is located according to the component type of the middleware; parse the status information to obtain the cluster status of the server cluster; when the cluster status is abnormal, indicate that the middleware installation has failed and issue an alarm.

[0020] In combination with the second aspect, in another possible implementation method, the verification module is also used to obtain the role information and installation directory of the middleware; query the monitoring command format corresponding to the component type of the middleware through a preset table, and the preset table is a table that stores the correspondence between middleware of different component types and the monitoring command format; assemble the monitoring command according to the role information, installation directory and monitoring command format of the middleware, and send it to the target server; receive the status information fed back by the target server based on the monitoring command.

[0021] In combination with the second aspect, in another possible implementation method, the configuration module is also used to, after receiving feedback information that the target server has completed the installation of the middleware in the installation directory, encapsulate the parameter information into a parameter configuration file of the corresponding type of the middleware; and send a replacement instruction to the target server, the replacement instruction includes the encapsulated parameter configuration file, and the replacement instruction is used to instruct the target server to replace the parameter information in the installation directory of the middleware with the parameter configuration file.

[0022] In order to achieve the above-mentioned purpose, according to the third aspect of the present application, a storage medium is provided, wherein the storage medium includes a stored program, wherein when the program is running, the device where the storage medium is located is controlled to execute the middleware installation method of the above-mentioned first aspect.

[0023] In order to achieve the above-mentioned purpose, according to the fourth aspect of the present application, an electronic device is provided, which includes at least one processor, and at least one memory and a bus connected to the processor; wherein the processor and the memory communicate with each other through the bus; the processor is used to call the program instructions in the memory to execute the middleware installation method of the first aspect mentioned above.

[0024] By means of the above technical solution, the technical solution provided by this application has at least the following advantages:

[0025] The present application provides a method, device, storage medium and electronic device for installing middleware. After receiving a command for installing middleware, the computing device of the present application can automatically configure the role information, parameter information and installation directory of the middleware according to the command for installing middleware, so as to automatically install the middleware on the target server according to the role information, parameter information and installation directory. The problem of low efficiency of manually installing middleware is solved.

[0026] In addition, the present application performs survival detection on the target server to ensure that the HTTP link channel between the computing device and the target server is normal, thereby avoiding abnormal execution of middleware installation commands due to network policies and other reasons.

[0027] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present application. Also, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:

[0029] Figure 1 A schematic diagram of the structure of a middleware installation system provided in an embodiment of the present application is shown;

[0030] Figure 2 A schematic diagram of the structure of a computing device provided in an embodiment of the present application is shown;

[0031] Figure 3 A schematic diagram of a process flow of a middleware installation method provided in an embodiment of the present application is shown;

[0032] Figure 4 A schematic diagram showing a specific process of a middleware installation method provided in an embodiment of the present application is shown;

[0033] Figure 5 A schematic structural diagram of a middleware installation device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION

[0034] The exemplary embodiments of the present application will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present application are shown in the accompanying drawings, it should be understood that the present application can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided in order to enable a more thorough understanding of the present application and to fully convey the scope of the present application to those skilled in the art.

[0035] In the embodiments of the present application, the terms "first" and "second" do not have a logical or temporal dependency, nor do they limit the quantity and execution order. It should also be understood that although the following description uses the terms first, second, etc. to describe various elements, these elements should not be limited by the terms. These terms are only used to distinguish one element from another element.

[0036] In the embodiments of the present application, the term "at least one" means one or more, and the term "plurality" means two or more.

[0037] It should also be understood that the term "if" may be interpreted as "when" or "upon" or "in response to determining" or "in response to detecting." Similarly, the phrase "if it is determined that ..." or "if [a stated condition or event] is detected" may be interpreted as "upon determining that ..." or "in response to determining that ..." or "upon detecting [a stated condition or event]" or "in response to detecting [a stated condition or event]," depending on the context.

[0038] To facilitate understanding of the solutions of the present application, a brief introduction to the relevant concepts is first given, as follows.

[0039] Middleware is a type of software between the application system and the system software. It uses the basic services (functions) provided by the system software to connect the various parts of the application system or different applications on the network, thereby achieving the purpose of resource sharing and function sharing.

[0040] The above is an introduction to the technical terms involved in the embodiments of the present application, which will not be repeated below.

[0041] The implementation of the embodiments of the present application will be described in detail below with reference to the accompanying drawings.

[0042] Figure 1A schematic diagram of a middleware installation system is provided for an embodiment of the present application. The middleware installation system 100 includes a computing device 110 and multiple servers 120. The computing device 110 and the multiple servers 120 communicate via a dedicated network line 130.

[0043] A dedicated network line refers to a communication between the computing device 110 and multiple servers through an independent network line, which can make the data communication between the computing device 110 and multiple servers reliable. For example, the computing device 110 and multiple servers can be connected by wires such as a serial port line or a universal asynchronous receiver / transmitter (UART), or by wireless connections such as wireless signals.

[0044] The computing device 110 may be a server, which may be a single server, or a server cluster consisting of multiple servers. For another example, the computing device may be a mobile phone, a tablet computer, a desktop, a laptop, a handheld computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, and a cellular phone, a personal digital assistant (PDA), an augmented reality (AR), a virtual reality (VR) device and other terminal devices. It should be noted that the embodiments of the present application do not limit the specific form of the computing device, and the above is only an exemplary description. In the following embodiments, only the computing device is a desktop computer as an example for explanation.

[0045] Figure 2 A schematic diagram of the structure of a computing device provided in an embodiment of the present application. The computing device may be the computing device 110 in the above-mentioned middleware installation system 100, and the computing device may be used to execute the above-mentioned middleware installation method.

[0046] like Figure 2 As shown, the computing device 110 includes a processor 210 , a communication circuit 220 , and a communication interface 230 .

[0047] Optionally, the computing device 110 may further include a memory 240 . The processor 210 , the memory 240 and the communication interface 230 may be connected via a communication line 220 .

[0048] The processor 210 may be a central processing unit (CPU), a general-purpose processor, a network processor (NP), a digital signal processor (DSP), a microprocessor, a microcontroller, a programmable logic device (PLD), or any combination thereof. The processor 101 may also be any other device having a processing function, such as a circuit, a device, or a software module, without limitation.

[0049] In one example, the processor 210 may include one or more CPUs, such as Figure 2 CPU0 and CPU1 in.

[0050] As an optional implementation, the computing device 110 includes multiple processors, for example, in addition to the processor 210, it may also include a processor 270. The processor 270 may be the same processor as the processor 210, or may be a different processor. The communication line 220 is used to transmit information between the various components included in the computing device 110.

[0051] The communication interface 230 is used to communicate with other devices or other communication networks. The other communication networks may be Ethernet, Radio Access Network (RAN), Wireless Local Area Networks (WLAN), etc. The communication interface 230 may be a module, a circuit, a transceiver or any device capable of achieving communication.

[0052] The memory 240 is used to store instructions, where the instructions may be computer programs.

[0053] Among them, the memory 240 can be a read-only memory (ROM) or other types of static storage devices that can store static information and / or instructions, or a random access memory (RAM) or other types of dynamic storage devices that can store information and / or instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), magnetic disk storage medium or other magnetic storage devices, etc., without limitation.

[0054] It should be noted that the memory 240 may exist independently of the processor 210 or may be integrated with the processor 210. The memory 240 may be used to store instructions or program codes or some data, etc. The memory 240 may be located in the computing device 110 or outside the computing device 110, without limitation.

[0055] The processor 210 is used to execute the instructions stored in the memory 240 to implement the communication method provided in the following embodiments of the present application. For example, when the computing device 110 is a terminal or a chip in a terminal, the processor 210 can execute the instructions stored in the memory 240 to implement the steps performed by the sending end in the following embodiments of the present application.

[0056] As an optional implementation, the computing device 110 further includes an output device 250 and an input device 260. The output device 250 may be a device such as a display screen, a speaker, etc. that can output data of the computing device 110 to a user. The input device 260 may be a device such as a keyboard, a mouse, a microphone, or a joystick that can input data to the computing device 110.

[0057] It should be pointed out that Figure 2 The structure shown in the figure does not constitute a limitation on the computing device, except Figure 2 In addition to the components shown, the computing device may include more or fewer components than shown, or combine certain components, or arrange the components differently.

[0058] The computing device 110 is used to receive a middleware installation command, which includes a component type of the middleware and a target server; configure the role information and parameter information of the middleware on the target server according to the component type; select an installation directory for the middleware according to the component type; and when the installation directory does not exist on the target server and the survival detection of the target server is successful, install the middleware on the target server according to the role information and parameter information.

[0059] The server 120 is used to install the middleware on the computing device 110 according to the instructions thereof. The server 120 may be a file server, a database server, an application server, etc. It should be noted that the specific form of the server is not limited in the embodiments of the present application, and the above is only an exemplary description. In the following embodiments, only the server is an application server as an example for description.

[0060] The middleware installation system and application scenarios described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Ordinary technicians in this field can know that with the evolution of the middleware installation system and the emergence of new business scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.

[0061] Next, the middleware installation method is described in detail with reference to the accompanying drawings. Figure 3 A flowchart of a middleware installation method provided in this application. Figure 4 A specific flow chart of a middleware installation method provided in this application. The method is applied to Figure 1 The middleware installation system of the hardware structure shown in the figure specifically includes the following steps:

[0062] Step 310: Receive a middleware installation command.

[0063] When a user wants to install a certain middleware on a server in a server cluster, he will enter a middleware installation command on the display interface of the computing device. For example, the display interface of the computing device displays middleware of multiple component types. When the user selects a certain middleware on the display interface of the computing device, it can be regarded as the user issuing a middleware installation command, and the middleware installation command includes the component type of the middleware to be installed and the server identifier of the target server to install the middleware. The above example is only used as an example for explanation and does not limit the specific implementation method of this application.

[0064] In the implementation manner of the present application, after receiving the middleware installation command sent by the user, the computing device parses the middleware installation command to obtain the component type of the middleware to be installed and the target server of the middleware to be installed.

[0065] In this step, the middleware of multiple component types on the display interface of the computing device may be multiple of the following types of middleware.

[0066] The component types of middleware can be classified according to software functions: message middleware, load balancing middleware, web server middleware, and database middleware. Message middleware can be used to solve heterogeneous communication problems between distributed systems. For different system interactions, message middleware can provide communication protocols between applications. Load balancing middleware is used to solve the problem of high concurrent access. Load balancing is often used in applications for important scheduling and distribution. Web server middleware is used to parse HTTP requests. For example, Apache and Nginx are common web server middleware. Database middleware is an application software built on the upper layer of the database, which can transparently provide distributed services and high availability services for applications.

[0067] The component types of middleware can be classified according to the operating system or platform type: Windows middleware that is designed and optimized specifically for the characteristics of the operating system; Linux middleware that provides services specifically for applications running on the Linux platform; cross-platform middleware that can run on a variety of different operating system platforms (such as Windows, Linux, macOS, etc.); and open source middleware with open source code, which developers can customize according to their needs. Windows middleware includes: IIS, ASP.NET, SharePoint, BizTalk, etc. Linux middleware includes: nginx, Tomcat, Memcached, etc. Cross-platform middleware includes: Java EE, Zeromq, etc. Open source middleware includes: AMQ, ActiveMQ, RabbitMQ, etc.

[0068] Step 320: Configure the role information and parameter information of the middleware according to the component type.

[0069] Middleware of different component types corresponds to different roles in the operating system, that is, it has different role information. Middleware of different component types also needs to configure and optimize its functions through configuration parameter information, such as controlling the operation mode of the middleware and managing the resources used by the middleware. Therefore, after the computing device obtains the component type of the middleware to be installed according to the middleware installation command, it configures the role information and parameter information of the middleware according to the component type, so as to facilitate accurate and stable operation after the middleware is installed. In the implementation mode of the present application, the role information of the middleware is used to indicate the process number and port number of the middleware.

[0070] HBase middleware is a software that runs on the HBase cluster. It is responsible for coordinating and managing each node in the HBase cluster to improve the performance and stability of the system. HBase middleware can be divided into two categories: client middleware and server middleware. Client middleware is mainly responsible for processing client requests, such as Hive, Spark, etc.; server middleware is mainly responsible for processing internal affairs of the server, such as HBase's HMaster and RegionServer. HMaster is the manager of the HBase cluster, responsible for managing multiple RegionServers, as well as the management of tables and regions on it, and responding to user data requests. RegionServer is the core component in the HBase cluster, mainly responsible for basic operations such as writing and reading user data.

[0071] Take HBase middleware as an example. If the user wants to install HBase middleware on the target server of the server cluster, the role information of HBase middleware needs to be configured on the target server. For example, the process number and port number corresponding to when HMaster performs management operations, the process number and port number corresponding to when HMaster responds to user requests, and the process number and port number corresponding to when RegionServer performs read operations. This allows HBase middleware to execute the specified process on the specified port after the target server is installed.

[0072] Furthermore, the parameter information of the middleware is configured according to the component type and persisted in the MySQL database to ensure that the configuration parameter information is not lost during system restart or other abnormal situations.

[0073] Step 330: Select the installation directory of the middleware on the target server according to the component type.

[0074] After completing the configuration of the role information and parameter information of the middleware, select the installation directory of the middleware according to the component type, that is, in which directory of the target server the middleware to be installed needs to be installed.

[0075] Further, it is determined whether the installation information of the middleware already exists in the installation directory of the selected target server, for example, it can be determined based on whether the file name in the installation directory is the same as the name of the middleware to be installed. If the installation information of the middleware already exists in the installation directory selected in the target server, it means that the middleware has been installed in the target server, and there is no need to repeatedly install the middleware in the target server. If the installation information of the middleware does not exist in the installation directory selected in the target server, it means that the middleware is not installed in the target server, and the middleware is installed according to step 340.

[0076] Step 340: When there is no installation information of the middleware in the installation directory on the target server and the target server survival detection succeeds, an installation instruction is sent to the target server, where the installation instruction is used to instruct the target server to install the middleware in the installation directory according to the role information and parameter information.

[0077] After completing the above steps 310 to 330, before installing the middleware on the target server according to the role information and parameter information, the following operations need to be performed.

[0078] In order to ensure that the HTTP link channel between the computing device and the target server is normal and avoid abnormal execution of the middleware installation command due to network policies and other reasons. After selecting the installation directory of the middleware according to the component type, before installing the middleware on the target server according to the role information and parameter information, the application also needs to perform a survival detection on the target server, that is, the computing device searches for the information of the target server to determine that the target server is powered on and online, and can respond to the detection packet sent by the computing device.

[0079] For example, a computing device uses a ping scan to detect the survival of a target server. The ping scan mainly uses the Internet Control Message Protocol (ICMP). The ICMP protocol is used to transmit control messages between a computing device and a target. The ICMP protocol belongs to the network layer protocol. When the computing device cannot access the target server, or the target server cannot forward the data packets sent by the computing device at the current transmission rate, the computing device will receive the ICMP message automatically sent by the target server. At this time, it can be considered that the target server is not turned on or is not online.

[0080] It should be noted that the present application does not specifically limit the specific implementation method of the target server survival detection, and the above ping scanning method is only used as an example for explanation. When the target server survival detection is performed, ICMP protocol and Transmission Control Protocol (TCP) protocol can also be used simultaneously.

[0081] When the survival detection of the target server is successful, the computing device sends an installation instruction to the target server. The installation instruction may also include role information, parameter information and installation directory. After receiving the installation instruction, the target server installs the middleware in the installation directory according to the role information and parameter information.

[0082] After receiving the middleware installation command, the computing device of the present application can automatically configure the role information, parameter information, and installation directory of the middleware of each component type according to the middleware installation command, so as to send the role information, parameter information, and installation directory to the target server, and instruct the target server to automatically install the middleware according to the role information, parameter information, and installation directory. The problem of low efficiency of manual installation of middleware is solved.

[0083] Furthermore, in order to ensure that each server in the server cluster can communicate successfully, after selecting the installation directory of the middleware according to the component type, before installing the middleware on the target server according to the role information and parameter information, it is also necessary to map the configuration information of the target server to the server cluster where the target server is located. In one embodiment, the configuration information of the target server is the domain name information of the target server. The domain name is the name of a computer or computer group on the Internet composed of a string of names separated by dots, which is used to locate the computer during data transmission. When each server in the server cluster wants to communicate with the target server, the target server is located according to the domain name information of the target server stored in each server, thereby achieving communication with the target server.

[0084] In order to ensure that each server in the server cluster can communicate with the target server, it is necessary to confirm whether the mapping has been truly completed in each server, that is, after the mapping is completed, the computing device sends a configuration information confirmation request to each server in the server cluster. The configuration information confirmation request includes the configuration information of the target server and the operation request for querying whether the configuration information exists. After receiving the configuration information confirmation request, each server parses the request content, executes the operation of querying whether the configuration information exists, and feeds back the configuration information confirmation result to the computing device. Among them, when sending the configuration information confirmation request to each server in the server cluster, it can be through a button to query the configuration information of the server cluster, or it can be a task that automatically triggers the sending of the configuration information confirmation request after a period of time of initiating the mapping. If at least one of the servers in the server cluster does not have the configuration information of the target server, it means that the server without the configuration information cannot communicate with the target server through the domain name information. At this time, the middleware is not installed on the target server, that is, the installation instruction is not sent to the target server, and an alarm is issued on the computing device.

[0085] By mapping the configuration information of the target server to the server cluster, it is possible to ensure that each server in the server cluster can communicate with each other, thereby improving the communication efficiency of the overall system.

[0086] If each server in the server cluster has configuration information of the target server, it means that the server with the configuration information can communicate with the target server through the domain name information. At this time, it is further determined whether there is installation information of the middleware to be installed on the target server so as to install the middleware to be installed.

[0087] When the target server is powered on and online, each server in the server cluster has the configuration information of the target server, and the installation information of the middleware to be installed does not exist in the installation directory of the target server, the middleware is installed in the installation directory of the target server according to the role information and parameter information.

[0088] In one embodiment, the middleware is installed according to the role information and parameter information, specifically including: first installing the middleware on the target server according to the configuration information and / or default information in the role information and parameter information, and when the target server completes the installation of the middleware in the installation directory, the installation completion information is fed back to the computing device, and then the computing device encapsulates the parameter information of the middleware in the mysql database into a parameter configuration file of the corresponding type of the middleware, and sends a replacement instruction including the parameter configuration file to the target server to instruct the target server to add the parameter configuration file to the installation directory of the middleware to replace the default parameters of the middleware. The parameter information of the middleware is encapsulated into a parameter configuration file of the corresponding type of the middleware, and stored in the mysql database, so that when the middleware is installed again, the configured parameters can be directly used.

[0089] In one implementation, when installing the middleware, the middleware may be directly installed according to the configured role information and parameter information, and each parameter may be automatically set to a parameter value corresponding to the parameter information during the installation of the middleware.

[0090] Encapsulating the parameter information of the middleware into the configuration file type corresponding to the middleware can standardize the data, making the relationship between the configuration file and the middleware clear and concise, so that when the staff wants to maintain the middleware, they can accurately find the correct configuration file among the multiple middleware configuration files in the target server. When different server clusters want to install the middleware, the configured parameter information of the middleware can be directly called from the MySQL database.

[0091] In addition, since the startup of the middleware depends on the environment variables to read some basic environment information, by setting the environment variables, it is easier for the middleware to run stably in a specific environment, such as a development environment, a test environment, and a production environment, and to avoid environmental anomalies during the startup of the middleware. Environment variables are usually configured by the user in the target server. For example, the environment variables include: the JDK (Java Development Kit) environment that the middleware depends on, the directory of the middleware itself, the environment variable configuration of the target server, etc. The middleware is allowed to start only after the environment variable configuration is completed. Therefore, after the middleware is installed, it is also necessary to confirm whether the required environment variables exist in the target server, specifically sending an environment variable confirmation request to the target server. The environment variable confirmation request includes the required environment variables for the middleware to run on the target server, and an operation request to query whether the required environment variables exist. After receiving the environment variable confirmation request, the target server parses the request content, executes the operation of querying whether the required environment variables exist, and feeds back the environment variable confirmation result to the computing device. Among them, when sending the environment variable confirmation request to the target server, it can be through a key to query the required environment variables of the target server, or it can be a task that automatically triggers the sending of the environment variable confirmation request after initiating the environment variable configuration for a period of time. When the computing device receives feedback from the target server that the required environment variables exist, the computing device sends an indication to the middleware: the basic conditions required for subsequent startup are in place, and the middleware can perform subsequent startup operations. When the required environment variables do not exist in the target server, the computing device sends an indication to the middleware: the basic conditions required for the subsequent startup of the middleware are missing, and the subsequent middleware startup operation is not performed. In order for the middleware to start normally, after determining that the basic conditions required for the middleware startup are missing, the computing device sends an environment variable configuration instruction to the target server, and sends an environment variable confirmation request to the target server again after a preset time to confirm whether the required environment variables exist on the target server. If so, the middleware is allowed to start. If not, the environment variable configuration instruction is sent to the target server again until it is determined that the required environment variables exist on the target server.

[0092] By confirming whether the required environment variables exist on the target server, it is possible to more accurately determine whether the installed middleware meets the startup conditions. If the middleware is started without the startup conditions, it will fail to start and waste system operating resources. Therefore, starting the middleware after confirming that the required environment variables exist can save more operating resources.

[0093] After completing the above operation of confirming whether the required environment variables exist in the target server, and determining that the required environment variables exist in the target server, the computing device sends a middleware startup instruction to the target server, and the target server starts the middleware after receiving the startup instruction. Before starting the middleware, it is also necessary to send a first port confirmation request to the target server to request the target server to confirm whether the port indicated by the port number in the role information of the middleware is occupied by other processes, and feed back the first port confirmation result to the computing device. For example, the other process can be the startup process of the middleware, or it can be a read-write process, etc. When the other process is the startup process of the middleware, it means that the middleware has been started on the target server, and there is no need to start it again. When the other process is a read-write process, etc., since a process can occupy multiple ports, a port can only execute one process. Therefore, when the port corresponding to the middleware is occupied by other processes, if the startup process of the middleware is executed, the startup of the middleware will fail. Therefore, after the computing device receives the first port confirmation result that the port is occupied by other processes, it instructs the target server to stop starting the middleware. If the port indicated by the port number in the role information of the middleware is not occupied by a running process, it means that the port corresponding to the middleware is idle. After the target server feeds back a response that the port is idle to the computing device, the computing device sends a start instruction to the target server to instruct the target server to start the middleware.

[0094] Furthermore, after the target server starts the middleware, the computing device sends a second port confirmation request to the target server to request the target server to confirm whether the port indicated by the port number is being used by the startup process of the middleware, and feeds back the second port confirmation result to the computing device. If so, the target server feeds back to the computing device through the second port confirmation result that the middleware is started normally at this time. If not, the target server feeds back to the computing device through the second port confirmation result that the middleware is started abnormally at this time, and after receiving the response of the startup abnormality, the computing device issues an alarm to prompt the staff to perform maintenance.

[0095] Before starting the middleware, it is also necessary to determine whether the port specified by the port number is currently occupied, which can avoid errors caused by failure to run or repeated startup after the startup process. After the middleware is started, by detecting whether the port is currently occupied by the startup process of the middleware, it can be determined whether the middleware startup is normal, thereby achieving accurate startup of the middleware.

[0096] In one embodiment, the target server can be one or more. After determining that the middleware of one or more target servers can be started normally, the status of the server cluster is detected to ensure that the installation of the middleware on one or more target servers will not affect the status of the entire server cluster. First, the status information of the server cluster where the target server is located is obtained according to the component type of the middleware. Specifically, the role information and installation directory configured by each middleware are obtained, and the corresponding monitoring commands are assembled and sent to the corresponding target server. Among them, the monitoring commands sent by different types of middleware are different. The monitoring command formats corresponding to the middleware of different component types can be stored in a preset table. When assembling the command, the corresponding monitoring command format is queried in the preset table according to the component type of the middleware to complete the assembly of the monitoring command. When the target server receives the monitoring command, the monitoring agent on the target server executes the monitoring command to monitor various indicators of the target server, thereby obtaining the status information of the target server, such as the CPU usage, memory usage, disk space, network traffic, etc. of the server. Secondly, the status information of each target server is obtained and parsed to obtain the cluster status of the server cluster. Among them, the target servers with different component types of middleware installed have different status information monitored. The normal status information value can be stored in the target server in advance. After obtaining the status information of the target server, it is compared with the normal status information value. If they are consistent, it means that the target server is in a normal state; if they are inconsistent, it means that the target server is in an abnormal state. When there is at least one target server with an abnormal state, the server cluster state is confirmed to be abnormal, the abnormal state information is sent to the computing device, and an alarm is issued on the computing device. The normal status information value corresponding to each middleware can also be pre-stored on the computing device. The computing device obtains the monitored status information from each target server, and compares the status information of each target server with its corresponding normal status information value in turn. If they are consistent, it means that the target server is in a normal state; if they are inconsistent, it means that the target server is in an abnormal state. When a target server with an abnormal state is detected, an alarm is issued.

[0097] When the cluster status is abnormal, it indicates that the middleware installation failed; when the cluster status is normal, it indicates that the middleware installation was successful. By detecting the running status of the server cluster, it is possible to determine in real time whether the middleware in each target server is successfully installed based on the running status information, and accurately locate the middleware that causes the abnormal status based on the middleware type corresponding to the status information, thereby checking the configuration information of the middleware to determine the cause of the abnormal server status, making it easier to maintain each server.

[0098] Taking HBase middleware as an example, first execute the command: echo "status" | hbase shell to obtain the status information of the server cluster where the target server is located: 1 active master, 1 backup masters, 34 servers, 0 dead, 249.7941 average load. Then parse the status information to obtain the number of active masters, backup masters, servers, and dead servers. If the number of servers is consistent with the source data information of SRE-Middle-service (the number of servers stored in the target server), it means that the HBase middleware is installed normally, recorded as status 1 (active). If the number of dead servers is not 0, it means that the HBase middleware is installed abnormally, recorded as status 1 (inactive). Further, execute the HBase hbck command on the HBase middleware to obtain the status information of the server cluster where the target server is located: Status: OK. If the Status in the status information is ok, it is recorded as status 2 (active). If the Status in the status information is not ok, it is recorded as status 2 (inactive). When both status 1 and status 2 are active, the server cluster is in a normal state. When either status 1 or status 2 is inactive, the server cluster is abnormal and an alarm is required.

[0099] Taking Elasticsearch middleware as an example, first execute the command: cluster / health to obtain the status information of the server cluster where the target server is located: "cluster_name":"es-product", "status":"green", "timed_out":false, "number_of_nodes":6, "number_of_data_nodes":3, "active_primary_shards":1100, "active_shards":2200, "relocating_shards":0, "initializing_shards":0, "unassigned_shards":0, "delayed_unassigned_shards":0, "number_of_pending_tasks":0, "number_of_in_flight_fetch":0, "task_max_waiting_in_queue_millis":0, "active_shards_percent_as_number":100.0. According to the above status information, the status result value can be obtained as green. There are three status states for Elasticsearch middleware: green, yellow, and red. SRE-Middle-service will classify the status states. If the status state of Elasticsearch middleware is green, it will be classified as active (normal startup and running state). If the status state of Elasticsearch middleware is yellow or red, it will be classified as inactive (abnormal running state). If it is active, it means that the server cluster is normal and the Elasticsearch middleware is installed successfully; if it is inactive, it means that the server cluster is abnormal, the Elasticsearch middleware installation fails, and an alarm is issued.

[0100] It should be noted that the above example is only used as an example to explain the status detection of the server cluster, and this application does not limit the specific implementation method of the status detection of the server cluster.

[0101] In summary, after receiving the middleware installation command, the computing device of the present application can automatically configure the role information, parameter information, and installation directory of the middleware of each component type according to the middleware installation command, so as to send the role information, parameter information, and installation directory to the target server, and instruct the target server to automatically install the middleware according to the role information, parameter information, and installation directory. This solves the problem of low efficiency of manual installation of middleware.

[0102] It is understandable that in order to implement the functions in the above embodiments, the computer device includes hardware structures and / or software modules corresponding to the execution of each function. Those skilled in the art should easily realize that, in combination with the units and method steps of each example described in the embodiments disclosed in this application, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application scenario and design constraints of the technical solution.

[0103] Furthermore, as a response to the above Figure 3 The implementation of the method embodiment shown in the figure, the embodiment of the present application provides a middleware installation device, which is used to install the middleware. The embodiment of the device corresponds to the aforementioned method embodiment. For the sake of ease of reading, this embodiment will no longer repeat the details of the aforementioned method embodiment one by one, but it should be clear that the device in this embodiment can correspond to all the contents of the aforementioned method embodiment. Figure 5 As shown, the middleware installation device 500 includes:

[0104] A receiving module 510 is used to receive a middleware installation command, where the middleware installation command includes a component type of the middleware and a target server identifier;

[0105] Configuration module 520, used to configure role information and parameter information of the middleware according to the component type;

[0106] A selection module 530, for selecting an installation directory of the middleware on the target server according to the component type;

[0107] The installation module 540 is used to send an installation instruction to the target server when there is no middleware installation information in the installation directory on the target server and the target server survival detection succeeds. The installation instruction is used to instruct the target server to install the middleware in the installation directory according to the role information and parameter information.

[0108] Further, such as Figure 5As shown, the middleware installation device also includes: a verification module 550, the verification module 550 is used to map the configuration information of the target server to the server cluster where the target server is located; a configuration information confirmation request is sent to each server in the server cluster, the configuration information confirmation request is used to request each server in the server cluster to confirm whether the configuration information of the target server exists, and to feedback the configuration information confirmation result; if the configuration information confirmation result received from at least one server in the server cluster is that the configuration information does not exist, the installation instruction is not sent to the target server, and an alarm is issued.

[0109] Further, such as Figure 5 As shown, the verification module 550 is also used to send an environment variable confirmation request to the target server, the environment variable confirmation request is used to request the target server to confirm whether the required environment variables exist, and to feedback the environment variable confirmation result, the required environment variables are used to indicate the operating environment of the middleware in the target server; if the environment variable confirmation result is that the required environment variables do not exist, an environment variable configuration instruction is sent to the target server, and an environment variable confirmation request is sent to the target server again after a preset time to confirm whether the required environment variables exist.

[0110] Further, such as Figure 5 As shown, the verification module 550 is also used to send a first port confirmation request to the target server, and the first port confirmation request is used to request the target server to confirm whether the port indicated by the port number is occupied by a process, and to feedback the first port confirmation result; if the first port confirmation result is that the port is occupied by a process, the target server is instructed to stop starting the middleware; if the first port confirmation result is that the port is not occupied by a process, the target server is instructed to start the middleware.

[0111] Further, such as Figure 5 As shown, the verification module 550 is also used to, after receiving feedback information from the target server on starting the middleware, send a second port confirmation request to the target server, the second port confirmation request is used to request the target server to confirm whether the port indicated by the port number is being used by the startup process of the middleware, and to feedback the second port confirmation result; if the second port confirmation result is that it is being used by the startup process of the middleware, it is determined that the middleware startup is normal; if the second port confirmation result is that it is not being used by the startup process of the middleware, it is determined that the middleware startup is abnormal, and an alarm is issued.

[0112] Further, such as Figure 5 As shown, the verification module 550 is also used to obtain the status information of the server cluster where the target server is located according to the component type of the middleware; parse the status information to obtain the cluster status of the server cluster; when the cluster status is abnormal, indicate that the middleware installation fails and issue an alarm.

[0113] Further, such as Figure 5 As shown, the verification module 550 is also used to obtain the role information and installation directory of the middleware; query the monitoring command format corresponding to the component type of the middleware through a preset table, and the preset table is a table that stores the correspondence between middleware of different component types and the monitoring command format; assemble the monitoring command according to the role information, installation directory and monitoring command format of the middleware, and send it to the target server; receive the status information fed back by the target server based on the monitoring command.

[0114] Further, such as Figure 5 As shown, the configuration module 520 is also used to, after receiving feedback information that the target server has completed the installation of the middleware in the installation directory, encapsulate the parameter information into a parameter configuration file of the corresponding type of the middleware; and send a replacement instruction to the target server, the replacement instruction includes the encapsulated parameter configuration file, and the replacement instruction is used to instruct the target server to replace the parameter information in the installation directory of the middleware with the parameter configuration file.

[0115] An embodiment of the present application provides a storage medium on which a program is stored, and when the program is executed by a processor, the middleware installation method is implemented.

[0116] An embodiment of the present application provides a processor, which is used to run a program, wherein the middleware installation method is executed when the program is running.

[0117] The present application also provides a computer program product, which, when executed on a data processing device, is suitable for executing an initialization program having the following method steps: receiving a middleware installation command, the middleware installation command including a component type of the middleware and a target server identifier; configuring the role information and parameter information of the middleware according to the component type; selecting an installation directory for the middleware on the target server according to the component type; and when the installation information of the middleware does not exist in the installation directory on the target server and the survival detection of the target server is successful, sending an installation instruction to the target server, the installation instruction being used to instruct the target server to install the middleware in the installation directory according to the role information and parameter information.

[0118] Furthermore, the configuration information of the target server is mapped to the server cluster where the target server is located; a configuration information confirmation request is sent to each server in the server cluster, and the configuration information confirmation request is used to request each server in the server cluster to confirm whether the configuration information of the target server exists, and to feedback the configuration information confirmation result; if the configuration information confirmation result fed back by at least one server in the server cluster is that the configuration information does not exist, the installation instruction is not sent to the target server, and an alarm is issued.

[0119] Furthermore, an environment variable confirmation request is sent to the target server, and the environment variable confirmation request is used to request the target server to confirm whether the required environment variables exist, and to feedback the environment variable confirmation result. The required environment variables are used to indicate the operating environment of the middleware in the target server; if the environment variable confirmation result is that the required environment variables do not exist, an environment variable configuration instruction is sent to the target server, and an environment variable confirmation request is sent to the target server again after a preset time to confirm whether the required environment variables exist.

[0120] Furthermore, a first port confirmation request is sent to the target server, and the first port confirmation request is used to request the target server to confirm whether the port indicated by the port number is occupied by a process, and to feedback the first port confirmation result; if the first port confirmation result is that the port is occupied by a process, the target server is instructed to stop starting the middleware; if the first port confirmation result is that the port is not occupied by a process, the target server is instructed to start the middleware.

[0121] Furthermore, after receiving feedback information from the target server on starting the middleware, a second port confirmation request is sent to the target server. The second port confirmation request is used to request the target server to confirm whether the port indicated by the port number is being used by the startup process of the middleware, and to feedback the second port confirmation result; if the second port confirmation result is that it is being used by the startup process of the middleware, it is determined that the middleware startup is normal; if the second port confirmation result is that it is not being used by the startup process of the middleware, it is determined that the middleware startup is abnormal, and an alarm is issued.

[0122] Furthermore, the status information of the server cluster where the target server is located is obtained according to the component type of the middleware; the status information is parsed to obtain the cluster status of the server cluster; when the cluster status is abnormal, it indicates that the middleware installation has failed and an alarm is issued.

[0123] Furthermore, the role information and installation directory of the middleware are obtained; the monitoring command format corresponding to the component type of the middleware is queried through a preset table, and the preset table is a table that stores the correspondence between middleware of different component types and the monitoring command format; the monitoring command is assembled according to the role information, installation directory and monitoring command format of the middleware, and sent to the target server; and the status information fed back by the target server according to the monitoring command is received.

[0124] Furthermore, after receiving feedback information that the target server has completed the installation of the middleware in the installation directory, the parameter information is encapsulated into a parameter configuration file of the corresponding type of the middleware; a replacement instruction is sent to the target server, the replacement instruction includes the encapsulated parameter configuration file, and the replacement instruction is used to instruct the target server to replace the parameter information in the installation directory of the middleware with the parameter configuration file.

[0125] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0126] In a typical configuration, the device includes one or more processors (CPU), memory and bus. The device may also include input / output interface, network interface and the like.

[0127] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip. The memory is an example of a computer-readable medium.

[0128] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0129] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0130] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.

[0131] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included within the scope of the claims of the present application.

Claims

1. A middleware installation method, characterized in that: Applied to a computing device, the method comprises: receiving a middleware installation command, wherein the middleware installation command includes a component type of the middleware and a target server identifier; Configure the role information and parameter information of the middleware according to the component type; Selecting the installation directory of the middleware on the target server according to the component type; When the installation information of the middleware does not exist in the installation directory on the target server and the survival detection of the target server is successful, an installation instruction is sent to the target server, wherein the installation instruction is used to instruct the target server to install the middleware in the installation directory according to the role information and the parameter information.

2. The method according to claim 1, characterized in that The method further comprises: Mapping the configuration information of the target server to the server cluster where the target server is located; Sending a configuration information confirmation request to each server in the server cluster, wherein the configuration information confirmation request is used to request each server in the server cluster to confirm whether the configuration information of the target server exists, and to feed back a configuration information confirmation result; If the configuration information confirmation result received from at least one server in the server cluster is that the configuration information does not exist, the installation instruction is not sent to the target server, and an alarm is issued.

3. The method according to claim 1, characterized in that The method further comprises: Sending an environment variable confirmation request to the target server, wherein the environment variable confirmation request is used to request the target server to confirm whether the required environment variables exist and to feed back the environment variable confirmation result, wherein the required environment variables are used to indicate the operating environment of the middleware in the target server; If the result of the environment variable confirmation is that the required environment variable does not exist, an environment variable configuration instruction is sent to the target server, and the environment variable confirmation request is sent to the target server again after a preset time to confirm whether the required environment variable exists.

4. The method according to claim 1, characterized in that: The role information includes the port number of the middleware, and the method further includes: Sending a first port confirmation request to the target server, wherein the first port confirmation request is used to request the target server to confirm whether the port indicated by the port number is currently occupied by a process, and to feed back a first port confirmation result; If the first port is confirmed to be occupied by a process, instructing the target server to stop starting the middleware; If the first port is confirmed to be not occupied by any process, the target server is instructed to start the middleware.

5. The method according to claim 4, characterized in that The method further comprises: After receiving feedback information from the target server that the middleware is started, sending a second port confirmation request to the target server, the second port confirmation request is used to request the target server to confirm whether the port indicated by the port number is being used by the startup process of the middleware, and feeding back a second port confirmation result; If the confirmation result of the second port is that it is being used by the startup process of the middleware, it is determined that the startup of the middleware is normal; If the confirmation result of the second port is that it is not used by the startup process of the middleware, it is determined that the startup of the middleware is abnormal and an alarm is issued.

6. The method according to claim 1, characterized in that The method further comprises: Acquire status information of the server cluster where the target server is located according to the component type of the middleware; Parsing the status information to obtain the cluster status of the server cluster; When the cluster status is abnormal, it indicates that the middleware installation has failed and an alarm is issued.

7. The method according to claim 6, characterized in that Acquiring the status information of the server cluster where the target server is located according to the component type of the middleware, including: Obtaining the role information and installation directory of the middleware; Querying the monitoring command format corresponding to the component type of the middleware through a preset table, wherein the preset table is a table storing the corresponding relationship between the middleware of different component types and the monitoring command format; Assembling a monitoring command according to the role information, installation directory and monitoring command format of the middleware, and sending it to the target server; Receive status information fed back by the target server according to the monitoring command.

8. The method according to claim 1, characterized in that The method further comprises: After receiving feedback information that the target server has completed the installation of the middleware in the installation directory, encapsulating the parameter information into a parameter configuration file of a corresponding type of the middleware; A replacement instruction is sent to the target server, wherein the replacement instruction includes an encapsulated parameter configuration file, and the replacement instruction is used to instruct the target server to replace the parameter information in the installation directory of the middleware with the parameter configuration file.

9. A middleware installation device, characterized in that: The device comprises: A receiving module, configured to receive a middleware installation command, wherein the middleware installation command includes a component type of the middleware and a target server identifier; A configuration module, used to configure the role information and parameter information of the middleware according to the component type; A selection module, used for selecting an installation directory of the middleware on a target server according to the component type; An installation module is used to send an installation instruction to the target server when the installation information of the middleware does not exist in the installation directory on the target server and the survival detection of the target server is successful. The installation instruction is used to instruct the target server to install the middleware in the installation directory according to the role information and the parameter information.

10. A storage medium, characterized in that: The storage medium includes a stored program, wherein when the program is running, the device where the storage medium is located is controlled to execute the middleware installation method according to any one of claims 1 to 8.

11. An electronic device, characterized in that: The device includes at least one processor, and at least one memory and a bus connected to the processor; wherein the processor and the memory communicate with each other through the bus; the processor is used to call program instructions in the memory to execute the middleware installation method as described in any one of claims 1-8.