[go: up one dir, main page]

CN116149689B - Software installation method and device, storage medium and computer equipment - Google Patents

Software installation method and device, storage medium and computer equipment Download PDF

Info

Publication number
CN116149689B
CN116149689B CN202310447745.1A CN202310447745A CN116149689B CN 116149689 B CN116149689 B CN 116149689B CN 202310447745 A CN202310447745 A CN 202310447745A CN 116149689 B CN116149689 B CN 116149689B
Authority
CN
China
Prior art keywords
installation
component
software
target
components
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.)
Active
Application number
CN202310447745.1A
Other languages
Chinese (zh)
Other versions
CN116149689A (en
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.)
Information and Data Security Solutions Co Ltd
Original Assignee
Information and Data Security Solutions 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 Information and Data Security Solutions Co Ltd filed Critical Information and Data Security Solutions Co Ltd
Priority to CN202310447745.1A priority Critical patent/CN116149689B/en
Publication of CN116149689A publication Critical patent/CN116149689A/en
Application granted granted Critical
Publication of CN116149689B publication Critical patent/CN116149689B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Stored Programmes (AREA)

Abstract

The invention discloses a software installation method, a device, a storage medium and computer equipment, relates to the technical field of software deployment, and mainly aims to improve the software installation efficiency and the software installation accuracy. The method comprises the following steps: responding to an installation instruction of target software, wherein the installation instruction carries a software identifier corresponding to the target software; determining a software type of the target software based on the software identifier, and determining an installation configuration file corresponding to the software type; acquiring a plurality of components corresponding to the target software based on the installation configuration file; determining installation information corresponding to each component and determining the installation sequence among the components; and installing each component in the target server according to the installation information and the installation sequence corresponding to each component to obtain target software installed in the target server. The invention is suitable for installing software.

Description

