[go: up one dir, main page]

CN107172143A - Software synchronizing method and device in a kind of server cluster - Google Patents

Software synchronizing method and device in a kind of server cluster Download PDF

Info

Publication number
CN107172143A
CN107172143A CN201710333054.3A CN201710333054A CN107172143A CN 107172143 A CN107172143 A CN 107172143A CN 201710333054 A CN201710333054 A CN 201710333054A CN 107172143 A CN107172143 A CN 107172143A
Authority
CN
China
Prior art keywords
software
configuration information
item
software configuration
server
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201710333054.3A
Other languages
Chinese (zh)
Inventor
丛戎
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhengzhou Yunhai Information Technology Co Ltd
Original Assignee
Zhengzhou Yunhai Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhengzhou Yunhai Information Technology Co Ltd filed Critical Zhengzhou Yunhai Information Technology Co Ltd
Priority to CN201710333054.3A priority Critical patent/CN107172143A/en
Publication of CN107172143A publication Critical patent/CN107172143A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/2866Architectures; Arrangements
    • H04L67/30Profiles
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention provides a kind of software synchronizing method of server cluster and device, this method includes:According to the structural information of default server cluster, the configuration server in server cluster, and at least one client computer being connected with the configuration server are determined;Determine at least one software configuration information in the configuration server;Receive the identification information that at least one client computer is carried in the synchronization request of outside input, the synchronization request;According to the identification information of at least one client computer carried in the synchronization request, at least one of described software configuration information is sent at least one Destination client corresponding with identification information at least one described;Each described Destination client is synchronized according at least one of described software configuration information to the software merit rating of itself.This programme can improve the efficiency for updating software merit rating.

Description

一种服务器集群中的软件同步方法及装置A software synchronization method and device in a server cluster

技术领域technical field

本发明涉及计算机技术领域,特别涉及一种服务器集群中的软件同步方法及装置。The invention relates to the field of computer technology, in particular to a software synchronization method and device in a server cluster.

背景技术Background technique

随着信息时代的持续发展,服务器运维已经成为技术服务中的重要组成部分。面对越来越复杂的业务以及多样化的用户需求,工作人员需定期对服务器集群中的各个服务器中的软件配置进行更新。With the continuous development of the information age, server operation and maintenance has become an important part of technical services. In the face of increasingly complex business and diverse user needs, staff need to regularly update the software configuration in each server in the server cluster.

目前,主要通过人工方式对服务器集群中的各个服务器中的软件配置进行更新,即工作人员逐个对服务器进行检测,当检测到服务器上有软件需要更新时,再对该服务器上的软件进行逐个更新。At present, the software configuration in each server in the server cluster is mainly updated manually, that is, the staff detects the servers one by one, and when it is detected that there is software on the server that needs to be updated, the software on the server is updated one by one .

由于服务器集群中的服务器数量较多,并且各个服务器中安装有相同配置的软件,则采用人工方式更新软件配置时,工作人员做了大量重复的工作,导致更新软件配置的效率较低。Due to the large number of servers in the server cluster, and the software with the same configuration is installed in each server, when the software configuration is updated manually, the staff has done a lot of repetitive work, resulting in low efficiency in updating the software configuration.

发明内容Contents of the invention

本发明实施例提供了一种服务器集群中的软件同步方法及装置,能提高更新软件配置的效率。The embodiment of the present invention provides a software synchronization method and device in a server cluster, which can improve the efficiency of updating software configuration.

第一方面,本发明实施例提供了一种服务器集群的软件同步方法,包括:In a first aspect, an embodiment of the present invention provides a software synchronization method for a server cluster, including:

根据预设的服务器集群的结构信息,确定服务器集群中的配置服务器,以及与所述配置服务器相连的至少一个客户机;Determining a configuration server in the server cluster and at least one client connected to the configuration server according to the preset structural information of the server cluster;

确定所述配置服务器中的至少一项软件配置信息;determining at least one item of software configuration information in the configuration server;

接收外部输入的同步请求,所述同步请求中携带有至少一个所述客户机的标识信息;receiving an externally input synchronization request, where the synchronization request carries identification information of at least one client;

根据所述同步请求中携带的至少一个客户机的标识信息,将所述至少一项软件配置信息发送给与至少一个所述标识信息相对应的至少一个目标客户机;Sending the at least one item of software configuration information to at least one target client corresponding to at least one of the identification information according to the identification information of at least one client carried in the synchronization request;

每一个所述目标客户机根据所述至少一项软件配置信息,对自身的软件配置进行同步。Each target client synchronizes its own software configuration according to the at least one item of software configuration information.

优选地,Preferably,

所述每一个所述目标客户机根据所述至少一项软件配置信息,对自身的软件配置进行同步,包括:Each of the target clients synchronizes its own software configuration according to the at least one piece of software configuration information, including:

每一个所述目标客户机根据所述至少一项软件配置信息,确定是否存在分别与每一项所述软件配置信息相对应的软件;Each of the target clients determines whether there is software corresponding to each item of software configuration information according to the at least one item of software configuration information;

如果否,则:If no, then:

针对存在对应的软件的至少一项所述软件配置信息,根据所述软件配置信息,对对应的所述软件进行更新;For at least one item of the software configuration information for which there is corresponding software, update the corresponding software according to the software configuration information;

针对不存在对应的软件的至少一项所述软件配置信息,生成软件安装请求,并将所述软件安装请求发送给所述配置服务器;generating a software installation request for at least one piece of software configuration information for which there is no corresponding software, and sending the software installation request to the configuration server;

所述配置服务器根据所述软件安装请求,发送与所述不存在对应的软件的至少一个所述软件配置信息相对应的至少一个软件安装包;The configuration server sends, according to the software installation request, at least one software installation package corresponding to at least one piece of software configuration information for which there is no corresponding software;

所述目标客户机接收所述至少一个软件安装包,并根据所述至少一个软件安装包,安装对应的软件;The target client receives the at least one software installation package, and installs corresponding software according to the at least one software installation package;

根据所述不存在对应的软件的至少一个所述软件配置信息,对安装的所述软件的软件配置信息进行同步。Synchronizing the software configuration information of the installed software according to the at least one piece of software configuration information for which there is no corresponding software.

优选地,Preferably,

所述每一个所述目标客户机根据所述至少一项软件配置信息,对自身的软件配置进行同步,包括:Each of the target clients synchronizes its own software configuration according to the at least one piece of software configuration information, including:

每一个所述目标客户机根据所述至少一项软件配置信息,确定是否存在分别与每一项所述软件配置信息分别对应的软件;Each of the target clients determines whether there is software corresponding to each item of software configuration information according to the at least one item of software configuration information;

如果是,则所述目标客户机根据每一项所述软件配置信息,分别对对应的每一个软件进行更新。If so, the target client computer updates each corresponding piece of software according to each piece of software configuration information.

优选地,Preferably,

所述所述目标客户机根据每一项所述软件配置信息,分别对对应的每一个软件进行更新,包括:The target client updates each corresponding software according to each item of software configuration information, including:

针对每一项所述软件配置信息,均执行:For each item of software configuration information, execute:

所述目标客户机根据接收的所述软件配置信息,检测与所述软件配置信息对应的所述软件的当前配置信息;The target client detects current configuration information of the software corresponding to the software configuration information according to the received software configuration information;

当接收的所述软件配置信息与对应的所述软件的当前配置信息不相同时,根据接收到的所述软件配置信息,对对应的所述软件进行更新。When the received software configuration information is different from the corresponding current configuration information of the software, the corresponding software is updated according to the received software configuration information.

