Operating system replacement method, device, electronic device and readable storage medium
By managing the communication connection between the server and the client node, system replacement tasks are obtained and generated, automated operating system replacement is realized, and the problems of difficult and workload of manual replacement are solved, and fast and simple operating system replacement is realized.
Patent Information
- Application Number
- CN202211682443.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-26
- Publication Date
- 2025-02-11
- Estimated Expiration
- 2042-12-26
AI Technical Summary
In the prior art, manual operating system replacement is difficult, workload and complex, especially when the equipment updates of public cloud services.
By establishing a communication connection with the client node through the management server, obtaining the current configuration information of the client node's first operating system, generating a system replacement task, and sending it to the client node to realize automated operating system replacement.
It realizes unified management of operating system replacement of batch client nodes, reduces the dependence of manual intervention, simplifies the operating system replacement process, and significantly reduces workload and complexity.
Smart Images

Figure CN116132276B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of computer technology, and in particular relates to an operating system replacement method, device, electronic equipment and readable storage medium. Background Art
[0002] The operation of public cloud services depends on specialized operating systems. Currently, as support for the original operating systems has been discontinued, the operating systems of a large number of devices running public cloud services need to be updated.
[0003] In the prior art, manual operations are often used to migrate the business of the operating system, reinstall the system, reconfigure related configurations, etc.
[0004] However, since the operating system is located at a relatively low level, manual system replacement is difficult, labor-intensive, and complex. Summary of the invention
[0005] The present invention provides an operating system replacement method, device, electronic device and readable storage medium to solve the technical problems of the difficulty, workload and complexity of manual system replacement.
[0006] In a first aspect, the present invention provides an operating system replacement method, which is applied to a management server, and the method comprises:
[0007] In a case of establishing a communication connection with a client node on which a first operating system is installed, obtaining current first configuration information of the first operating system from the client node;
[0008] generating a system replacement task corresponding to each of the client nodes according to the first configuration information, wherein the system replacement task includes second configuration information corresponding to each of the client nodes;
[0009] The system replacement task is sent to the client node, so that the client node generates a second operating system according to the second configuration information to replace the first operating system.
[0010] In a second aspect, the present invention provides an operating system replacement method, which is applied to a client node, wherein the client node is installed with a first operating system, and the method comprises:
[0011] When establishing a communication connection with a management server, providing the management server with current first configuration information of a first operating system, so that the management server generates a system replacement task corresponding to the client node according to the first configuration information;
[0012] When the system replacement task sent by the management server is obtained, parsing the system replacement task to obtain second configuration information corresponding to the client node;
[0013] The first configuration information is replaced by the second configuration information, so that the first operating system of the client node is replaced by the second operating system.
[0014] In a third aspect, the present invention provides an operating system replacement device, which is applied to a management server, and the device includes:
[0015] an acquisition module, configured to acquire current first configuration information of the first operating system from a client node installed with the first operating system when a communication connection is established with the client node installed with the first operating system;
[0016] A generating module, configured to generate a system replacement task corresponding to each of the client nodes according to the first configuration information, wherein the system replacement task includes second configuration information corresponding to each of the client nodes;
[0017] The sending module is used to send the system replacement task to the client node, so that the client node generates a second operating system according to the second configuration information to replace the first operating system.
[0018] A providing module is used to provide the management server with current first configuration information of the first operating system when a communication connection with the management server is established, so that the management server generates a system replacement task corresponding to the client node according to the first configuration information;
[0019] A parsing module, configured to parse the system replacement task sent by the management server to obtain the second configuration information corresponding to the client node;
[0020] A replacement module is used to replace the first configuration information with the second configuration information, so that the first operating system of the client node is replaced by the second operating system.
[0021] In a fifth aspect, the present invention provides an electronic device comprising: a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned operating system replacement method when executing the program.
[0022] In a sixth aspect, the present invention provides a readable storage medium, which, when instructions in the storage medium are executed by a processor of an electronic device, enables the electronic device to execute the above-mentioned operating system replacement method.
[0023] In an embodiment of the present invention, the management server generates a system replacement task corresponding to the client node according to the current first configuration information of the first operating system of the client node, and sends the system replacement task containing the second configuration information to the client node, so that the client node can automatically execute the system replacement task and generate the second operating system to replace the first operating system. The client node can automatically install the new second operating system and restore the original business deployment and related configurations in the client node according to the second configuration information, thereby realizing unified management of the replacement of operating systems of batch client nodes. The whole process is fast and simple, which greatly reduces the reliance on manual replacement and reduces the workload and complexity of operating system replacement. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0025] Figure 1 is a flowchart of a method for replacing an operating system provided by an embodiment of the present invention;
[0026] Figure 2 It is an implementation scenario diagram provided by an embodiment of the present invention;
[0027] Figure 3 An interactive step diagram of an operating system replacement method provided by an embodiment of the present invention;
[0028] Figure 4 is a flowchart of another operating system replacement method provided by an embodiment of the present invention;
[0029] Figure 5 is a flow chart of a replacement action of a client node provided by an embodiment of the present invention;
[0030] Figure 6 is a structural diagram of an operating system replacement device provided by an embodiment of the present invention;
[0031] Figure 7 is a structural diagram of another operating system replacement device provided by an embodiment of the present invention;
[0032] Figure 8 It is a structural diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0033] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0034] Figure 1 is a flowchart of a method for replacing an operating system provided by an embodiment of the present invention, which is applied to a management server, such as Figure 1 As shown, the method may include:
[0035] Step 101: When establishing a communication connection with a client node on which a first operating system is installed, obtain current first configuration information of the first operating system from the client node.
[0036] In the embodiment of the present invention, referring to Figure 2 , which shows an implementation scenario diagram provided by an embodiment of the present invention, including: a management server and multiple client nodes. The embodiment of the present invention aims to interact with the client node that needs to replace the operating system through the management server, thereby automatically realizing the replacement of the first operating system to the second operating system in the client node and minimizing manual intervention in the process.
[0037] In this step, the management server first needs to establish a communication connection with the client node installed with the first operating system. After the communication connection is established, data information interaction can be achieved between the management server and the client node, so that the management server can obtain the current first configuration information of the first operating system from the client node.
[0038] Specifically, after obtaining the communication address of the client node, the management server can establish a communication connection with the client node. Furthermore, the client node can extract the current first configuration information of its own first operating system (old operating system) and send it to the management server. The current first configuration information of the first operating system is used to reflect the configuration of the software package, network configuration, system configuration and other information of the business application currently involved and installed by the client node. This information can be used by the management server to understand the business deployment and configuration of the current operating system of the client node, so that the management server can subsequently generate system replacement tasks that meet the needs of the client node itself based on this information.
[0039] Step 102: Generate a system replacement task corresponding to each of the client nodes according to the first configuration information, wherein the system replacement task includes second configuration information corresponding to each of the client nodes.
[0040] Optionally, the first configuration information and the second configuration information both include: one or more of network configuration information, software package configuration information, and system configuration information.
[0041] In an embodiment of the present invention, when a client node needs to be replaced and a new operating system installed, the new operating system must ensure that the previous business deployment of the client node remains unchanged, and also needs to ensure that the previous configuration of the client node (system configuration, software package configuration, network configuration, etc.) remains unchanged. Since the first configuration information reflects the business conditions and configuration conditions of the client node that have been deployed before, the management server can generate a system replacement task corresponding to each client node based on the first configuration information, and the system replacement task can include the second configuration information corresponding to the client node.
[0042] Specifically, the system replacement task is an automatically executable software process, and the system replacement task can be sent by the management server to the client node for automatic operation. The second configuration information is the information existing in the system replacement task, and the second configuration information inherits the business applications and related configurations deployed by the first configuration information, and can restore the original business deployment and related configurations in the new operating system of the client node when the client node executes the system replacement task.
[0043] Step 103: Send the system replacement task to the client node, so that the client node generates a second operating system according to the second configuration information to replace the first operating system.
[0044] After the management server sends the system replacement task to the client node, the client node can automatically execute the system replacement task and generate a second operating system to replace the first operating system according to the second configuration information in the system replacement task. The client node can restore the original business deployment and related configurations in the client node while installing the new second operating system.
[0045] Optionally, the method may further include:
[0046] Step 104: In response to the modification operation on the software package configuration information of the second configuration information, modify the software package configuration information of the second configuration information.
[0047] It should be noted that the second configuration information may also be configuration information obtained after further secondary modification based on the first configuration information. The relevant modification may be determined by actual needs, and the embodiment of the present invention does not limit this.
[0048] For example, the first configuration information defines that the client node has business application a, business application b, and business application c installed. According to actual needs, it is expected to add a business node d to the client node. The second configuration information can further define business application d based on the definition that the client node has business application a, business application b, and business application c installed.
[0049] Optionally, the method may further include:
[0050] Step 105: Acquire the communication address of the client node, and establish a communication connection with the client node according to the communication address.
[0051] In one implementation of the embodiment of the present invention, a staff member may obtain the communication address of the client node and input the communication address into the operating software platform of the management server, so that the management server may establish a communication connection with the client node through the communication address.
[0052] Optionally, the method further includes:
[0053] Step 106: Obtain the system replacement status information sent by the client node.
[0054] Step 107: Generate and store a system replacement log according to the system replacement status information of the client node.
[0055] In an embodiment of the present invention, for steps 106-107, after completing the operating system replacement, the client node can generate system replacement status information and send it to the management server. The system replacement status information reflects the execution result of the client node's operating system replacement operation, including replacement success, replacement failure and other information. Based on the system replacement status information, the management server can generate and store a system replacement log. The system replacement log generated by the management server can be used to reflect the management server's system replacement record for batch client nodes. Later, the system replacement of the client nodes can be managed based on the system replacement log.
[0056] Reference Figure 3, which shows an interactive step flow chart of an operating system replacement method provided by an embodiment of the present invention, including: S1, the management server collects the first configuration information to be replaced in the client node; S2, the client node returns the first configuration information; S3, the management server generates a system replacement task corresponding to the client node and sends it to the corresponding client node; S4, the client node automatically completes the operating system replacement according to the system replacement task, and sends the system status information after the replacement to the management server; S5, the management server restarts the client node after detecting that the replacement is successful, and restores the original operating system of the client node if the replacement fails; finally, S6, the management server can also generate a system replacement log for the administrator to view.
[0057] In summary, in the operating system replacement method provided by the embodiment of the present invention, the management server generates a system replacement task corresponding to the client node according to the current first configuration information of the first operating system of the client node, and sends the system replacement task containing the second configuration information to the client node, so that the client node can automatically execute the system replacement task and generate the second operating system to replace the first operating system. The client node can automatically install the new second operating system and restore the original business deployment and related configurations in the client node according to the second configuration information, thereby realizing unified management of the replacement of operating systems of batch client nodes. The whole process is fast and simple, which greatly reduces the dependence on manual replacement and reduces the workload and complexity of operating system replacement.
[0058] Figure 4 is a flowchart of a method for replacing an operating system provided by an embodiment of the present invention, which is applied to a client node, wherein the client node is installed with a first operating system, such as Figure 4 As shown, the method may include:
[0059] Step 201: When a communication connection is established with a management server, current first configuration information of a first operating system is provided to the management server, so that the management server generates a system replacement task corresponding to the client node according to the first configuration information.
[0060] In an embodiment of the present invention, the client node can provide its own communication address to the management server. After obtaining the communication address of the client node, the management server can establish a communication connection with the client node. After establishing the communication connection, the client node can provide the management server with the current first configuration information of the first operating system. The current first configuration information of the first operating system is used to reflect the business applications, network configurations, system configurations and other information currently involved and installed by the client node. This information can be used by the management server to understand the business deployment and configuration of the current operating system of the client node, so that the management server can subsequently generate system replacement tasks that meet the needs of the client node itself based on this information.
[0061] Step 202: When the system replacement task sent by the management server is obtained, the system replacement task is parsed to obtain second configuration information corresponding to the client node.
[0062] In the embodiment of the present invention, the system replacement task is an automatically executable software process, and the system replacement task can be sent by the management server to the client node for automatic operation. The second configuration information is information existing in the system replacement task, and the second configuration information inherits the business application and related configuration deployed by the first configuration information, and can restore the original business deployment and related configuration in the new operating system of the client node when the client node executes the system replacement task.
[0063] Step 203: Replace the first configuration information with the second configuration information, so that the first operating system of the client node is replaced by the second operating system.
[0064] After the management server sends the system replacement task to the client node, the client node can automatically execute the system replacement task and generate a second operating system to replace the first operating system according to the second configuration information in the system replacement task. The client node can restore the original business deployment and related configurations in the client node while installing the new second operating system.
[0065] Optionally, the first configuration information and the second configuration information both include: one or more of network configuration information, software package configuration information, and system configuration information.
[0066] Optionally, in the process of the client node providing the first configuration information, the method further includes:
[0067] Step 204: Obtain the network configuration information of the first configuration information through the path: / etc / sysconfig / network-scirpts / .
[0068] In the embodiment of the present invention, the network card configuration files can be extracted from the path of the client node: / etc / sysconfig / network-scirpts, and these files can be used as the network configuration information of the first configuration information.
[0069] Step 205: Obtain the software package configuration information of the first configuration information by running the rpm-qa command.
[0070] In an embodiment of the present invention, the client node can obtain a list of all packages installed by the current first operating system through RPM (a powerful command-line driven software package management tool used to install, uninstall, verify, query and update software packages on the Linux system) by running the rpm-qa command. The information in the list can be extracted and used as the software package configuration information of the first configuration information, so that the software package configuration information reflects the configuration of the business application implemented for the first operating system in the current client node.
[0071] Step 206: Obtain system configuration information of the first configuration information by acquiring a system configuration file and a configuration file of system installation software.
[0072] The system configuration information includes all system configuration files in the / etc / directory, as well as all configuration files for system installed software in the / usr / local and / opt / directories.
[0073] Optionally, step 203 may specifically include:
[0074] Sub-step 2031: Modify the yum source of the first operating system through the second configuration information, thereby replacing the first configuration information.
[0075] Sub-step 2032: When it is determined that the availability check of the modified yum source passes, the replacement operation of the first operating system to the second operating system is completed by running the modified yum source.
[0076] In the embodiment of the present invention, for sub-steps 2031-2032, the yum (Yellow Dog Updater, Modifier) source is a free, open source command line software package management tool that can run on a Linux operating system based on RPM package management. The yum source can automatically download and install RPM packages from a specified server based on RPM package management, and can automatically handle dependency relationships, installing all dependent software packages at one time without the need to download and install them tediously again and again.
[0077] Therefore, based on the second configuration information in the system replacement task sent by the management server, the client node can update and replace the software repository of the yum source, that is, replace the software application deployment and related configuration defined by the first configuration information with the software application deployment and related configuration defined by the second configuration information.
[0078] Furthermore, after the replacement, the availability of the modified yum source can be determined. When it is determined that the availability check of the modified yum source passes, the replacement operation of software deployment and related configurations from the first operating system to the second operating system is completed by running the modified yum source.
[0079] The availability check of the yum source includes: adding the repo file to the / etc / yun.d.repo / directory, executing yum clean all, and then executing yum makecache to return information without error, indicating that the yum source is available.
[0080] Optionally, after step 203, the following steps may also be included:
[0081] Step 207: Execute a system restart operation, and after the restart is completed, obtain the system replacement status information.
[0082] Step 208: Send the status information of the system after replacement to the management server.
[0083] In an embodiment of the present invention, for steps 207-208, after completing the operating system replacement, the client node can generate system replacement status information and send it to the management server. The system replacement status information reflects the execution result of the client node's operating system replacement operation, including replacement success, replacement failure and other information. Based on the system replacement status information, the management server can generate and store a system replacement log. The system replacement log generated by the management server can be used to reflect the management server's system replacement record for batch client nodes. Later, the system replacement of the client nodes can be managed based on the system replacement log.
[0084] Optionally, the method may further include:
[0085] Step 209: Back up the relevant files of the first operating system.
[0086] After step 203, the method may further include:
[0087] Step 210, in response to the system recovery instruction sent by the management server, the operating system currently running on the client node is restored to the first operating system based on the backed-up related files of the first operating system; the system recovery instruction is an instruction sent by the management server when the status information check after the system replacement fails.
[0088] In an embodiment of the present invention, with respect to steps 209-210, the client node may also back up the relevant files of the original first operating system before replacing the operating system, and after replacing the first operating system with the second operating system, in response to the recovery system instruction sent by the management server, restore the operating system currently running on the client node to the first operating system based on the relevant files of the backed-up first operating system.
[0089] Among them, the system recovery instruction is an instruction sent by the management server when the system status information check after replacement fails. Therefore, when the management server believes that the operating system replacement of the client node is unsuccessful, the management server can also restore the original first operating system of the client node to ensure the normal operation of the client node and avoid abnormal operation of the client node due to unsuccessful operating system replacement.
[0090] In summary, refer to Figure 5 , which shows a replacement action flow chart of a client node provided by an embodiment of the present invention, including: the client node parses the replacement configuration file to obtain the second configuration information; then the client node backs up the source system and installs the in-situ replacement tool, and then the client node replaces the Yum repository with the repo of the second operating system; the client node performs the local replacement operation, and then the management server only needs to check the operating system after replacement, complete the operating system replacement if the check passes, and restore the original operating system backed up by the client node if the check fails.
[0091] In summary, in the operating system replacement method provided by the embodiment of the present invention, the management server generates a system replacement task corresponding to the client node according to the current first configuration information of the first operating system of the client node, and sends the system replacement task containing the second configuration information to the client node, so that the client node can automatically execute the system replacement task and generate the second operating system to replace the first operating system. The client node can automatically install the new second operating system and restore the original business deployment and related configurations in the client node according to the second configuration information, thereby realizing unified management of the replacement of operating systems of batch client nodes. The whole process is fast and simple, which greatly reduces the dependence on manual replacement and reduces the workload and complexity of operating system replacement.
[0092] Figure 6: is a structural diagram of an operating system replacement device provided by an embodiment of the present invention, which is applied to a management server, and the device may include:
[0093] The acquisition module 301 is used to acquire the current first configuration information of the first operating system from the client node when establishing a communication connection with the client node on which the first operating system is installed;
[0094] A generating module 302, configured to generate a system replacement task corresponding to each of the client nodes according to the first configuration information, wherein the system replacement task includes second configuration information corresponding to each of the client nodes;
[0095] The sending module 303 is used to send the system replacement task to the client node, so that the client node generates a second operating system according to the second configuration information to replace the first operating system.
[0096] Optionally, the first configuration information and the second configuration information both include: one or more of network configuration information, software package configuration information, and system configuration information.
[0097] Optionally, the device further comprises:
[0098] The modification module is used to modify the software package configuration information of the second configuration information in response to a modification operation on the software package configuration information of the second configuration information.
[0099] Optionally, the device further comprises:
[0100] The address module is used to obtain the communication address of the client node and establish a communication connection with the client node according to the communication address.
[0101] Optionally, the device further comprises:
[0102] A post-replacement information acquisition module, used to acquire the post-replacement status information of the system sent by the client node;
[0103] The log module is used to generate and store a system replacement log according to the system status information after the client node is replaced.
[0104] In summary, in the operating system replacement method provided by the embodiment of the present invention, the management server generates a system replacement task corresponding to the client node according to the current first configuration information of the first operating system of the client node, and sends the system replacement task containing the second configuration information to the client node, so that the client node can automatically execute the system replacement task and generate the second operating system to replace the first operating system. The client node can automatically install the new second operating system and restore the original business deployment and related configurations in the client node according to the second configuration information, thereby realizing unified management of the replacement of operating systems of batch client nodes. The whole process is fast and simple, which greatly reduces the dependence on manual replacement and reduces the workload and complexity of operating system replacement.
[0105] Figure 7 : is a structural diagram of an operating system replacement device provided by an embodiment of the present invention, which is applied to a management server, and the device may include:
[0106] A providing module 401 is used to provide the management server with current first configuration information of the first operating system when a communication connection with the management server is established, so that the management server generates a system replacement task corresponding to the client node according to the first configuration information;
[0107] A parsing module 402 is used to parse the system replacement task sent by the management server to obtain the second configuration information corresponding to the client node;
[0108] The replacement module 403 is configured to replace the first configuration information with the second configuration information, so that the first operating system of the client node is replaced with the second operating system.
[0109] Optionally, the first configuration information and the second configuration information both include: one or more of network configuration information, software package configuration information, and system configuration information.
[0110] Optionally, in the process of providing the first configuration information, the apparatus further includes:
[0111] A first extraction module, used for obtaining the network configuration information of the first configuration information through the path: / etc / sysconfig / network-scirpts / ;
[0112] A second extraction module is used to obtain the software package configuration information of the first configuration information by running the rpm-qa command;
[0113] The third extraction module is used to obtain the system configuration information of the first configuration information by acquiring the system configuration file and the configuration file of the system installation software.
[0114] Optionally, the replacement module 403 includes:
[0115] A replacement submodule, used to modify the yum source of the first operating system through the second configuration information, thereby replacing the first configuration information;
[0116] The running submodule is used to complete the replacement operation of the first operating system to the second operating system by running the modified yum source when it is determined that the availability check of the modified yum source passes.
[0117] Optionally, the device further comprises:
[0118] The restart module is used to execute the system restart operation and obtain the system replacement status information after the restart is completed;
[0119] The sending module is used to send the status information of the system after replacement to the management server.
[0120] Optionally, the device further comprises:
[0121] A backup module, used for backing up the relevant files of the first operating system;
[0122] A recovery module is used to respond to a system recovery instruction sent by the management server and restore the operating system currently running on the client node to the first operating system based on the backed-up related files of the first operating system; the system recovery instruction is an instruction sent by the management server when the status information check after the system replacement fails.
[0123] In summary, in the operating system replacement method provided by the embodiment of the present invention, the management server generates a system replacement task corresponding to the client node according to the current first configuration information of the first operating system of the client node, and sends the system replacement task containing the second configuration information to the client node, so that the client node can automatically execute the system replacement task and generate the second operating system to replace the first operating system. The client node can automatically install the new second operating system and restore the original business deployment and related configurations in the client node according to the second configuration information, thereby realizing unified management of the replacement of operating systems of batch client nodes. The whole process is fast and simple, which greatly reduces the dependence on manual replacement and reduces the workload and complexity of operating system replacement.
[0124] The present invention also provides an electronic device, see Figure 8, including: a processor 901, a memory 902, and a computer program 9021 stored in the memory and executable on the processor, wherein when the processor executes the program, the operating system replacement method of the aforementioned embodiment is implemented.
[0125] The present invention also provides a readable storage medium, when the instructions in the storage medium are executed by the processor of the electronic device, the electronic device can execute the operating system replacement method of the aforementioned embodiment.
[0126] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0127] It should be noted that the various information and data obtained in the embodiments of the present invention are all obtained with the authorization of the information / data holder.
[0128] The algorithm and display provided herein are not inherently related to any particular computer, virtual system or other device. Various general purpose systems can also be used together with the teachings based on this. According to the above description, it is obvious that the structure required for constructing such systems. In addition, the present invention is not directed to any specific programming language either. It should be understood that various programming languages can be utilized to realize the content of the present invention described herein, and the description of the above specific languages is for disclosing the best mode of the present invention.
[0129] In the description provided herein, a large number of specific details are described. However, it is understood that embodiments of the present invention can be practiced without these specific details. In some instances, well-known methods, structures and techniques are not shown in detail so as not to obscure the understanding of this description.
[0130] Similarly, it should be understood that in order to streamline the present invention and aid in understanding one or more of the various inventive aspects, in the above description of exemplary embodiments of the present invention, the various features of the present invention are sometimes grouped together into a single embodiment, figure, or description thereof. However, this disclosed method should not be interpreted as reflecting the following intention: that the claimed invention requires more features than the features explicitly recited in each claim. More specifically, as reflected in the claims below, inventive aspects lie in less than all the features of the individual embodiments disclosed above. Therefore, the claims that follow the specific embodiment are hereby expressly incorporated into the specific embodiment, with each claim itself serving as a separate embodiment of the present invention.
[0131] Those skilled in the art will appreciate that the modules in the devices in the embodiments may be adaptively changed and arranged in one or more devices different from the embodiments. The modules or units or components in the embodiments may be combined into one module or unit or component, and in addition they may be divided into a plurality of submodules or subunits or subcomponents. Except that at least some of such features and / or processes or units are mutually exclusive, all features disclosed in this specification (including the accompanying claims, abstracts and drawings) and all processes or units of any method or device disclosed in this manner may be combined in any combination. Unless otherwise expressly stated, each feature disclosed in this specification (including the accompanying claims, abstracts and drawings) may be replaced by an alternative feature providing the same, equivalent or similar purpose.
[0132] The various component embodiments of the present invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. It should be understood by those skilled in the art that a microprocessor or digital signal processor (DSP) may be used in practice to implement some or all of the functions of some or all of the components in the sorting device according to the present invention. The present invention may also be implemented as a device or apparatus program for executing part or all of the methods described herein. Such a program for implementing the present invention may be stored on a computer-readable medium, or may be in the form of one or more signals. Such a signal may be downloaded from an Internet website, or provided on a carrier signal, or provided in any other form.
[0133] It should be noted that the above embodiments illustrate the present invention rather than limit it, and that those skilled in the art may devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference symbol between brackets shall not be construed as a limitation on the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "one" or "an" preceding an element does not exclude the presence of a plurality of such elements. The present invention may be implemented by means of hardware comprising a number of different elements and by means of a suitably programmed computer. In a unit claim enumerating a number of devices, several of these devices may be embodied by the same hardware item. The use of the words first, second, and third, etc., does not indicate any order. These words may be interpreted as names.
[0134] The user information (including but not limited to the user's device information, user personal information, etc.) and related data involved in the present invention are all information authorized by the user or by all parties.
[0135] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0136] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
[0137] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims
1. A method for replacing an operating system, applied to a management server, characterized in that: The method comprises: Acquire a communication address of a client node, and establish a communication connection with the client node according to the communication address; In a case of establishing a communication connection with a client node on which a first operating system is installed, obtaining current first configuration information of the first operating system from the client node; generating a system replacement task corresponding to each of the client nodes according to the first configuration information, wherein the system replacement task includes second configuration information corresponding to each of the client nodes; Sending the system replacement task to the client node, the system replacement task automatically runs, so that the client node generates a second operating system according to the second configuration information to replace the first operating system; Obtaining the system replacement status information sent by the client node, detecting whether the replacement is successful, if the replacement is successful, restarting the client node, and if the replacement fails, restoring the original operating system of the client node; According to the system replacement status information of the client node, a system replacement log is generated and stored.
2. The method according to claim 1, characterized in that: The first configuration information and the second configuration information both include: one or more of network configuration information, software package configuration information, and system configuration information.
3. The method according to claim 2, characterized in that The method further comprises: In response to a modification operation on the software package configuration information of the second configuration information, the software package configuration information of the second configuration information is modified.
4. An operating system replacement method, applied to a client node, wherein the client node is installed with a first operating system, characterized in that: The method comprises: Providing a communication address of the client node to a management server; and providing the management server with current first configuration information of a first operating system when a communication connection with the management server is established, so that the management server generates a system replacement task corresponding to the client node according to the first configuration information; When a system replacement task sent by the management server is obtained, the system replacement task is automatically executed, the system replacement task is parsed, and the second configuration information corresponding to the client node is obtained; Replacing the first configuration information with the second configuration information, so that the first operating system of the client node is replaced with the second operating system; Send the replaced system status message to the management server, and restart or restore the original operating system according to the instructions of the management server.
5. The method according to claim 4, characterized in that The first configuration information and the second configuration information both include: one or more of network configuration information, software package configuration information, and system configuration information.
6. The method according to claim 5, characterized in that In the process of providing the first configuration information, the method further includes: Obtain the network configuration information of the first configuration information through the path: / etc / sysconfig / network-scirpts / ; Obtaining software package configuration information of the first configuration information by running the rpm-qa command; The system configuration information of the first configuration information is obtained by acquiring a system configuration file and a configuration file of system installation software.
7. The method according to claim 5, characterized in that The replacing the first configuration information with the second configuration information so that the first operating system of the client node is replaced with the second operating system includes: Modify the yum source of the first operating system through the second configuration information, thereby replacing the first configuration information; When it is determined that the availability check of the modified yum source passes, the replacement operation of the first operating system to the second operating system is completed by running the modified yum source.
8. The method according to claim 4, characterized in that After the first operating system is replaced with the second operating system, the method further includes: Execute the system restart operation, and after the restart is completed, obtain the system replacement status information; The status information of the system after replacement is sent to the management server.
9. The method according to claim 7, characterized in that: After parsing the system replacement task and obtaining second configuration information corresponding to the client node, the method further includes: Backing up the relevant files of the first operating system; After the first operating system is replaced with the second operating system, the method further includes: In response to the system recovery instruction sent by the management server, the operating system currently running on the client node is restored to the first operating system based on the backed-up relevant files of the first operating system; the system recovery instruction is an instruction sent by the management server when the status information check after the system replacement fails.
10. An operating system replacement device, applied to a management server, characterized in that: The device comprises: An address module, used to obtain a communication address of a client node and establish a communication connection with the client node according to the communication address; an acquisition module, configured to acquire current first configuration information of the first operating system from a client node installed with the first operating system when a communication connection is established with the client node installed with the first operating system; A generating module, configured to generate a system replacement task corresponding to each of the client nodes according to the first configuration information, wherein the system replacement task includes second configuration information corresponding to each of the client nodes; a sending module, configured to send the system replacement task to the client node, wherein the system replacement task is automatically executed so that the client node generates a second operating system according to the second configuration information to replace the first operating system; A post-replacement information acquisition module, used to acquire the post-replacement status information of the system sent by the client node; The log module is used to generate and store a system replacement log according to the system status information after the client node is replaced.
11. An operating system replacement device, applied to a client node, wherein the client node is installed with a first operating system, characterized in that: The device comprises: A module is provided, for providing a communication address of a client node to a management server; when a communication connection with the management server is established, providing the management server with current first configuration information of a first operating system, so that the management server generates a system replacement task corresponding to the client node according to the first configuration information; a parsing module, configured to automatically execute the system replacement task, parse the system replacement task, and obtain second configuration information corresponding to the client node when the system replacement task sent by the management server is obtained; a replacement module, configured to replace the first configuration information with the second configuration information, so that the first operating system of the client node is replaced with a second operating system; The restart module is used to execute the system restart operation and obtain the system replacement status information after the restart is completed; A sending module, used for sending the state information of the system after replacement to the management server; A backup module, used for backing up the relevant files of the first operating system; A recovery module is used to respond to a system recovery instruction sent by the management server and restore the operating system currently running on the client node to the first operating system based on the backed-up related files of the first operating system; the system recovery instruction is an instruction sent by the management server when the status information check after the system replacement fails.
12. An electronic device, characterized in that: include: A processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method according to any one of claims 1 to 9 when executing the program.
13. A readable storage medium, characterized in that: When the instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute any one of the methods described in claims 1-9.
Citation Information
Patent Citations
Equipment reinstallation method and system, console, server and electronic equipment
CN112835592A