Software installation method and device, storage medium and computer equipment
Technical Field
The present invention relates to the field of software deployment technologies, and in particular, to a method and apparatus for installing software, a storage medium, and a computer device.
Background
With the continuous development of information technology, there is an increasing demand for various computer software, and a large amount of software needs to be installed on a computer in order to meet the use demands of users.
Currently, the installation of software on a server is typically accomplished by manually configuring the software structural element code. However, in this installation mode, if the same software is installed on different servers, software structure element codes of corresponding times need to be configured according to the number of servers, and there are cases that the configuration codes are repeated, so that the efficiency of installing the software is low, and meanwhile, due to uneven technical level of staff, the situation that the configuration of the structure element codes is wrong occurs, so that the installation accuracy of the software is low.
Disclosure of Invention
The invention provides a software installation method, a device, a storage medium and computer equipment, which mainly aim at improving the installation efficiency and the installation accuracy of software.
According to a first aspect of the present invention, there is provided a software installation method comprising:
responding to an installation instruction of target software, wherein the installation instruction carries a software identifier corresponding to the target software;
Determining a software type of the target software based on the software identifier, and determining an installation configuration file corresponding to the software type;
acquiring a plurality of components corresponding to the target software based on the installation configuration file;
determining installation information corresponding to each component and determining the installation sequence among the components;
and installing each component in the target server according to the installation information and the installation sequence corresponding to each component to obtain target software installed in the target server.
Preferably, before said determining an installation profile corresponding to said software type, the method further comprises:
packaging each group of structure element codes corresponding to different types of software to obtain each group of components corresponding to the different types of software;
storing the components in each group into a component library corresponding to the different types of software;
constructing installation configuration files corresponding to different types of software, and establishing mapping relations between different installation configuration files and different component libraries;
the obtaining, based on the installation configuration file, a plurality of components corresponding to the target software includes:
determining a component library corresponding to the installation configuration file based on the mapping relation between the different installation configuration files and different component libraries;
And acquiring a plurality of components selected by a user from the component library aiming at the target software.
Preferably, the installation information includes the ip address of the target server to which the component is to be installed, the installation path of the component in the target server, the connection user name and the connection password between the component and the target server to which the component is to be installed, and the dependent component corresponding to the component.
Preferably, the determining the installation information corresponding to each component includes:
acquiring a target server ip address title item, an installation path title item, a connection user name title item, a connection password title item and a dependent component title item in an installation configuration file;
configuring a target server ip address to be installed of a component at a preset position corresponding to the target server ip address title item by utilizing an information assignment function;
configuring an installation path of the component in the target server at a preset position corresponding to the installation path title item;
configuring a connection user name between the component and a target server to be installed at a preset position corresponding to the connection user name title item;
configuring a connection password between the component and a target server to be installed at a preset position corresponding to the connection password title item;
And configuring a dependent component corresponding to the component at a preset position corresponding to the dependent component title item, wherein the same target server ip address and installation path exist between the dependent component and the corresponding component.
Preferably, said determining the order of installation between each of said components comprises:
determining a first number of dependent components corresponding to each component, and determining a second number of sub-dependent components corresponding to the dependent components in each component;
adding the second number of sub-dependent components corresponding to each dependent component in the target component, and adding the addition result to the first number of dependent components corresponding to the target component to obtain an installation level parameter corresponding to the target component, wherein the target component is any component in the components;
and determining the installation sequence among the components based on the installation grade parameters corresponding to the components, wherein the components with the largest installation grade parameters are arranged at the head.
Preferably, said determining the order of installation between each of said components comprises:
in response to a drag operation between the components, an order of installation between the components is determined.
Preferably, the installing each component in the target server according to the installation information and the installation sequence corresponding to each component to obtain the target software installed in the target server includes:
establishing connection with a target server by using a connection user name and a corresponding connection password in the installation information, and judging whether the address type of the ip address of the target server required to be installed by the component in the installation information is a remote ip;
if the address type is remote ip, uploading the installation information and the installation sequence to an installation catalog of a target server by using a remote file transfer function to install, wherein each component and the corresponding dependent component are installed in the target server through the corresponding installation path and the installation sequence in the installation information to obtain target software;
and if the address type is the local ip, copying the installation information and the installation sequence into an installation catalog of the target server by using a copy function for installation.
According to a second aspect of the present invention, there is provided a software installation apparatus comprising:
the instruction response unit is used for responding to an installation instruction of target software, wherein the installation instruction carries a software identifier corresponding to the target software;
The first determining unit is used for determining the type of the software to which the target software belongs based on the software identifier and determining an installation configuration file corresponding to the type of the software;
the acquisition unit is used for acquiring a plurality of components corresponding to the target software based on the installation configuration file;
a second determining unit configured to determine installation information corresponding to each of the components, and determine an installation order between the components;
and the installation unit is used for installing the components in the target server according to the installation information and the installation sequence corresponding to the components to obtain target software installed in the target server.
According to a third aspect of the present invention, there is provided a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the above software installation method.
According to a fourth aspect of the present invention there is provided a computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the above software installation method when executing the program.
According to the software installation method, the device, the storage medium and the computer equipment, compared with the mode of realizing software installation by manually writing the software structural element codes at present, the method responds to the installation instruction of the target software, wherein the installation instruction carries the software identifier corresponding to the target software; determining the type of the software to which the target software belongs based on the software identifier, and determining an installation configuration file corresponding to the type of the software; meanwhile, based on the installation configuration file, acquiring a plurality of components corresponding to the target software; then, determining the corresponding installation information of the components and determining the installation sequence among the components; finally, according to the installation information and the installation sequence corresponding to each component, each component is installed in a target server to obtain target software installed in the target server, so that the problem of lower software installation efficiency caused by manually writing a software structure element code is avoided by selecting the components required by the software in an installation configuration file, meanwhile, the situation of wrong writing of the manual code can be avoided, the installation accuracy of the software is improved, meanwhile, the installation information and the installation sequence are configured for each component, and finally, each component is automatically installed in the corresponding target server according to the installation information and the installation sequence, and the problem of lower installation efficiency caused by manually transmitting the components to the designated target server and manually executing the installation is avoided.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiments of the invention and together with the description serve to explain the invention and do not constitute a limitation on the invention. In the drawings:
FIG. 1 shows a flow chart of a software installation method provided by an embodiment of the invention;
FIG. 2 is a flowchart of another software installation method according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a software installation device according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of another software installation apparatus according to an embodiment of the present invention;
fig. 5 shows a schematic physical structure of a computer device according to an embodiment of the present invention.
Detailed Description
The invention will be described in detail hereinafter with reference to the drawings in conjunction with embodiments. It should be noted that, in the case of no conflict, the embodiments and features in the embodiments may be combined with each other.
At present, the software is installed in a mode of manually writing a software structural element code, so that the efficiency of the software installation is lower, and meanwhile, due to uneven technical level of staff, the condition of code writing errors can occur, so that the software installation accuracy is lower.
In order to solve the above problem, an embodiment of the present invention provides a software installation method, as shown in fig. 1, including:
101. responding to an installation instruction of the target software, wherein the installation instruction carries a software identifier corresponding to the target software.
The software identifier may be an icon identifier or a character identifier corresponding to the target software, so long as the software identifier can uniquely determine the target software, the form of the software identifier is not specifically limited in the embodiment of the present invention.
For the embodiment of the invention, the installation button can be clicked in the software installation system aiming at the target software, namely, the installation instruction of the target software is triggered, then the software installation system can display the software installation configuration file corresponding to the target software according to the software identifier carried in the installation instruction, and configures all installation information corresponding to the target software in the software installation configuration file, wherein the installation configuration file can be a yml file or an ini file, or can be a template file, namely, the installation configuration file is configured by both the component corresponding to the target software and the installation information, such as a config. Ini file, and the installation information is configured by the specification in the installation configuration file, so that the situation that a developer configures errors to the software installation information according to subjective cognition of the developer can be avoided, and the embodiment of the invention can improve the installation accuracy of the software. The embodiment of the invention can be applied to software installation in a linux system.
102. And determining the software type of the target software based on the software identification, and determining an installation configuration file corresponding to the software type.
Wherein, different software types correspond to different installation configuration files, and the installation configuration files can be configuration template files of the installation information.
For the embodiment of the invention, after receiving the installation instruction corresponding to the target software, analyzing the software identifier carried in the installation instruction, determining the software type of the target software according to the software identifier, and then inquiring the installation configuration file corresponding to the software type according to the preset configuration file table, wherein the installation configuration file corresponding to various software types is stored in the preset configuration file table, finally configuring the corresponding components and the installation information and the installation sequence corresponding to the components for the target software in the installation configuration file, and finally installing the components in the designated server according to the installation information and the installation sequence corresponding to the components. Therefore, the configuration specification in the installation configuration file is utilized to configure the installation information for the target software, and the situation that the installation efficiency is low due to the fact that continuous checking and checking are needed after the installation information is manually configured can be avoided, so that the software installation efficiency can be improved.
103. And acquiring a plurality of components corresponding to the target software based on the installation configuration file.
The target software is composed of at least one main component and a dependent component corresponding to the main component, wherein the dependent component refers to that installation or operation of the main component needs to depend on the dependent component.
For the embodiment of the invention, various structural element codes required for installing the type of software are packaged in advance to form various components required for installing the type of software, the component identifiers of the components corresponding to the target software are stored in the pull-down menu corresponding to the component title item of the installation configuration file, and a user can select a plurality of components required for installing the target software from the components displayed in the pull-down menu, so that the problem of repeated configuration of the software structural element codes each time when the same type of software is installed in different servers can be avoided by packaging the various structural element codes required for installing the type of software into different components in advance.
104. And determining the corresponding installation information of each component and determining the installation sequence among the components.
The installation information comprises IP (Internet Protocol ) address information of a target server required to be installed by each component, wherein the IP address information of the target server is at least one, installation path information of each component in the target server, dependency components corresponding to each component respectively, login user name information and login password information of establishing connection between each component and the target server, and selection information of whether a system administrator is switched in component installation. For the embodiment of the present invention, the title items of each installation information in the installation configuration file may be specifically presented in the following manner:
the USER selects a component in a drop-down menu corresponding to a component title item of an installation configuration file, the selected component is displayed in the installation configuration file in a [ xxx ] form, if jdk represents the jdk component, after the component is selected, each installation configuration title item corresponding to the component is automatically linked in the installation configuration file, if SSH_USER represents a USER name title item of SSH to a target server, and login USER name information for establishing connection between each component and the target server is required to be configured; ssh_pwd represents the password title item of the SSH user where it is necessary to configure login password information for each component to establish a connection with the target server; XXX_HOST represents a target server ip title item of the component, wherein a target server ip address of the component to be installed is configured, if the component needs to be installed in different servers, a plurality of servers ip can be separated by English commas, and if information of the configuration of the target server ip title item is empty, the component needs to be installed in a default server; XXX_PATH represents the installation PATH title item of the component in the target server, wherein the installation PATH of each component in the target server needs to be configured, and if the configuration information corresponding to the installation PATH title item is empty, the component needs to be installed in the default directory of the target server; XXX_RUNNER represents the USER title item of the component, where the USER name of the component is configured to run, if the configuration information is empty, the default is that the USER is SSH_USER USER; XXX_RUNNER_PWD represents the running password corresponding to the user name of the running component, and if the configuration information is empty here, the password corresponding to SSH_PWD is defaulted; XXX_UsingRootAuthority indicates whether a system administrator is required to switch (i.e., whether sudo is to be switched) when the component is installed, and if the configuration information is empty, it defaults to not switch. In addition, there is an interdependent configuration, such as xxx_ DEPENDENCY, which indicates the dependent component title item corresponding to the component, where configuring which components the component is forced to depend on, the component being forced to depend on will be automatically installed in the xxx_host target server, where the assignment (installation information) of each title item in the installation configuration file may be implemented by an initDefaultVariable function.
Further, after the installation information corresponding to each component is configured in each title item, the installation sequence of each component in the target server needs to be determined, and finally each component is automatically installed in the target server according to the installation information and the installation sequence corresponding to each component, so that the installation of target software in the server is realized, and the software installation efficiency is improved.
105. And installing each component in the target server according to the installation information and the installation sequence corresponding to each component to obtain target software installed in the target server.
For the embodiment of the invention, after the installation information and the installation sequence corresponding to each component are determined, the installation information and the installation sequence corresponding to each component are automatically transmitted to the appointed directory of the target server according to the target server ip in the installation information, and each component is installed in the target server according to the installation path and the installation sequence in the installation information in the appointed directory, so that the problem of lower software installation efficiency caused by manually writing a software structure element code is avoided by selecting the components required by the software in the installation configuration file, meanwhile, the condition of error writing of the manual code is avoided, the installation accuracy of the software is improved, meanwhile, the installation information and the installation sequence are configured for each component, and finally, each component is automatically installed in the corresponding target server according to the installation information and the installation sequence, so that the problem of lower installation efficiency caused by manually transmitting the components to the appointed target server and manually executing the installation is avoided.
According to the software installation method provided by the invention, compared with the mode of realizing software installation by manually writing the software structure element code at present, the method responds to the installation instruction of the target software, wherein the installation instruction carries the software identifier corresponding to the target software; determining the type of the software to which the target software belongs based on the software identifier, and determining an installation configuration file corresponding to the type of the software; meanwhile, based on the installation configuration file, acquiring a plurality of components corresponding to the target software; then, determining the corresponding installation information of the components and determining the installation sequence among the components; finally, according to the installation information and the installation sequence corresponding to each component, each component is installed in a target server to obtain target software installed in the target server, so that the problem of lower software installation efficiency caused by manually writing a software structure element code is avoided by selecting the components required by the software in an installation configuration file, meanwhile, the situation of error writing of the manual code can be avoided, the installation accuracy of the software is improved, meanwhile, the installation information and the installation sequence are configured for each component, and finally, each component is automatically installed in the corresponding target server according to the installation information and the installation sequence, and the problem of lower installation efficiency caused by manually transmitting the components to the designated target server and manually executing the installation is avoided.
Further, in order to better illustrate the above process of installing software, as a refinement and extension of the above embodiment, another software installation method is provided in the embodiment of the present invention, as shown in fig. 2, where the method includes:
201. responding to an installation instruction of the target software, wherein the installation instruction carries a software identifier corresponding to the target software.
Specifically, when the user selects the installation identifier of the target software in the software installation system, namely, triggers the installation instruction corresponding to the target software, when the software installation system receives the installation instruction of the target software, the installation configuration file corresponding to the target software is automatically acquired and displayed according to the software identifier carried in the installation instruction.
202. And determining the software type of the target software based on the software identification, and determining an installation configuration file corresponding to the software type.
203. And acquiring a plurality of components corresponding to the target software based on the installation configuration file.
For the embodiment of the present invention, in order to facilitate installation of the target software, the structural elements of the target software need to be encapsulated into respective components, based on which, before step 202, the method includes: packaging each group of structure element codes corresponding to different types of software to obtain each group of components corresponding to the different types of software; storing the components in each group into a component library corresponding to the different types of software; and constructing installation configuration files corresponding to the different types of software, and establishing mapping relations between the different installation configuration files and different component libraries.
Specifically, each group of structure element codes corresponding to different types of software are packaged in advance to obtain components corresponding to each group of structure element codes, each group of components are stored in a component library corresponding to different types of software, installation configuration files corresponding to different types of software are built, and then a mapping relation between the installation configuration files corresponding to the same type of software and the component library is built, so that after the installation configuration files corresponding to target software are determined, the component library corresponding to the target software is automatically linked in the installation configuration files.
Further, after the mapping relation between different types of software and different component libraries is established, the installation configuration file is determined according to the software type to which the target software belongs, at this time, the component library corresponding to the installation configuration file can be determined according to the mapping relation between different installation configuration files and different component libraries, each component corresponding to the target software is selected in the component library in a pull-down menu mode, at this time, each component is arranged in the installation configuration file in a selected sequence, and the arrangement sequence among each component can be changed through operations such as dragging.
204. And determining the installation information corresponding to each component.
The installation information corresponding to the component comprises an ip address of a target server to be installed of the component and an installation path of the component in the target server, a connection user name and a connection password between the component and the target server to be installed, and a dependent component corresponding to the component.
Specifically, after each installation component is selected in the installation configuration file, the installation information configuration items corresponding to each component are automatically displayed in the installation configuration file, wherein the installation configuration items comprise: the target server ip address title item, installation path title item, connection user name title item, connection password title item, and dependency component title item, at this time, require configuration of installation information at preset positions corresponding to each configuration item, based on which step 204 specifically includes: acquiring a target server ip address title item, an installation path title item, a connection user name title item, a connection password title item and a dependent component title item in an installation configuration file; configuring a target server ip address to be installed of a component at a preset position corresponding to the target server ip address title item by utilizing an information assignment function; configuring an installation path of the component in the target server at a preset position corresponding to the installation path title item; configuring a connection user name between the component and a target server to be installed at a preset position corresponding to the connection user name title item; configuring a connection password between the component and a target server to be installed at a preset position corresponding to the connection password title item; and configuring a dependent component corresponding to the component at a preset position corresponding to the dependent component title item, wherein the same target server ip address and installation path exist between the dependent component and the corresponding component.
Specifically, a crawler and other programs are utilized to automatically acquire a target server ip address title item, an installation path title item, a connection user name title item, a connection password title item and a dependent component title item in an installation configuration file, when the server ip address title item is acquired, different components have corresponding configuration items, specifically, the target server ip address information required to be installed by the components can be configured at preset positions corresponding to the configuration items by utilizing an initDefaultVariable and other information assignment function, when the installation path title item is acquired, the installation path of the components in the target server can be configured at preset positions corresponding to the configuration items by utilizing an initDefaultVariable and other information assignment function, when the connection user name title item is acquired, the login user name information required to be connected with the target server at preset positions corresponding to the configuration items by utilizing the initDefaultVariable and other information assignment function can be configured at preset positions corresponding to the target server, when the connection password title item is acquired, the connection password name information required to be established by utilizing the initDefault Variable and other information assignment function can be configured at preset positions corresponding to the target server, and the dependent password name item can be configured at the preset positions corresponding to the target server.
205. A first number of dependent components corresponding to each component is determined, and a second number of sub-dependent components corresponding to the dependent components in each component is determined.
206. And adding the second number of sub-dependent components corresponding to each dependent component in the target component, and adding the addition result to the first number of dependent components corresponding to the target component to obtain the installation level parameter corresponding to the target component.
207. And determining the installation sequence among the components based on the installation grade parameters corresponding to the components, wherein the component with the largest installation grade parameter is arranged at the head.
Wherein the target component is any component of the components. For the embodiment of the present invention, in order to install each component in order, for example, if each component includes a component a and a component B, if the target component a corresponds to 2 dependent components, respectively a dependent component a and a dependent component B, the dependent component a corresponds to 2 dependent components (sub-dependent components), respectively a sub-dependent component x and a sub-dependent component y, the dependent component B corresponds to 3 dependent components (sub-dependent components), respectively a sub-dependent component e, a sub-dependent component f and a sub-dependent component g, the second number of sub-dependent components corresponding to the dependent component in the target component a is determined to be 5, the number of dependent components corresponding to the target component a is determined to be 2, the installation level parameter corresponding to the target component a is finally calculated to be 7, and similarly, if the installation level parameter corresponding to the target component a is calculated to be 5, it is determined that the target component a should be installed before the component B according to the installation level parameter.
In yet another embodiment of the present invention, the installation order between the components may also be obtained directly by dragging the components, for example, if the component a is arranged in front of the component B by a dragging operation, it is determined that the component a should be installed before the component B, for example, in an installation configuration file, the presentation form of each component is instalflow=jdk, redis, which means that the jdk component is installed first and then the redis component is installed.
208. And installing each component in the target server according to the installation information and the installation sequence corresponding to each component to obtain target software installed in the target server.
For the embodiment of the present invention, after determining the installation information and the installation sequence corresponding to each component, each component may be installed in the target server, based on which, step 208 specifically includes: establishing connection with a target server by using a connection user name and a corresponding connection password in the installation information, and judging whether the address type of the ip address of the target server required to be installed by the component in the installation information is a remote ip; if the address type is remote ip, uploading the installation information and the installation sequence to an installation catalog of a target server by using a remote file transfer function to install, wherein each component and the corresponding dependent component are installed in the target server through the corresponding installation path and the installation sequence in the installation information to obtain target software; and if the address type is the local ip, copying the installation information and the installation sequence into an installation catalog of the target server by using a copy function for installation.
Specifically, the connection user name and the connection password configured in the installation information are analyzed, connection between the installation configuration file and the server is established according to the connection user name and the connection password, then the fact that the IP where the target server is located is a local IP or a remote IP is automatically identified according to the value of HOST, if the IP is a remote IP, each component and the corresponding installation information and the installation sequence thereof are uploaded to a designated directory of the target server in a mode of a remote file transfer function such as a scp command or a Curl command, if the IP where the target server is located is a local IP, each component and the corresponding installation information and the installation sequence thereof are copied to the designated directory of the target server by using a copy function such as an execution cp command, therefore, the transmission efficiency of the file can be improved by selecting different file transmission modes for different IP address types, and then each component and the corresponding dependent component thereof are automatically installed in the target server according to the installation path and the installation sequence in the installation information after each installation component and the corresponding installation sequence thereof are transmitted to the target server, so that the installation of the target software in the target server is realized.
Furthermore, the embodiment of the invention also supports the custom deployment USERs of all the components, namely, the unified deployment USERs can be appointed through SSH_USER, wherein the USERs can be root USERs, non-root USERs can be used, and the installation USERs of special components can be appointed. The method automatically identifies the operating system and the version, and replaces passwords in su switching with different commands according to different results, thereby realizing multi-user automatic deployment. Meanwhile, the embodiment of the invention can also support the modification of the installation configuration file, the installation configuration file can be a Yml file and an ini file, a component for modifying Yml files is arranged in the installation configuration file, the modification can be accurately carried out through the key of the Yml file, and the reading and writing capacity of the Yml file is realized through an editYml function; meanwhile, a component for modifying the ini file is also built in, the modification can be accurately performed through the key of the ini file, and the read-write capability of the ini file is realized through an editIni function. Furthermore, in the embodiment of the invention, a new component can be added in the installation configuration file, if the installation configuration file is an ini file, a module and configuration information can be added in a config.
According to the other software installation method provided by the invention, compared with the mode of realizing software installation by manually writing the software structure element code at present, the method responds to the installation instruction of the target software, wherein the installation instruction carries the software identifier corresponding to the target software; determining the type of the software to which the target software belongs based on the software identifier, and determining an installation configuration file corresponding to the type of the software; meanwhile, based on the installation configuration file, acquiring a plurality of components corresponding to the target software; then, determining the corresponding installation information of the components and determining the installation sequence among the components; finally, according to the installation information and the installation sequence corresponding to each component, each component is installed in a target server to obtain target software installed in the target server, so that the problem of lower software installation efficiency caused by manually writing a software structure element code is avoided by selecting the components required by the software in an installation configuration file, meanwhile, the situation of error writing of the manual code can be avoided, the installation accuracy of the software is improved, meanwhile, the installation information and the installation sequence are configured for each component, and finally, each component is automatically installed in the corresponding target server according to the installation information and the installation sequence, and the problem of lower installation efficiency caused by manually transmitting the components to the designated target server and manually executing the installation is avoided.
Further, as a specific implementation of fig. 1, an embodiment of the present invention provides a software installation apparatus, as shown in fig. 3, where the apparatus includes: an instruction response unit 31, a first determination unit 32, an acquisition unit 33, a second determination unit 34, and an installation unit 35.
The instruction response unit 31 may be configured to respond to an installation instruction of the target software, where the installation instruction carries a software identifier corresponding to the target software.
The first determining unit 32 may be configured to determine, based on the software identifier, a software type to which the target software belongs, and determine an installation configuration file corresponding to the software type.
The obtaining unit 33 may be configured to obtain, based on the installation configuration file, a plurality of components corresponding to the target software.
The second determining unit 34 may be configured to determine installation information corresponding to each of the components, and determine an installation order between each of the components.
The installation unit 35 may be configured to install each of the components in a target server according to the installation information and the installation sequence corresponding to each of the components, to obtain target software installed in the target server.
In a specific application scenario, in order to obtain a component corresponding to the target software in the installation configuration file, as shown in fig. 4, the apparatus further includes: encapsulation unit 36, storage unit 37 and construction unit 38.
The packaging unit 36 may be configured to package each group of structural element codes corresponding to different types of software, so as to obtain each group of components corresponding to the different types of software.
The storage unit 37 may be configured to store the components of each group in a component library corresponding to the different types of software;
the construction unit 38 may be configured to construct installation configuration files corresponding to the different types of software, and establish mapping relationships between the different installation configuration files and different component libraries.
The obtaining unit 33 may specifically be configured to determine a component library corresponding to the installation configuration file based on a mapping relationship between different installation configuration files and different component libraries; and acquiring a plurality of components selected by a user from the component library aiming at the target software.
In a specific application scenario, the installation information includes an ip address of a target server to be installed for the component, an installation path of the component in the target server, a connection user name and a connection password between the component and the target server to be installed, and a dependent component corresponding to the component.
In a specific application scenario, in order to determine the installation information corresponding to each component, the second determining unit 34 includes an obtaining module 341 and a configuration module 342.
The obtaining module 341 may be configured to obtain a target server ip address title item, an installation path title item, a connection user name title item, a connection password title item, and a dependency component item in an installation configuration file.
The configuration module 342 may be configured to configure, by using an information assignment function, a target server ip address where the component needs to be installed at a preset location corresponding to the target server ip address header.
The configuration module 342 may be further configured to configure an installation path of the component in the target server at a preset position corresponding to the installation path title item.
The configuration module 342 may be further configured to configure a connection user name between the component and the target server to be installed at a preset location corresponding to the connection user name title item.
The configuration module 342 may be further configured to configure a connection password between a component and a target server to be installed at a preset location corresponding to the connection password title item.
The configuration module 342 may be further configured to configure a dependency component corresponding to a component at a preset location corresponding to the dependency component title item, where the dependency component and the corresponding component have the same target server ip address and installation path.
In a specific application scenario, in order to determine the installation order between the components, the second determining unit 34 further includes a determining module 343 and an adding module 344.
The determining module 343 may be configured to determine a first number of dependent components corresponding to each of the components, and determine a second number of sub-dependent components corresponding to dependent components in each of the components.
The adding module 344 may be configured to add the second number of sub-dependent components corresponding to each dependent component in the target component, and add the addition result to the first number of dependent components corresponding to the target component, to obtain an installation level parameter corresponding to the target component, where the target component is any component in each component.
The determining module 343 may be specifically configured to determine an installation order between the components based on the installation level parameters corresponding to the components, where the component with the largest installation level parameter is installed first.
In a specific application scenario, in order to determine the installation order between the components, the determining module 343 may be further configured to determine the installation order between the components in response to a drag operation between the components.
In a specific application scenario, in order to install each component in the target server, the installation unit 35 includes a judgment module 351, a transmission module 352, and a copy module 353.
The judging module 351 may be configured to establish a connection with a target server by using a connection user name and a connection password corresponding to the connection user name in the installation information, and judge whether an address type of an ip address of the target server to be installed of the component in the installation information is a remote ip.
The transmission module 352 may be configured to upload the installation information and the installation sequence to an installation directory of the target server by using a remote file transfer function if the address type is remote ip, where each component and its corresponding dependent component are installed in the target server through a corresponding installation path and an installation sequence in the installation information, so as to obtain target software.
The copy module 353 may be configured to copy the installation information and the installation sequence to an installation directory of the target server by using a copy function if the address type is local ip.
It should be noted that, for other corresponding descriptions of each functional module related to the software installation device provided by the embodiment of the present invention, reference may be made to corresponding descriptions of the method shown in fig. 1, which are not repeated herein.
Based on the above method as shown in fig. 1, correspondingly, the embodiment of the present invention further provides a computer readable storage medium, on which a computer program is stored, which when being executed by a processor, implements the following steps: responding to an installation instruction of target software, wherein the installation instruction carries a software identifier corresponding to the target software; determining a software type of the target software based on the software identifier, and determining an installation configuration file corresponding to the software type; acquiring a plurality of components corresponding to the target software based on the installation configuration file; determining installation information corresponding to each component and determining the installation sequence among the components; and installing each component in the target server according to the installation information and the installation sequence corresponding to each component to obtain target software installed in the target server.
Based on the embodiment of the method shown in fig. 1 and the device shown in fig. 3, the embodiment of the invention further provides a physical structure diagram of a computer device, as shown in fig. 5, where the computer device includes: a processor 41, a memory 42, and a computer program stored on the memory 42 and executable on the processor, wherein the memory 42 and the processor 41 are both arranged on a bus 43, the processor 41 performing the following steps when said program is executed: responding to an installation instruction of target software, wherein the installation instruction carries a software identifier corresponding to the target software; determining a software type of the target software based on the software identifier, and determining an installation configuration file corresponding to the software type; acquiring a plurality of components corresponding to the target software based on the installation configuration file; determining installation information corresponding to each component and determining the installation sequence among the components; and installing each component in the target server according to the installation information and the installation sequence corresponding to each component to obtain target software installed in the target server.
According to the technical scheme, the method responds to the installation instruction of the target software, wherein the installation instruction carries the software identifier corresponding to the target software; determining the type of the software to which the target software belongs based on the software identifier, and determining an installation configuration file corresponding to the type of the software; meanwhile, based on the installation configuration file, acquiring a plurality of components corresponding to the target software; then, determining the corresponding installation information of the components and determining the installation sequence among the components; finally, according to the installation information and the installation sequence corresponding to each component, each component is installed in a target server to obtain target software installed in the target server, so that the problem of lower software installation efficiency caused by manually writing a software structure element code is avoided by selecting the components required by the software in an installation configuration file, meanwhile, the situation of error writing of the manual code can be avoided, the installation accuracy of the software is improved, meanwhile, the installation information and the installation sequence are configured for each component, and finally, each component is automatically installed in the corresponding target server according to the installation information and the installation sequence, and the problem of lower installation efficiency caused by manually transmitting the components to the designated target server and manually executing the installation is avoided.
It will be appreciated by those skilled in the art that the modules or steps of the invention described above may be implemented in a general purpose computing device, they may be concentrated on a single computing device, or distributed across a network of computing devices, they may alternatively be implemented in program code executable by computing devices, so that they may be stored in a memory device for execution by computing devices, and in some cases, the steps shown or described may be performed in a different order than that shown or described, or they may be separately fabricated into individual integrated circuit modules, or multiple modules or steps within them may be fabricated into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.
The above description is only of the preferred embodiments of the present invention and is not intended to limit the present invention, but various modifications and variations can be made to the present invention by those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (9)