优选地,Preferably,

所述根据所述同步请求中携带的至少一个客户机的标识信息,将所述至少一项软件配置信息发送给与至少一个所述标识信息相对应的至少一个目标客户机,包括:The sending the at least one item of software configuration information to at least one target client corresponding to at least one of the identification information according to the identification information of at least one client carried in the synchronization request includes:

根据所述至少一个目标客户机的标识信息,构建分别与每一个所述目标客户机相对应的至少一个配置文件,每个所述配置文件中包括所述至少一项软件配置信息;Constructing at least one configuration file respectively corresponding to each of the target clients according to the identification information of the at least one target client, and each of the configuration files includes the at least one piece of software configuration information;

将所述配置文件分别发送给对应的各个所述目标客户机。Sending the configuration files to corresponding target clients.

优选地,Preferably,

所述所述目标客户机根据每一项所述软件配置信息,分别对对应的每一个软件进行更新,包括:The target client updates each corresponding software according to each item of software configuration information, including:

针对每一项所述软件配置信息,均执行:For each item of software configuration information, execute:

所述目标客户机根据接收的所述软件配置信息,检测与所述软件配置信息对应的所述软件的当前配置信息;The target client detects current configuration information of the software corresponding to the software configuration information according to the received software configuration information;

当接收的所述软件配置信息与对应的所述软件的当前配置信息相同时,构建所述目标客户机对应的所述配置文件的硬链接。When the received software configuration information is the same as the corresponding current configuration information of the software, construct a hard link of the configuration file corresponding to the target client.

第二方面,本发明实施例提供了一种服务器集群的软件同步装置,包括:第一确定单元、第二确定单元、接收单元和同步单元;其中,In a second aspect, an embodiment of the present invention provides a software synchronization device for a server cluster, including: a first determining unit, a second determining unit, a receiving unit, and a synchronizing unit; wherein,

所述第一确定单元,用于根据预设的服务器集群的结构信息,确定服务器集群中的配置服务器,以及与所述配置服务器相连的至少一个客户机;The first determining unit is configured to determine a configuration server in the server cluster and at least one client connected to the configuration server according to preset structural information of the server cluster;

所述第二确定单元,用于确定所述第一确定单元确定出的配置服务器中的至少一项软件配置信息;The second determining unit is configured to determine at least one piece of software configuration information in the configuration server determined by the first determining unit;

所述接收单元,用于接收外部输入的同步请求,所述同步请求中携带有至少一个所述客户机的标识信息;The receiving unit is configured to receive an externally input synchronization request, where the synchronization request carries identification information of at least one client;

所述同步单元,用于根据所述同步请求中携带的至少一个客户机的标识信息,将所述至少一项软件配置信息发送给与至少一个所述标识信息相对应的至少一个目标客户机,以使每一个所述目标客户机根据所述至少一项软件配置信息,对自身的软件配置进行同步。The synchronization unit is configured to send the at least one item of software configuration information to at least one target client corresponding to at least one of the identification information according to the identification information of at least one client carried in the synchronization request, so that each target client synchronizes its own software configuration according to the at least one piece of software configuration information.

优选地,Preferably,

所述同步单元,包括判断子单元、更新子单元、请求发送子单元和软件安装子单元;其中,The synchronization unit includes a judgment subunit, an update subunit, a request sending subunit and a software installation subunit; wherein,

所述判断子单元,用于根据所述至少一项软件配置信息,确定是否存在分别与每一项所述软件配置信息分别对应的软件,如果是,则触发所述更新子单元,否则触发所述请求发送子单元;The judging subunit is configured to determine whether there is software corresponding to each item of software configuration information according to the at least one piece of software configuration information, and if so, trigger the update subunit; otherwise, trigger the The request sending subunit;

所述请求发送子单元,用于根据所述不存在对应的软件的至少一个所述软件配置信息,生成软件安装请求,并将所述软件安装请求发送给所述配置服务器;The request sending subunit is configured to generate a software installation request based on at least one piece of software configuration information for which there is no corresponding software, and send the software installation request to the configuration server;

所述软件安装子单元,用于接收所述配置服务器根据所述软件安装请求,发送的与所述不存在对应的软件的至少一个所述软件配置信息相对应的至少一个软件安装包,并根据所述至少一个软件安装包,安装对应的软件;触发所述更新子单元;The software installation subunit is configured to receive at least one software installation package corresponding to at least one piece of software configuration information of the software that does not exist and sent by the configuration server according to the software installation request, and according to The at least one software installation package installs corresponding software; triggers the update subunit;

所述更新子单元,用于根据每一项所述软件配置信息,分别对对应的每一个软件进行更新。The update subunit is configured to update each piece of corresponding software according to each piece of software configuration information.

优选地,Preferably,

所述同步单元,用于根据所述至少一个目标客户机的标识信息,构建分别与每一个所述目标客户机相对应的至少一个配置文件,每个所述配置文件中包括所述至少一项软件配置信息;并将所述配置文件分别发送给对应的各个所述目标客户机。The synchronization unit is configured to construct at least one configuration file respectively corresponding to each of the target clients according to the identification information of the at least one target client, and each of the configuration files includes the at least one software configuration information; and sending the configuration files to corresponding target clients.

优选地,Preferably,

所述更新子单元,用于针对每一项所述软件配置信息,均执行:根据接收的所述软件配置信息,检测与所述软件配置信息对应的所述软件的当前配置信息;判断接收的所述软件配置信息与对应的所述软件的当前配置信息是否相同时,如果是,则根据接收到的所述软件配置信息,对对应的所述软件进行更新;否则,构建对应的所述配置文件的硬链接。The update subunit is configured to perform, for each item of the software configuration information: according to the received software configuration information, detect the current configuration information of the software corresponding to the software configuration information; determine the received Whether the software configuration information is the same as the corresponding current configuration information of the software, if yes, update the corresponding software according to the received software configuration information; otherwise, construct the corresponding configuration A hard link to the file.

本发明实施例提供了一种服务器集群中的软件同步方法及装置,首先从服务器集群中的配置服务器中确定出至少一项软件配置信息,在接收到外部输入的同步请求时,根据同步请求中携带的服务器集群中的至少一个客户机的标识信息,将确定出的至少一项软件配置信息发送给对应的客户机,以使接收软件配置信息的各个客户机对自身的软件配置进行同步。由此,服务器集群中的各个客户机可根据配置服务器中的软件配置信息,自动对自身的软件配置进行同步,而无须工作人员对各个服务器中分别包括的各个软件进行逐个更新,从而提高了更新软件配置的效率。Embodiments of the present invention provide a software synchronization method and device in a server cluster. First, at least one piece of software configuration information is determined from configuration servers in the server cluster. The carried identification information of at least one client in the server cluster sends the determined at least one piece of software configuration information to the corresponding client, so that each client receiving the software configuration information synchronizes its own software configuration. Thus, each client in the server cluster can automatically synchronize its own software configuration according to the software configuration information in the configuration server, without the need for staff to update each software included in each server one by one, thereby improving the update rate. Efficiency of software configuration.

附图说明Description of drawings

为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are For some embodiments of the present invention, those skilled in the art can also obtain other drawings based on these drawings without creative work.

图1是本发明一个实施例提供的一种服务器集群中软件同步方法的流程图;Fig. 1 is a flowchart of a software synchronization method in a server cluster provided by an embodiment of the present invention;

图2是本发明另一个实施例提供的一种服务器集群中软件同步方法的流程图;Fig. 2 is a flowchart of a software synchronization method in a server cluster provided by another embodiment of the present invention;