1. A software installation method, comprising:
Responding to an installation instruction of target software, wherein the installation instruction carries a software identifier corresponding to the target software;
determining a software type of the target software based on the software identifier, and determining an installation configuration file corresponding to the software type;
acquiring a plurality of components corresponding to the target software based on the installation configuration file;
determining installation information corresponding to each component and determining the installation sequence among the components;
installing each component in a target server according to the installation information and the installation sequence corresponding to each component to obtain target software installed in the target server;
based on the installation configuration file, obtaining a plurality of components corresponding to the target software includes:
the installation configuration file can be a configuration template of the installation information, component identifiers of all components corresponding to the target software are stored in a pull-down menu corresponding to component title items of the installation configuration file, and a plurality of components required by installing the target software and selected by a user from the component identifiers displayed in the pull-down menu are acquired;
wherein said determining an order of installation between each of said components comprises:
Determining a first number of dependent components corresponding to each component, and determining a second number of sub-dependent components corresponding to the dependent components in each component;
adding the second number of sub-dependent components corresponding to each dependent component in the target component, and adding the addition result to the first number of dependent components corresponding to the target component to obtain an installation level parameter corresponding to the target component, wherein the target component is any component in the components;
and determining the installation sequence among the components based on the installation grade parameters corresponding to the components, wherein the components with the largest installation grade parameters are arranged at the head.
2. The method of claim 1, wherein prior to the determining the installation profile corresponding to the software type, the method further comprises:
packaging each group of structure element codes corresponding to different types of software to obtain each group of components corresponding to the different types of software;
storing the components in each group into a component library corresponding to the different types of software;
constructing installation configuration files corresponding to different types of software, and establishing mapping relations between different installation configuration files and different component libraries;
The obtaining, based on the installation configuration file, a plurality of components corresponding to the target software includes:
determining a component library corresponding to the installation configuration file based on the mapping relation between the different installation configuration files and different component libraries;
and acquiring a plurality of components selected by a user from the component library aiming at the target software.
3. The method according to claim 1, wherein the installation information includes an ip address of a target server to which the component is to be installed and an installation path of the component in the target server, a connection user name and a connection password between the component and the target server to which the component is to be installed, and a dependent component to which the component corresponds.
4. The method of claim 1, wherein determining the installation information corresponding to each of the components comprises:
acquiring a target server ip address title item, an installation path title item, a connection user name title item, a connection password title item and a dependent component title item in an installation configuration file;
configuring a target server ip address to be installed of a component at a preset position corresponding to the target server ip address title item by utilizing an information assignment function;
configuring an installation path of the component in the target server at a preset position corresponding to the installation path title item;
Configuring a connection user name between the component and a target server to be installed at a preset position corresponding to the connection user name title item;
configuring a connection password between the component and a target server to be installed at a preset position corresponding to the connection password title item;
and configuring a dependent component corresponding to the component at a preset position corresponding to the dependent component title item, wherein the same target server ip address and installation path exist between the dependent component and the corresponding component.
5. The method of claim 1, wherein said determining an order of installation between each of said components comprises:
in response to a drag operation between the components, an order of installation between the components is determined.
6. The method according to claim 1, wherein installing each component in the target server according to the installation information and the installation sequence corresponding to each component to obtain the target software installed in the target server, comprises:
establishing connection with a target server by using a connection user name and a corresponding connection password in the installation information, and judging whether the address type of a target server ip address required to be installed by a component in the installation information is a remote ip;
If the address type is remote ip, uploading the installation information and the installation sequence to an installation catalog of a target server by using a remote file transfer function to install, wherein each component and the corresponding dependent component are installed in the target server through the corresponding installation path and the installation sequence in the installation information to obtain target software;
and if the address type is the local ip, copying the installation information and the installation sequence into an installation catalog of the target server by using a copy function for installation.
7. A software installation apparatus, comprising:
the instruction response unit is used for responding to an installation instruction of target software, wherein the installation instruction carries a software identifier corresponding to the target software;
the first determining unit is used for determining the type of the software to which the target software belongs based on the software identifier and determining an installation configuration file corresponding to the type of the software;
the acquisition unit is used for acquiring a plurality of components corresponding to the target software based on the installation configuration file;
a second determining unit configured to determine installation information corresponding to each of the components, and determine an installation order between the components;
The installation unit is used for installing the components in the target server according to the installation information and the installation sequence corresponding to the components to obtain target software installed in the target server;
the acquiring unit may be specifically configured to use an installation configuration file as a configuration template of the installation information, where component identifiers of components corresponding to the target software are stored in a pull-down menu corresponding to component title items of the installation configuration file, and a plurality of components required for installing the target software are selected from the component identifiers displayed in the pull-down menu by the user side;
the second determining unit may be specifically configured to determine a first number of dependent components corresponding to each component, and determine a second number of sub-dependent components corresponding to the dependent components in each component; adding the second number of sub-dependent components corresponding to each dependent component in the target component, and adding the addition result to the first number of dependent components corresponding to the target component to obtain an installation level parameter corresponding to the target component, wherein the target component is any component in the components; and determining the installation sequence among the components based on the installation grade parameters corresponding to the components, wherein the components with the largest installation grade parameters are arranged at the head.
8. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 6.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the computer program when executed by the processor implements the steps of the method according to any one of claims 1 to 6.
CN202310447745.1A 2023-04-24 2023-04-24 Software installation method and device, storage medium and computer equipment Active CN116149689B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310447745.1A CN116149689B (en) 2023-04-24 2023-04-24 Software installation method and device, storage medium and computer equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310447745.1A CN116149689B (en) 2023-04-24 2023-04-24 Software installation method and device, storage medium and computer equipment

Publications (2)

Publication Number Publication Date
CN116149689A CN116149689A (en) 2023-05-23
CN116149689B true CN116149689B (en) 2023-07-04

Family

ID=86356773

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310447745.1A Active CN116149689B (en) 2023-04-24 2023-04-24 Software installation method and device, storage medium and computer equipment

Country Status (1)

Country Link
CN (1) CN116149689B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6681323B1 (en) * 1999-11-29 2004-01-20 Toshiba America Information Systems, Inc. Method and system for automatically installing an initial software configuration including an operating system module from a library containing at least two operating system modules based on retrieved computer identification data
EP2154606A1 (en) * 2008-08-04 2010-02-17 AVL List GmbH Generation of a runnable configuration
WO2013123829A1 (en) * 2012-02-22 2013-08-29 腾讯科技(深圳)有限公司 Software installation method, device and system
US9323644B1 (en) * 2015-09-30 2016-04-26 Semmle Limited Query-based software dependency analysis
CN112328267A (en) * 2020-11-09 2021-02-05 北京锐安科技有限公司 Multi-server installation method and device, terminal and storage medium
CN112527416A (en) * 2020-12-24 2021-03-19 深圳追一科技有限公司 Task processing method and device, computer equipment and storage medium
CN112882764A (en) * 2021-01-20 2021-06-01 网易(杭州)网络有限公司 Component loading method and device, computer equipment and storage medium

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8122101B2 (en) * 2006-12-29 2012-02-21 Sap Ag Methods and systems for distributing software
US9517410B2 (en) * 2011-04-28 2016-12-13 Numecent Holdings, Inc. Adaptive application streaming in cloud gaming
US8881103B2 (en) * 2011-08-15 2014-11-04 International Business Machines Corporation Comparing component weights between builds
US9195986B2 (en) * 2012-06-11 2015-11-24 Dayco Ip Holdings, Llc VIN scan/code catalog and information lookup
CN109597627A (en) * 2017-09-30 2019-04-09 北京国双科技有限公司 A kind of component mounting method, device, storage medium and processor
US10795909B1 (en) * 2018-06-14 2020-10-06 Palantir Technologies Inc. Minimized and collapsed resource dependency path
CN110515629A (en) * 2019-08-09 2019-11-29 广东浪潮大数据研究有限公司 A kind of script dispositions method, device, equipment and computer readable storage medium
CN110727440B (en) * 2019-10-08 2022-10-04 中国电子科技集团公司第二十八研究所 A software packaging method
CN111708550A (en) * 2020-07-17 2020-09-25 腾讯科技(深圳)有限公司 Application deployment method and device, computer equipment and storage medium
CN114691342B (en) * 2022-05-31 2022-09-20 蓝象智联(杭州)科技有限公司 Method and device for realizing priority scheduling of federated learning algorithm component and storage medium
CN115495110A (en) * 2022-10-28 2022-12-20 三一重能股份有限公司 Method and device for installation and deployment of product components, electronic equipment and storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6681323B1 (en) * 1999-11-29 2004-01-20 Toshiba America Information Systems, Inc. Method and system for automatically installing an initial software configuration including an operating system module from a library containing at least two operating system modules based on retrieved computer identification data
EP2154606A1 (en) * 2008-08-04 2010-02-17 AVL List GmbH Generation of a runnable configuration
WO2013123829A1 (en) * 2012-02-22 2013-08-29 腾讯科技(深圳)有限公司 Software installation method, device and system
US9323644B1 (en) * 2015-09-30 2016-04-26 Semmle Limited Query-based software dependency analysis
CN112328267A (en) * 2020-11-09 2021-02-05 北京锐安科技有限公司 Multi-server installation method and device, terminal and storage medium
CN112527416A (en) * 2020-12-24 2021-03-19 深圳追一科技有限公司 Task processing method and device, computer equipment and storage medium
CN112882764A (en) * 2021-01-20 2021-06-01 网易(杭州)网络有限公司 Component loading method and device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN116149689A (en) 2023-05-23