图3是本发明一个实施例提供的一种服务器集群中软件同步装置的结构示意图;Fig. 3 is a schematic structural diagram of a software synchronization device in a server cluster provided by an embodiment of the present invention;

图4是本发明另一个实施例提供的一种服务器集群中软件同步装置的结构示意图。Fig. 4 is a schematic structural diagram of a software synchronization device in a server cluster provided by another embodiment of the present invention.

具体实施方式detailed description

为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例,基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动的前提下所获得的所有其他实施例,都属于本发明保护的范围。In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments It is a part of the embodiments of the present invention, but not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative work belong to the protection of the present invention. scope.

如图1所示,本发明实施例提供了一种服务器集群的软件同步方法,该方法可以包括以下步骤:As shown in Figure 1, the embodiment of the present invention provides a software synchronization method for server clusters, the method may include the following steps:

步骤101:根据预设的服务器集群的结构信息,确定服务器集群中的配置服务器,以及与所述配置服务器相连的至少一个客户机;Step 101: Determine a configuration server in the server cluster and at least one client connected to the configuration server according to the preset structural information of the server cluster;

步骤102:确定所述配置服务器中的至少一项软件配置信息;Step 102: Determine at least one item of software configuration information in the configuration server;

步骤103:接收外部输入的同步请求,所述同步请求中携带有至少一个所述客户机的标识信息;Step 103: receiving an externally input synchronization request, the synchronization request carrying identification information of at least one client;

步骤104:根据所述同步请求中携带的至少一个客户机的标识信息,将所述至少一项软件配置信息发送给与至少一个所述标识信息相对应的至少一个目标客户机;Step 104: According to the identification information of at least one client carried in the synchronization request, send the at least one piece of software configuration information to at least one target client corresponding to at least one of the identification information;

步骤105:每一个所述目标客户机根据所述至少一项软件配置信息,对自身的软件配置进行同步。Step 105: Each target client synchronizes its own software configuration according to the at least one item of software configuration information.

上述实施例中,首先从服务器集群中的配置服务器中确定出至少一项软件配置信息,在接收到外部输入的同步请求时,根据同步请求中携带的服务器集群中的至少一个客户机的标识信息,将确定出的至少一项软件配置信息发送给对应的客户机,以使接收软件配置信息的各个客户机对自身的软件配置进行同步。由此,服务器集群中的各个客户机可根据配置服务器中的软件配置信息,自动对自身的软件配置进行同步,而无须工作人员对各个服务器中分别包括的各个软件进行逐个更新,从而提高了更新软件配置的效率。In the above embodiment, at least one piece of software configuration information is first determined from the configuration server in the server cluster, and when an externally input synchronization request is received, according to the identification information of at least one client in the server cluster carried in the synchronization request and sending the determined at least one piece of software configuration information to corresponding client computers, so that each client computer receiving the software configuration information synchronizes its own software configuration. Thus, each client in the server cluster can automatically synchronize its own software configuration according to the software configuration information in the configuration server, without the need for staff to update each software included in each server one by one, thereby improving the update rate. Efficiency of software configuration.

为了提高更新软件配置的完整性和准确性,本发明一个实施例中,步骤105的具体实时方式,可以包括:In order to improve the integrity and accuracy of updating the software configuration, in one embodiment of the present invention, the specific real-time manner of step 105 may include:

每一个所述目标客户机根据所述至少一项软件配置信息,确定是否存在分别与每一项所述软件配置信息相对应的软件;Each of the target clients determines whether there is software corresponding to each item of software configuration information according to the at least one item of software configuration information;

如果否,则:If no, then:

针对存在对应的软件的至少一项所述软件配置信息,根据所述软件配置信息,对对应的所述软件进行更新;For at least one item of the software configuration information for which there is corresponding software, update the corresponding software according to the software configuration information;

针对不存在对应的软件的至少一项所述软件配置信息,生成软件安装请求,并将所述软件安装请求发送给所述配置服务器;generating a software installation request for at least one piece of software configuration information for which there is no corresponding software, and sending the software installation request to the configuration server;

所述配置服务器根据所述软件安装请求,发送与所述不存在对应的软件的至少一个所述软件配置信息相对应的至少一个软件安装包;The configuration server sends, according to the software installation request, at least one software installation package corresponding to at least one piece of software configuration information for which there is no corresponding software;

所述目标客户机接收所述至少一个软件安装包,并根据所述至少一个软件安装包,安装对应的软件;The target client receives the at least one software installation package, and installs corresponding software according to the at least one software installation package;

根据所述不存在对应的软件的至少一个所述软件配置信息,对安装的所述软件的软件配置信息进行同步。Synchronizing the software configuration information of the installed software according to the at least one piece of software configuration information for which there is no corresponding software.

在这里,当目标客户机中不存在与软件配置信息相对应的软件时,例如,配置服务器发送了软件A和软件B的软件配置信息,目标客户机中仅安装有软件A,而未安装软件B,此时目标客户机向配置服务器发送与软件B相对应的软件安装请求,配置服务器在接收到安装请求时,向对应的目标客户机发送软件B的安装包,则目标客户机可根据接收的安装包,安装软件B,而后再根据软件A和软件B分别对应的软件配置信息,对软件A和软件B的配置进行更新。由此,目标客户机可根据接收到的软件配置信息,对自身当前存在的和不存在的软件都分别进行更新,实现与配置服务器的完全同步,从而提高了更新软件配置的完整性和准确性。Here, when there is no software corresponding to the software configuration information in the target client computer, for example, the configuration server sends the software configuration information of software A and software B, only software A is installed in the target client computer, but no software B. At this time, the target client computer sends a software installation request corresponding to software B to the configuration server. When the configuration server receives the installation request, it sends the installation package of software B to the corresponding target client computer. installation package, install software B, and then update the configurations of software A and software B according to the software configuration information corresponding to software A and software B respectively. As a result, the target client can update its existing and non-existing software according to the received software configuration information, and realize complete synchronization with the configuration server, thus improving the integrity and accuracy of the updated software configuration .

本发明一个实施例中,步骤105的具体实施方式,可以包括:In an embodiment of the present invention, the specific implementation manner of step 105 may include:

每一个所述目标客户机根据所述至少一项软件配置信息,确定是否存在分别与每一项所述软件配置信息分别对应的软件;Each of the target clients determines whether there is software corresponding to each item of software configuration information according to the at least one item of software configuration information;

如果是,则所述目标客户机根据每一项所述软件配置信息,分别对对应的每一个软件进行更新。If so, the target client computer updates each corresponding piece of software according to each piece of software configuration information.

在这里,若目标客户机中存在与各个软件配置信息相对应的软件,则直接根据软件配置信息,对相应的软件进行更新,从而进一步提高了更新软件配置的效率。Here, if there is software corresponding to each piece of software configuration information in the target client, the corresponding software is updated directly according to the software configuration information, thereby further improving the efficiency of updating software configuration.

本发明一个实施例中,步骤104的具体实施方式,可以包括:In one embodiment of the present invention, the specific implementation manner of step 104 may include:

根据所述至少一个目标客户机的标识信息,构建分别与每一个所述目标客户机相对应的至少一个配置文件,每个所述配置文件中包括所述至少一项软件配置信息;Constructing at least one configuration file respectively corresponding to each of the target clients according to the identification information of the at least one target client, and each of the configuration files includes the at least one piece of software configuration information;

将所述配置文件分别发送给对应的各个所述目标客户机。Sending the configuration files to corresponding target clients.

上述实施例中,根据各个目标客户机的标识信息,分别构建与每个目标客户机相对应的配置文件,将各项软件配置信息存入配置文件中,并直接将配置文件发送给对应的目标客户机。则在传输时,可直接对各个配置文件进行传输,而无须一一传输各个软件配置信息给对应的目标客户机,从而便于配置服务器与目标客户机之间的通信,进而进一步提高了更新软件配置的效率。In the above embodiment, according to the identification information of each target client, a configuration file corresponding to each target client is respectively constructed, and various software configuration information is stored in the configuration file, and the configuration file is directly sent to the corresponding target client. Client computer. Then, when transferring, each configuration file can be directly transferred without transferring each software configuration information to the corresponding target client one by one, thereby facilitating the communication between the configuration server and the target client, and further improving the update software configuration. s efficiency.

具体地,本发明一个实施例中,所述所述目标客户机根据每一项所述软件配置信息,分别对对应的每一个软件进行更新,包括:Specifically, in an embodiment of the present invention, the target client updates each corresponding software according to each item of software configuration information, including:

针对每一项所述软件配置信息,均执行:For each item of software configuration information, execute:

所述目标客户机根据接收的所述软件配置信息,检测与所述软件配置信息对应的所述软件的当前配置信息;The target client detects current configuration information of the software corresponding to the software configuration information according to the received software configuration information;

当接收的所述软件配置信息与对应的所述软件的当前配置信息相同时,构建所述目标客户机对应的所述配置文件的硬链接。When the received software configuration information is the same as the corresponding current configuration information of the software, construct a hard link of the configuration file corresponding to the target client.

当接收的所述软件配置信息与对应的所述软件的当前配置信息不相同时,根据接收到的所述软件配置信息,对对应的所述软件进行更新。When the received software configuration information is different from the corresponding current configuration information of the software, the corresponding software is updated according to the received software configuration information.

举例来说,可定期将配置服务器中的软件配置信息发送给各个目标客户机,若配置服务器中的软件在此周期内有更新,则目标客户机接收到的软件配置信息将与目标客户机的当前配置信息有所不同,此时根据接收到的软件配置信息,对目标客户机中的软件进行更新,以使当前配置信息与接收到的软件配置信息相同,即实现与配置服务器的同步。当配置服务器中的软件在此检测周期内无更新时,则构建配置文件的硬链接,由此,当配置服务器中有更新时,目标客户机可直接访问配置文件进行更新,从而进一步提高了更新软件配置的效率。For example, the software configuration information in the configuration server can be sent to each target client regularly, if the software in the configuration server is updated during this period, the software configuration information received by the target client will be consistent with the target client's The current configuration information is different. At this time, according to the received software configuration information, the software in the target client is updated so that the current configuration information is the same as the received software configuration information, that is, synchronization with the configuration server is realized. When the software in the configuration server is not updated within this detection period, a hard link to the configuration file is constructed. Thus, when there is an update in the configuration server, the target client can directly access the configuration file to update, thereby further improving the update rate. Efficiency of software configuration.

如图2所示,本发明实施例提供了一种服务器集群的软件同步方法,该方法可以包括以下步骤:As shown in Figure 2, the embodiment of the present invention provides a software synchronization method for server clusters, the method may include the following steps:

步骤201:根据预设的服务器集群的结构信息,确定服务器集群中的配置服务器,以及与所述配置服务器相连的至少一个客户机。Step 201: Determine a configuration server in the server cluster and at least one client connected to the configuration server according to preset structural information of the server cluster.

例如,可根据服务器集群的拓扑结构,确定服务器集群中的配置服务器和客户机,配置服务器相当于服务器集群中的主节点,客户机相当于与此主节点相连的从节点。For example, the configuration server and client in the server cluster can be determined according to the topology of the server cluster. The configuration server is equivalent to the master node in the server cluster, and the client is equivalent to the slave node connected to the master node.

步骤202:确定所述配置服务器中的至少一项软件配置信息。Step 202: Determine at least one item of software configuration information in the configuration server.

例如,确定出配置服务器中软件A和软件B分别对应的软件配置信息。For example, the software configuration information respectively corresponding to software A and software B in the configuration server is determined.

步骤203:接收外部输入的同步请求,所述同步请求中携带有至少一个所述客户机的标识信息。Step 203: Receive an externally input synchronization request, where the synchronization request carries identification information of at least one client.

举例来说,接收到用户输入的同步请求中携带客户机1的IP地址和客户机2的IP地址。For example, the synchronization request received from the user carries the IP address of the client 1 and the IP address of the client 2 .

步骤204:根据所述至少一个目标客户机的标识信息,构建分别与每一个所述目标客户机相对应的至少一个配置文件,每个所述配置文件中包括所述至少一项软件配置信息。Step 204: Construct at least one configuration file respectively corresponding to each of the target clients according to the identification information of the at least one target client, and each of the configuration files includes the at least one item of software configuration information.

在这里,可根据客户机1的IP地址,构建与客户机1对应的配置文件1,配置文件1中包括软件A和软件B的软件配置信息。另外,可根据客户机2的IP地址,构建与客户机2对应的配置文件2,配置文件2中包括软件A和软件B的软件配置信息。Here, according to the IP address of the client 1, a configuration file 1 corresponding to the client 1 can be constructed, and the configuration file 1 includes software configuration information of software A and software B. In addition, according to the IP address of the client 2, a configuration file 2 corresponding to the client 2 can be constructed, and the configuration file 2 includes software configuration information of software A and software B.

步骤205:将所述配置文件发送给对应的客户机。Step 205: Send the configuration file to the corresponding client.

在这里,将配置文件1发送给客户机1,将配置文件2发送给客户机2。Here, configuration file 1 is sent to client 1 and configuration file 2 is sent to client 2.

步骤206:每一个接收配置文件的客户机执行:从配置文件中解析出所述至少一项软件配置信息。Step 206: Each client computer receiving the configuration file executes: parsing the at least one piece of software configuration information from the configuration file.

步骤207:判断是否存在分别与每一项所述软件配置信息相对应的软件,如果是,则执行步骤211,否则执行步骤208。Step 207: Judging whether there is software corresponding to each item of the software configuration information, if yes, go to step 211, otherwise go to step 208.

步骤208:针对不存在对应的软件的至少一项所述软件配置信息,生成软件安装请求,并将所述软件安装请求发送给所述配置服务器。Step 208: Generate a software installation request for at least one piece of software configuration information for which there is no corresponding software, and send the software installation request to the configuration server.

步骤209:接收所述配置服务器根据所述软件安装请求,发送的与所述不存在对应的软件的至少一个所述软件配置信息相对应的至少一个软件安装包;Step 209: Receive at least one software installation package corresponding to at least one piece of software configuration information of the software that does not exist and sent by the configuration server according to the software installation request;

步骤210:根据所述至少一个软件安装包,安装对应的软件。Step 210: Install corresponding software according to the at least one software installation package.

步骤207至步骤210中,配置文件中包括软件A和软件B的软件配置信息,客户机1中仅安装有软件A,而未安装软件B,此时客户机1向配置服务器发送与软件B相对应的软件安装请求,配置服务器在接收到安装请求时,向客户机1发送软件B的安装包,则客户机1可根据接收的安装包,安装软件B。客户机2中安装有软件A和软件B,则无需再安装。From step 207 to step 210, the configuration file includes the software configuration information of software A and software B, and only software A is installed in client computer 1, but software B is not installed. At this time, client computer 1 sends the configuration information related to software B to the configuration server. Corresponding to the software installation request, when the configuration server receives the installation request, it sends the installation package of the software B to the client 1, and the client 1 can install the software B according to the received installation package. The software A and the software B are installed in the client computer 2, so there is no need to install them again.