Similar Documents

Publication Publication Date Title
CN112491606B (en) Method for automatically deploying high-availability cluster of service system based on infrastructure
CN111367534B (en) Service arrangement method and system based on application environment
US7600005B2 (en) Method and apparatus for provisioning heterogeneous operating systems onto heterogeneous hardware systems
US8010634B2 (en) Selection and configuration of storage-area network storage device and computing device, including configuring DHCP settings
KR102524126B1 (en) Apparatus for providing design and deployment of distributed cloud system for establishing 5G infra and method thereof
US8341251B2 (en) Enabling storage area network component migration
CN106878334A (en) Cloud automated deployment system and method
CN110149409B (en) Cloud host metadata service management method, system, equipment and storage medium
CN110138577B (en) Cluster creation method, first server and readable storage medium
CN109391688A (en) The acquisition methods and device of image file in cloud computing system
CN107741852B (en) A service deployment method based on cluster software
US7242499B2 (en) System for creating a virtual file server to provide data files
WO2018173164A1 (en) Data processing system
US20150281398A1 (en) Automated Cloud Set Up
WO2020199597A1 (en) Blockchain node management agent service installation method, electronic apparatus and storage medium
CN112003754A (en) Visual node registration method for OpenStack cluster
CN110928554A (en) Deployment method, device, equipment and storage medium
CN109271172A (en) A kind of host behavior extension method and device of swarm cluster
CN109460268B (en) Application parameter configuration method, device and system
CN112968929B (en) Server management method and system
US11221889B2 (en) Method of deploying cloud services quickly
US7496551B1 (en) Methods and apparatus associated with advisory generation
CN111045695A (en) WebLogic middleware deployment device, method, equipment and medium
CN116149689B (en) Software installation method and device, storage medium and computer equipment
CN114726719B (en) Network element operating system deployment method and device, electronic equipment and storage medium

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
GR01 Patent grant
GR01 Patent grant