步骤211:根据接收的所述软件配置信息,检测与所述软件配置信息对应的所述软件的当前配置信息。Step 211: Detect current configuration information of the software corresponding to the software configuration information according to the received software configuration information.

步骤212:判断接收的软件配置信息与当前配置信息是否相同,如果是,则执行步骤213,否则执行步骤214。Step 212: Judging whether the received software configuration information is the same as the current configuration information, if yes, go to step 213, otherwise go to step 214.

步骤213:构建所述客户机对应的所述配置文件的硬链接,并结束当前流程。Step 213: Build a hard link of the configuration file corresponding to the client, and end the current process.

步骤214:根据接收到的所述软件配置信息,对对应的所述软件进行更新。Step 214: Update the corresponding software according to the received software configuration information.

举例来说,可定期将配置服务器中的软件配置信息发送给各个客户机,若配置服务器中的软件在此周期内有更新,则客户机接收到的软件配置信息将与客户机的当前配置信息有所不同,此时根据接收到的软件配置信息,对客户机中的软件进行更新,以使当前配置信息与接收到的软件配置信息相同,即实现与配置服务器的同步。当配置服务器中的软件在此检测周期内无更新时,则构建配置文件的硬链接,由此,当配置服务器中有更新时,客户机可直接访问配置文件进行更新。For example, the software configuration information in the configuration server can be sent to each client regularly. If the software in the configuration server is updated within this cycle, the software configuration information received by the client will be consistent with the current configuration information of the client. The difference is that at this time, according to the received software configuration information, the software in the client computer is updated so that the current configuration information is the same as the received software configuration information, that is, synchronization with the configuration server is realized. When the software in the configuration server is not updated within the detection period, a hard link of the configuration file is constructed, so that when there is an update in the configuration server, the client computer can directly access the configuration file for updating.

上述实施例中,首先从服务器集群中的配置服务器中确定出至少一项软件配置信息,在接收到外部输入的同步请求时,根据同步请求中携带的服务器集群中的至少一个客户机的标识信息,将确定出的至少一项软件配置信息发送给对应的客户机,以使接收软件配置信息的各个客户机对自身的软件配置进行同步。由此,服务器集群中的各个客户机可根据配置服务器中的软件配置信息,自动对自身的软件配置进行同步,而无须工作人员对各个服务器中分别包括的各个软件进行逐个更新,从而提高了更新软件配置的效率。In the above embodiment, at least one piece of software configuration information is first determined from the configuration server in the server cluster, and when an externally input synchronization request is received, according to the identification information of at least one client in the server cluster carried in the synchronization request and sending the determined at least one piece of software configuration information to corresponding client computers, so that each client computer receiving the software configuration information synchronizes its own software configuration. Thus, each client in the server cluster can automatically synchronize its own software configuration according to the software configuration information in the configuration server, without the need for staff to update each software included in each server one by one, thereby improving the update rate. Efficiency of software configuration.

如图3所示,本发明实施例提供了一种服务器集群的软件同步装置,包括:第一确定单元301、第二确定单元302、接收单元303和同步单元304;其中,As shown in Figure 3, the embodiment of the present invention provides a software synchronization device for server clusters, including: a first determination unit 301, a second determination unit 302, a receiving unit 303, and a synchronization unit 304; wherein,

所述第一确定单元301,用于根据预设的服务器集群的结构信息,确定服务器集群中的配置服务器,以及与所述配置服务器相连的至少一个客户机;The first determining unit 301 is configured to determine a configuration server in the server cluster and at least one client connected to the configuration server according to preset structural information of the server cluster;

所述第二确定单元302,用于确定所述第一确定单元301确定出的配置服务器中的至少一项软件配置信息;The second determining unit 302 is configured to determine at least one item of software configuration information in the configuration server determined by the first determining unit 301;

所述接收单元303,用于接收外部输入的同步请求,所述同步请求中携带有至少一个所述客户机的标识信息;The receiving unit 303 is configured to receive an externally input synchronization request, where the synchronization request carries identification information of at least one client;

所述同步单元304,用于根据所述接收单元303接收到的同步请求中携带的至少一个客户机的标识信息,将所述第二确定单元302确定出的至少一项软件配置信息发送给与至少一个所述标识信息相对应的至少一个目标客户机,以使每一个所述目标客户机根据所述至少一项软件配置信息,对自身的软件配置进行同步。The synchronizing unit 304 is configured to send at least one piece of software configuration information determined by the second determining unit 302 to the client according to the identification information of at least one client carried in the synchronization request received by the receiving unit 303. At least one target client computer corresponding to at least one identification information, so that each target client computer synchronizes its own software configuration according to the at least one piece of software configuration information.

上述实施例中,首先从服务器集群中的配置服务器中确定出至少一项软件配置信息,在接收到外部输入的同步请求时,根据同步请求中携带的服务器集群中的至少一个客户机的标识信息,将确定出的至少一项软件配置信息发送给对应的客户机,以使接收软件配置信息的各个客户机对自身的软件配置进行同步。由此,服务器集群中的各个客户机可根据配置服务器中的软件配置信息,自动对自身的软件配置进行同步,而无须工作人员对各个服务器中分别包括的各个软件进行逐个更新,从而提高了更新软件配置的效率。In the above embodiment, at least one piece of software configuration information is first determined from the configuration server in the server cluster, and when an externally input synchronization request is received, according to the identification information of at least one client in the server cluster carried in the synchronization request and sending the determined at least one piece of software configuration information to corresponding client computers, so that each client computer receiving the software configuration information synchronizes its own software configuration. Thus, each client in the server cluster can automatically synchronize its own software configuration according to the software configuration information in the configuration server, without the need for staff to update each software included in each server one by one, thereby improving the update rate. Efficiency of software configuration.

为了提高更新软件配置的完整性和准确性,如图4所示,本发明一个实施例中,所述同步单元304,包括判断子单元401、更新子单元402、请求发送子单元403和软件安装子单元404;其中,In order to improve the integrity and accuracy of updating software configuration, as shown in Figure 4, in one embodiment of the present invention, the synchronization unit 304 includes a judging subunit 401, an updating subunit 402, a request sending subunit 403 and a software installation Subunit 404; wherein,

所述判断子单元401,用于根据所述第二确定子单元302确定的至少一项软件配置信息,确定是否存在分别与每一项所述软件配置信息分别对应的软件,如果是,则触发所述更新子单元402,否则触发所述请求发送子单元403;The judging subunit 401 is configured to determine whether there is software corresponding to each item of software configuration information according to at least one item of software configuration information determined by the second determining subunit 302, and if so, trigger The update subunit 402, otherwise trigger the request sending subunit 403;

所述请求发送子单元403,用于根据所述不存在对应的软件的至少一个所述软件配置信息,生成软件安装请求,并将所述软件安装请求发送给所述配置服务器;The request sending subunit 403 is configured to generate a software installation request according to at least one piece of software configuration information for which there is no corresponding software, and send the software installation request to the configuration server;

所述软件安装子单元404,用于接收所述配置服务器根据所述软件安装请求,发送的与所述不存在对应的软件的至少一个所述软件配置信息相对应的至少一个软件安装包,并根据所述至少一个软件安装包,安装对应的软件;触发所述更新子单元;The software installation subunit 404 is configured to receive at least one software installation package corresponding to at least one piece of software configuration information of the software that does not exist and sent by the configuration server according to the software installation request, and Install corresponding software according to the at least one software installation package; trigger the update subunit;

所述更新子单元402,用于根据每一项所述软件配置信息,分别对对应的每一个软件进行更新。The update subunit 402 is configured to update each piece of corresponding software according to each piece of software configuration information.

在这里,当目标客户机中不存在与软件配置信息相对应的软件时,例如,配置服务器发送了软件A和软件B的软件配置信息,目标客户机中仅安装有软件A,而未安装软件B,此时目标客户机向配置服务器发送与软件B相对应的软件安装请求,配置服务器在接收到安装请求时,向对应的目标客户机发送软件B的安装包,则目标客户机可根据接收的安装包,安装软件B,而后再根据软件A和软件B分别对应的软件配置信息,对软件A和软件B的配置进行更新。由此,目标客户机可根据接收到的软件配置信息,对自身当前存在的和不存在的软件都分别进行更新,实现与配置服务器的完全同步,从而提高了更新软件配置的完整性和准确性。若目标客户机中存在与各个软件配置信息相对应的软件,则直接根据软件配置信息,对相应的软件进行更新,从而进一步提高了更新软件配置的效率。Here, when there is no software corresponding to the software configuration information in the target client computer, for example, the configuration server sends the software configuration information of software A and software B, only software A is installed in the target client computer, but no software B. At this time, the target client computer sends a software installation request corresponding to software B to the configuration server. When the configuration server receives the installation request, it sends the installation package of software B to the corresponding target client computer. installation package, install software B, and then update the configurations of software A and software B according to the software configuration information corresponding to software A and software B respectively. As a result, the target client can update its existing and non-existing software according to the received software configuration information, and realize complete synchronization with the configuration server, thus improving the integrity and accuracy of the updated software configuration . If there is software corresponding to each piece of software configuration information in the target client, the corresponding software is updated directly according to the software configuration information, thereby further improving the efficiency of updating software configuration.

本发明一个实施例中,In one embodiment of the present invention,

所述同步单元304,用于根据所述至少一个目标客户机的标识信息,构建分别与每一个所述目标客户机相对应的至少一个配置文件,每个所述配置文件中包括所述至少一项软件配置信息;并将所述配置文件分别发送给对应的各个所述目标客户机。The synchronization unit 304 is configured to construct at least one configuration file respectively corresponding to each of the target clients according to the identification information of the at least one target client, and each of the configuration files includes the at least one Items of software configuration information; and sending the configuration files to corresponding target clients.

上述实施例中,根据各个目标客户机的标识信息,分别构建与每个目标客户机相对应的配置文件,将各项软件配置信息存入配置文件中,并直接将配置文件发送给对应的目标客户机。则在传输时,可直接对各个配置文件进行传输,而无须一一传输各个软件配置信息给对应的目标客户机,从而便于配置服务器与目标客户机之间的通信,进而进一步提高了更新软件配置的效率。In the above embodiment, according to the identification information of each target client, a configuration file corresponding to each target client is respectively constructed, and various software configuration information is stored in the configuration file, and the configuration file is directly sent to the corresponding target client. Client computer. Then, when transferring, each configuration file can be directly transferred without transferring each software configuration information to the corresponding target client one by one, thereby facilitating the communication between the configuration server and the target client, and further improving the update software configuration. s efficiency.

具体地,本发明一个实施例中,所述更新子单元402,用于针对每一项所述软件配置信息,均执行:根据接收的所述软件配置信息,检测与所述软件配置信息对应的所述软件的当前配置信息;判断接收的所述软件配置信息与对应的所述软件的当前配置信息是否相同时,如果是,则根据接收到的所述软件配置信息,对对应的所述软件进行更新;否则,构建对应的所述配置文件的硬链接。Specifically, in an embodiment of the present invention, the update subunit 402 is configured to perform, for each item of the software configuration information: according to the received software configuration information, detect the The current configuration information of the software; when judging whether the received software configuration information is the same as the corresponding current configuration information of the software, if yes, according to the received software configuration information, the corresponding software update; otherwise, construct a hard link to the corresponding configuration file.

举例来说,可定期将配置服务器中的软件配置信息发送给各个目标客户机,若配置服务器中的软件在此周期内有更新,则目标客户机接收到的软件配置信息将与目标客户机的当前配置信息有所不同,此时根据接收到的软件配置信息,对目标客户机中的软件进行更新,以使当前配置信息与接收到的软件配置信息相同,即实现与配置服务器的同步。当配置服务器中的软件在此检测周期内无更新时,则构建配置文件的硬链接,由此,当配置服务器中有更新时,目标客户机可直接访问配置文件进行更新,从而进一步提高了更新软件配置的效率。For example, the software configuration information in the configuration server can be sent to each target client regularly, if the software in the configuration server is updated during this period, the software configuration information received by the target client will be consistent with the target client's The current configuration information is different. At this time, according to the received software configuration information, the software in the target client is updated so that the current configuration information is the same as the received software configuration information, that is, synchronization with the configuration server is realized. When the software in the configuration server is not updated within this detection period, a hard link to the configuration file is constructed. Thus, when there is an update in the configuration server, the target client can directly access the configuration file to update, thereby further improving the update rate. Efficiency of software configuration.

上述装置内的各单元之间的信息交互、执行过程等内容,由于与本发明方法实施例基于同一构思,具体内容可参见本发明方法实施例中的叙述,此处不再赘述。The information exchange and execution process among the units in the above-mentioned device are based on the same concept as the method embodiment of the present invention, and the specific content can refer to the description in the method embodiment of the present invention, and will not be repeated here.

本发明还提供了一种可读介质,包括执行指令,当存储控制器的处理器执行所述执行指令时,所述存储控制器执行本发明上述任一实施例提供的方法。The present invention also provides a readable medium, including an execution instruction. When a processor of the storage controller executes the execution instruction, the storage controller executes the method provided in any one of the above-mentioned embodiments of the present invention.

另外,本发明还提供了一种存储控制器,包括:处理器、存储器和总线;所述存储器用于存储执行指令,所述处理器与所述存储器通过所述总线连接,当所述存储控制器运行时,所述处理器执行所述存储器存储的所述执行指令,以使所述存储控制器执行本发明上述任一实施例提供的方法。In addition, the present invention also provides a storage controller, including: a processor, a memory, and a bus; the memory is used to store and execute instructions, the processor and the memory are connected through the bus, and when the storage control When the processor is running, the processor executes the execution instruction stored in the memory, so that the memory controller executes the method provided by any one of the above-mentioned embodiments of the present invention.

综上所述,本发明各个实施例至少具有如下有益效果:In summary, each embodiment of the present invention has at least the following beneficial effects:

1、在本发明实施例中,首先从服务器集群中的配置服务器中确定出至少一项软件配置信息,在接收到外部输入的同步请求时,根据同步请求中携带的服务器集群中的至少一个客户机的标识信息,将确定出的至少一项软件配置信息发送给对应的客户机,以使接收软件配置信息的各个客户机对自身的软件配置进行同步。由此,服务器集群中的各个客户机可根据配置服务器中的软件配置信息,自动对自身的软件配置进行同步,而无须工作人员对各个服务器中分别包括的各个软件进行逐个更新,从而提高了更新软件配置的效率。1. In the embodiment of the present invention, first determine at least one piece of software configuration information from the configuration server in the server cluster, and when receiving an externally input synchronization request, at least one client in the server cluster carried in the synchronization request machine identification information, and at least one piece of determined software configuration information is sent to the corresponding client machines, so that each client machine that receives the software configuration information synchronizes its own software configuration. Thus, each client in the server cluster can automatically synchronize its own software configuration according to the software configuration information in the configuration server, without the need for staff to update each software included in each server one by one, thereby improving the update rate. Efficiency of software configuration.

2、在本发明实施例中,目标客户机接收到配置信息之后,确定自身是否存在分别与每一项软件配置信息相对应的软件,如果是,则直接根据软件配置信息,对相应的软件进行更新,从而进一步提高了更新软件配置的效率。否则向配置服务器发送针对不存在对应的软件的至少一项所述软件配置信息生成的软件安装请求,并接收配置服务器根据软件安装请求发送的软件安装包,根据接收的安装包安装对应的软件,而后再根据软件配置信息,对软件进行更新。由此,客户机可根据接收到的软件配置信息,对自身当前存在的和不存在的软件都分别进行更新,实现与配置服务器的完全同步,从而提高了更新软件配置的完整性和准确性。2. In the embodiment of the present invention, after the target client computer receives the configuration information, it determines whether there is software corresponding to each item of software configuration information, and if so, directly performs the corresponding software configuration according to the software configuration information. update, thereby further improving the efficiency of updating software configurations. Otherwise, send to the configuration server a software installation request generated for at least one piece of software configuration information that does not have corresponding software, and receive the software installation package sent by the configuration server according to the software installation request, and install the corresponding software according to the received installation package, Then, the software is updated according to the software configuration information. Thus, the client can update its existing and non-existing software respectively according to the received software configuration information, and realize complete synchronization with the configuration server, thereby improving the completeness and accuracy of the updated software configuration.

3、在本发明实施例中,根据各个目标客户机的标识信息,分别构建与每个目标客户机相对应的配置文件,将各项软件配置信息存入配置文件中,并直接将配置文件发送给对应的目标客户机。则在传输时,可直接对各个配置文件进行传输,而无须一一传输各个软件配置信息给对应的目标客户机,从而便于配置服务器与目标客户机之间的通信,进而进一步提高了更新软件配置的效率。3. In the embodiment of the present invention, according to the identification information of each target client, a configuration file corresponding to each target client is constructed respectively, and various software configuration information is stored in the configuration file, and the configuration file is directly sent to the corresponding target client. Then, when transferring, each configuration file can be directly transferred without transferring each software configuration information to the corresponding target client one by one, thereby facilitating the communication between the configuration server and the target client, and further improving the update software configuration. s efficiency.

4、在本发明实施例中,当接收的软件配置信息与当前配置信息相同时,构建配置文件的硬链接,由此,当配置服务器中有更新时,目标客户机可直接访问配置文件进行更新,从而进一步提高了更新软件配置的效率。4. In the embodiment of the present invention, when the received software configuration information is the same as the current configuration information, a hard link to the configuration file is constructed, so that when there is an update in the configuration server, the target client can directly access the configuration file to update , thereby further improving the efficiency of updating the software configuration.

需要说明的是,在本文中,诸如第一和第二之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个······”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同因素。It should be noted that in this article, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that there is a relationship between these entities or operations. There is no such actual relationship or sequence. Furthermore, the term "comprises", "comprises" or any other variation thereof is intended to cover a non-exclusive inclusion such that a process, method, article, or apparatus comprising a set of elements includes not only those elements, but also includes elements not expressly listed. other elements of or also include elements inherent in such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional same elements in the process, method, article or apparatus comprising said element.

本领域普通技术人员可以理解:实现上述方法实施例的全部或部分步骤可以通过程序指令相关的硬件来完成,前述的程序可以存储在计算机可读取的存储介质中,该程序在执行时,执行包括上述方法实施例的步骤;而前述的存储介质包括:ROM、RAM、磁碟或者光盘等各种可以存储程序代码的介质中。Those of ordinary skill in the art can understand that all or part of the steps to realize the above method embodiments can be completed by program instructions related hardware, and the aforementioned programs can be stored in a computer-readable storage medium. When the program is executed, the It includes the steps of the above method embodiments; and the aforementioned storage medium includes: ROM, RAM, magnetic disk or optical disk and other various media that can store program codes.

最后需要说明的是:以上所述仅为本发明的较佳实施例,仅用于说明本发明的技术方案,并非用于限定本发明的保护范围。凡在本发明的精神和原则之内所做的任何修改、等同替换、改进等,均包含在本发明的保护范围内。Finally, it should be noted that the above descriptions are only preferred embodiments of the present invention, and are only used to illustrate the technical solution of the present invention, and are not used to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principles of the present invention are included in the protection scope of the present invention.

Claims (10)

1. A software synchronization method of a server cluster is characterized in that a configuration server in the server cluster and at least one client connected with the configuration server are determined according to preset structural information of the server cluster; further comprising:
determining at least one item of software configuration information in the configuration server;
receiving a synchronization request input from the outside, wherein the synchronization request carries identification information of at least one client;
sending the at least one item of software configuration information to at least one target client corresponding to at least one piece of identification information according to the identification information of at least one client carried in the synchronization request;
and each target client synchronizes the software configuration of the target client according to the at least one item of software configuration information.
2. The method of claim 1,
each target client synchronizes its software configuration according to the at least one item of software configuration information, including:
each target client determines whether software respectively corresponding to each item of software configuration information exists according to the at least one item of software configuration information;
if not, then:
aiming at least one item of software configuration information of corresponding software, updating the corresponding software according to the software configuration information;
generating a software installation request aiming at least one item of software configuration information without corresponding software, and sending the software installation request to the configuration server;
the configuration server sends at least one software installation package corresponding to the at least one piece of software configuration information of the non-corresponding software according to the software installation request;
the target client receives the at least one software installation package and installs corresponding software according to the at least one software installation package;
and synchronizing the software configuration information of the installed software according to the at least one piece of software configuration information without the corresponding software.
3. The method of claim 1,
each target client synchronizes its software configuration according to the at least one item of software configuration information, including:
each target client machine determines whether software respectively corresponding to each item of software configuration information exists according to the at least one item of software configuration information;
if yes, the target client updates each corresponding software according to each item of software configuration information.
4. The method of claim 3,
the target client respectively updates each corresponding software according to each item of the software configuration information, and the method comprises the following steps:
for each item of the software configuration information, performing:
the target client detects the current configuration information of the software corresponding to the software configuration information according to the received software configuration information;
and when the received software configuration information is different from the corresponding current configuration information of the software, updating the corresponding software according to the received software configuration information.
5. The method of claim 3,
the sending the at least one item of software configuration information to at least one target client corresponding to at least one piece of identification information according to the identification information of at least one client carried in the synchronization request includes:
according to the identification information of the at least one target client, constructing at least one configuration file corresponding to each target client, wherein each configuration file comprises the at least one item of software configuration information;
and respectively sending the configuration files to the corresponding target clients.
6. The method of claim 5,
the target client respectively updates each corresponding software according to each item of the software configuration information, and the method comprises the following steps:
for each item of the software configuration information, performing:
the target client detects the current configuration information of the software corresponding to the software configuration information according to the received software configuration information;
and when the received software configuration information is the same as the corresponding current configuration information of the software, constructing a hard link of the configuration file corresponding to the target client.
7. A software synchronization apparatus for a server cluster, comprising: the device comprises a first determining unit, a second determining unit, a receiving unit and a synchronizing unit; wherein,
the first determining unit is used for determining a configuration server in a server cluster and at least one client connected with the configuration server according to preset structural information of the server cluster;
the second determining unit is configured to determine at least one item of software configuration information in the configuration server determined by the first determining unit;
the receiving unit is configured to receive a synchronization request input from an external device, where the synchronization request carries identification information of at least one client;
the synchronization unit is configured to send the at least one item of software configuration information to at least one target client corresponding to the at least one item of identification information according to the identification information of the at least one client carried in the synchronization request, so that each target client synchronizes its software configuration according to the at least one item of software configuration information.
8. The software synchronization apparatus of claim 7,
the synchronization unit comprises a judgment subunit, an updating subunit, a request sending subunit and a software installation subunit; wherein,
the judging subunit is configured to determine, according to the at least one item of software configuration information, whether software respectively corresponding to each item of software configuration information exists, if so, trigger the updating subunit, otherwise, trigger the request sending subunit;
the request sending subunit is configured to generate a software installation request according to the at least one piece of software configuration information for which the corresponding software does not exist, and send the software installation request to the configuration server;
the software installation subunit is configured to receive at least one software installation package corresponding to the at least one piece of software configuration information that is sent by the configuration server according to the software installation request and does not have the corresponding software, and install the corresponding software according to the at least one software installation package; triggering the updating subunit;
and the updating subunit is used for respectively updating each corresponding software according to each item of software configuration information.
9. The software synchronization apparatus of claim 8,
the synchronization unit is configured to construct at least one configuration file corresponding to each target client according to the identification information of the at least one target client, where each configuration file includes the at least one item of software configuration information; and sending the configuration file to each corresponding target client.
10. The software synchronization apparatus of claim 9,
the updating subunit is configured to, for each item of the software configuration information, perform: detecting the current configuration information of the software corresponding to the software configuration information according to the received software configuration information; judging whether the received software configuration information is the same as the current configuration information of the corresponding software, if so, updating the corresponding software according to the received software configuration information; otherwise, constructing a hard link of the corresponding configuration file.
CN201710333054.3A 2017-05-12 2017-05-12 Software synchronizing method and device in a kind of server cluster Pending CN107172143A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710333054.3A CN107172143A (en) 2017-05-12 2017-05-12 Software synchronizing method and device in a kind of server cluster

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710333054.3A CN107172143A (en) 2017-05-12 2017-05-12 Software synchronizing method and device in a kind of server cluster

Publications (1)

Publication Number Publication Date
CN107172143A true CN107172143A (en) 2017-09-15

Family

ID=59815940

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710333054.3A Pending CN107172143A (en) 2017-05-12 2017-05-12 Software synchronizing method and device in a kind of server cluster

Country Status (1)

Country Link
CN (1) CN107172143A (en)

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6173420B1 (en) * 1997-10-31 2001-01-09 Oracle Corporation Method and apparatus for fail safe configuration
CN101222367A (en) * 2008-01-28 2008-07-16 中兴通讯股份有限公司 Method and network management system for cluster network elements to update version files in batches
CN101410800A (en) * 2003-12-15 2009-04-15 微软公司 System and method for software distribution service
CN102255752A (en) * 2011-06-30 2011-11-23 北京新媒传信科技有限公司 Configuration management system and method of server cluster
CN102591679A (en) * 2011-11-30 2012-07-18 中国科学院计算机网络信息中心 Quick application software arrangement method for cluster system
CN102880935A (en) * 2012-09-10 2013-01-16 曙光信息产业(北京)有限公司 Method and system for managing Linux cluster software
CN103019757A (en) * 2011-09-27 2013-04-03 腾讯科技(深圳)有限公司 Method, device and system for synchronizing software among multiple clients
CN103064717A (en) * 2013-01-22 2013-04-24 浪潮(北京)电子信息产业有限公司 Device and method for parallel installation of software for cluster system
CN103516538A (en) * 2012-06-28 2014-01-15 中兴通讯股份有限公司 Method and device for uniform configuration of carrier-class clustered applications
CN105610987A (en) * 2016-03-18 2016-05-25 车智互联(北京)科技有限公司 Method, application and system for managing server cluster
CN105915369A (en) * 2016-03-31 2016-08-31 北京奇艺世纪科技有限公司 Configuration information management method and configuration information management device

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6173420B1 (en) * 1997-10-31 2001-01-09 Oracle Corporation Method and apparatus for fail safe configuration
CN101410800A (en) * 2003-12-15 2009-04-15 微软公司 System and method for software distribution service
CN101222367A (en) * 2008-01-28 2008-07-16 中兴通讯股份有限公司 Method and network management system for cluster network elements to update version files in batches
CN102255752A (en) * 2011-06-30 2011-11-23 北京新媒传信科技有限公司 Configuration management system and method of server cluster
CN103019757A (en) * 2011-09-27 2013-04-03 腾讯科技(深圳)有限公司 Method, device and system for synchronizing software among multiple clients
CN102591679A (en) * 2011-11-30 2012-07-18 中国科学院计算机网络信息中心 Quick application software arrangement method for cluster system
CN103516538A (en) * 2012-06-28 2014-01-15 中兴通讯股份有限公司 Method and device for uniform configuration of carrier-class clustered applications
CN102880935A (en) * 2012-09-10 2013-01-16 曙光信息产业(北京)有限公司 Method and system for managing Linux cluster software
CN103064717A (en) * 2013-01-22 2013-04-24 浪潮(北京)电子信息产业有限公司 Device and method for parallel installation of software for cluster system
CN105610987A (en) * 2016-03-18 2016-05-25 车智互联(北京)科技有限公司 Method, application and system for managing server cluster
CN105915369A (en) * 2016-03-31 2016-08-31 北京奇艺世纪科技有限公司 Configuration information management method and configuration information management device

Similar Documents

Publication Publication Date Title
CN113315754B (en) Container access firewall intelligent linkage method and device, equipment and medium
CN105915633B (en) Automatic operation and maintenance system and method
CN104376127B (en) A kind of data manipulation method and device
CN102291416B (en) A kind of method and system of client and server bi-directional synchronization
EP4095678A1 (en) Method and apparatus of deploying a cluster, device and storage medium
WO2019061720A1 (en) Data synchronization method and system
WO2019184164A1 (en) Method for automatically deploying kubernetes worker node, device, terminal apparatus, and readable storage medium
CN105723363B (en) Method and server for maintaining and upgrading tenant database in ERP system
WO2020134545A1 (en) Method for updating configuration, and related product
WO2019223228A1 (en) Data synchronization method and apparatus for distributed heterogeneous database
CN106982236A (en) A kind of information processing method, device and system
CN108881231A (en) The method, apparatus and storage medium of synchronous account information in a kind of group system
TW201724809A (en) System and method for acquiring, processing, and updating global information
CN108228733A (en) A kind of file syn chronizing system and method
CN106354566B (en) A kind of method and server of command process
CN105701159A (en) Data synchronization device and method
CN110011952A (en) A kind of method, service cluster and the client of data transmission
CN107147719A (en) A hardware update method, master node, slave node and server cluster
CN109408376B (en) Configuration data generation method, device, equipment and storage medium
US9043283B2 (en) Opportunistic database duplex operations
US11082522B2 (en) Information acquisition
CN114201458B (en) Information update method, microservice system and computer-readable storage medium
CN115438254A (en) Configuration issuing method, configuration processing method and related equipment
CN107172143A (en) Software synchronizing method and device in a kind of server cluster
CN106850354A (en) A kind of processing method and processing device of Single Point of Faliure

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20170915

RJ01 Rejection of invention patent application after publication