CN111198694A - Software installation method and device - Google Patents

Software installation method and device Download PDF

Info

Publication number
CN111198694A
CN111198694A CN201811385607.0A CN201811385607A CN111198694A CN 111198694 A CN111198694 A CN 111198694A CN 201811385607 A CN201811385607 A CN 201811385607A CN 111198694 A CN111198694 A CN 111198694A
Authority
CN
China
Prior art keywords
software
package
target
dependent
portable
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
CN201811385607.0A
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.)
Beijing Gridsum Technology Co Ltd
Original Assignee
Beijing Gridsum 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 Beijing Gridsum Technology Co Ltd filed Critical Beijing Gridsum Technology Co Ltd
Priority to CN201811385607.0A priority Critical patent/CN111198694A/en
Publication of CN111198694A publication Critical patent/CN111198694A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates

Abstract

The application discloses a software installation method and device. The method comprises the following steps: downloading target software and a software package which completely depends on the software by adopting a package downloader; packaging the downloaded software package into a portable package through a software package packager; after the portable package is transplanted to a target host needing to install the target software, the target software and all dependent software in the portable package are installed on the target host. Through the application, the problem that an idle cloud host is adopted to build yum source servers in the related art, and hardware resources are wasted is solved.

Description

Software installation method and device
Technical Field
The application relates to the field of software installation, in particular to a method and a device for installing software.
Background
In the Linux system, the Linux kernel can efficiently manage and coordinate hardware resources with less resources, and the server application does not need an intuitive visual management interface when being deployed, so that a considerable part of application programs select an operating system server with the Linux kernel as a deployment platform. The ubiquitous cloud service adopted by the prior art provides great convenience for rapid deployment and expansion of applications.
However, depending on the application scenario, some applications need to be deployed on a private cloud platform for security and controllability, such a cloud is typically characterized by very limited internet access rights, and deployed applications may need some dependent software packages with a small volume but a large amount of data.
In addition, even if the target host has the internet access right, the network state may be unstable due to time and place, and the network state is used as a uniform application deployment package, and it is not desirable that these additional factors influence the deployment process and experience of the application.
Under the above scenario, the cloud host has no corresponding yum source network authority, so a server providing yum source service is usually built in the local area network accessible by the private cloud host, and then the configuration of the host needing to access yum source is modified. Building a local source can conveniently provide yum source services and reduce potential safety hazards from a network to a certain extent, but the method not only needs to occupy an idle cloud host and occupies a large amount of hardware resources, but also fundamentally does not cut off the connection problem of a local area network and a wide area network and possibly has the potential hazards of network attack. Additionally, changing the yum source is also an operation that is highly error prone.
In view of the above problems, no effective solution has been proposed.
Disclosure of Invention
The application mainly aims to provide a software installation method and device, and the problem that hardware resources are wasted due to the fact that an idle cloud host is used for building yum source servers in the related art is solved.
In order to achieve the above object, according to an aspect of the present application, there is provided a software installation method including: downloading target software and a software package which completely depends on the software by adopting a package downloader; packaging the downloaded software package into a portable package through a software package packager; and after the portable package is transplanted to a target host needing to install the target software, installing the target software and all dependent software in the portable package on the target host.
Optionally, installing the target software and all dependent software in the portable package on the target host includes: generating a local source according to the portable package; and installing target software and all dependent software on the target host according to the local source.
Optionally, before installing the target software and all dependent software in the portable package on the target host, the method further includes: backing up a system source of the target host to obtain a backup source; after the target software and all dependent software in the portable package are installed on the target host, the method further comprises the following steps: replacing the local source with the backup source.
Optionally, the generating a local source according to the portable package includes: and deploying the target software in the portable package and all software packages depending on the software to a preset position to obtain a local source.
Optionally, before the software package of the target software and all dependent software is downloaded by using the package downloader, the method further includes: acquiring a dependency tree of the target software, wherein a root node of the dependency tree corresponds to the target software, other nodes except the root node correspond to the dependency software of the target software, and an adjacent pair of parent and child nodes represent parent node dependency and child nodes; the downloading of the target software and the software package of all dependent software by using the package downloader includes: downloading software packages corresponding to all nodes in the dependency tree of the target software by adopting a package downloader; the installing the target software and all dependent software in the portable package on the target host comprises: and installing the target software and all the dependent software according to the dependency relationship in the dependency tree of the target software.
Optionally, each software package includes an installer and attribute information, the attribute information includes a version, and installing the target software and all dependent software on the target host according to the local source includes: for each software package of a local source, the installation steps are as follows: judging whether the target host is provided with software in the software package or not; installing the software in the case that the target host does not install the software in the software package; under the condition that the target host is provided with the software in the software package, judging whether the current version of the software on the target host is lower than the version in the software package; updating the software when the current version of the software is lower than the version in the software package.
Optionally, before packaging the downloaded software package into a portable package by a software package packager, the method includes: deleting data irrelevant to the target software in all software packages; packaging the downloaded software package into a portable package by a software package packager comprises: and packaging all the software packages after the irrelevant data is deleted into a portable package through a software package packager.
In order to achieve the above object, according to another aspect of the present application, there is provided an installation apparatus of software, including: the download module is used for downloading the target software and the software package which depends on the software by adopting a package downloader; the packaging module is used for packaging the downloaded software package into a portable package through a software package packager; and the installation module is used for installing the target software and all dependent software in the portable package on the target host after the portable package is transplanted to the target host needing to install the target software.
In order to achieve the above object, according to another aspect of the present application, there is provided a storage medium including a stored program, wherein the program performs the method of any one of the above.
To achieve the above object, according to another aspect of the present application, there is provided a processor for executing a program, wherein the program executes to perform the method of any one of the above.
According to the application, a package downloader is adopted to download the target software and the software packages which all depend on the target software; the method comprises the steps of packaging the downloaded software package into a portable package by a software packager, transplanting the portable package to a target host computer needing to install target software, and then installing the target software in the portable package and all dependent software on the target host computer, so that the problem that hardware resources are wasted due to the fact that an idle cloud host computer is adopted to build yum source servers in the related technology is solved. And the effects that target software and the dependence thereof are installed on the target host according to the portable package, the target software can be quickly installed in place, and hardware resource consumption is effectively saved are achieved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this application, illustrate embodiments of the application and, together with the description, serve to explain the application and are not intended to limit the application. In the drawings:
FIG. 1 is a flow chart of a method of installing software provided according to an embodiment of the present application;
FIG. 2 is a flow chart of a method of installing software provided according to an embodiment of the present application; and
fig. 3 is a schematic diagram of a software installation apparatus provided according to an embodiment of the present application.
Detailed Description
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only partial embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and claims of this application and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It should be understood that the data so used may be interchanged under appropriate circumstances such that embodiments of the application described herein may be used. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
For convenience of description, some terms or expressions referred to in the embodiments of the present application are explained below:
the CentOS: a free open-source enterprise-level operating system based on a Linux kernel.
yum Source: because of the specific dependency relationship in the Linux system, each software package has its own dependency path, yum exists for solving the dependency relationship. YUM is an abbreviation of "Yellow dog update, Modified", and is a software Package Manager, and YUM automatically downloads and installs an RPM (Red-Hat Package Manager) Package from a specified place (RPM Package address of a related website or local RPM path), and can solve the dependency problem well.
RepoTrack: the Linux platform's package downloader, unlike the yum download command, can download a given software package and all of its dependencies.
CreateRepo: the software package packer of the Linux platform can pack the specified local software package into a portable yum software package.
In the application scenarios of some private cloud platforms of the CentOS system, because the target host of the private cloud generally has no right to access the internet, it is not necessary to install dependent software when installing the application. Even if the target host has the right to access the internet, various network failures may occur, which may lead to the installation of dependent software, thereby affecting the inheritance and experience of application deployment on the target host.
yum the source is the software package manager of the target host, which builds a server in the LAN with access to Internet to provide yum source services, downloads the RPM package from the relevant website or locally by calling yum the source, and installs the RPM package through yum source, the RPM is the software package depending on the software.
The manner is that the local source server is built to provide yum source services, so that not only an idle cloud host needs to be occupied, but also the local area network of the target host establishes connection with the internet through yum sources, and in the course of downloading the RPM packet from yum sources, a network attack from the internet may attack the target host through the connection. Additionally, the process of changing yum the source of operation to the local area network is inherently error prone.
In the above operating scenario, according to an embodiment of the present application, a method for installing software is provided.
Fig. 1 is a flowchart of a method of installing software according to an embodiment of the present application. As shown in fig. 1, the method comprises the steps of:
step S101, a package downloader is adopted to download target software and software packages which all depend on the software;
step S102, packaging the downloaded software package into a portable package through a software package packer;
and step S103, after the portable package is transplanted to a target host needing to install the target software, installing the target software and all the dependent software in the portable package on the target host.
Through the steps, a package downloader is adopted to download the target software and all software packages depending on the target software; the software packager is adopted to package the downloaded software package into a portable package, the portable package is transplanted to a target host computer needing to install target software, and then the target software in the portable package and all the dependent software are installed on the target host computer, so that the problem that in the related technology, an idle cloud host computer is adopted to build an yum source server, and hardware resources are wasted is solved. And the effects that target software and the dependence thereof are installed on the target host according to the portable package, the target software can be quickly installed in place, and hardware resource consumption is effectively saved are achieved.
It should be noted that the target software needs dependent software during installation, and the dependent software installation may depend on other dependent software to form a dependency relationship. For example, the installation of the target software 1 depends on the dependent software 2, the installation of the dependent software 2 depends on the installation of the dependent software 3 … … dependent on the dependent software n-1 depends on the dependent software n, the dependent software 2 may be a dependency on which the target software 1 directly depends, and the dependent software 3 to the dependent software n are sub-dependencies on which the target software 1 indirectly depends. The installation of the target software may depend on a plurality of dependent software, or the installation of the dependent software may depend on a plurality of other dependent software. For example, the installation of the target software 1 depends on the dependent software 20, the dependent software 21, and the dependent software 22 … … depend on the software 2n, wherein the installation of the dependent software 20 depends on the dependent software 30, the dependent software 31, and the dependent software 32 … … depends on the software 3 n.
The target software and the software package of all the target software depending on the target software are downloaded by adopting the package downloader. All the dependent software of the target software comprises the direct dependent dependency and the indirect dependent sub-dependency of the target software installation. In this embodiment, the software package includes the target software and all the dependencies required for installation of the target software. The target software and all the dependent software are downloaded to a local computer by adopting a package downloader, and the local computer can also be a local server, a local host and other devices.
As an alternative embodiment, the packet downloader may be a RepoTrack, which downloads the target software and a software packet of all dependent software of the target software by using the RepoTrack, and in the Linux platform, the RepoTrack is different from a general download instruction (download instruction) of yum, and the RepoTrack can download the specified target software and all dependent software of the target software.
The portable package may be a software package with portability, where the portability of software refers to the capability of software on one computer (server, host, etc.) to be transplanted onto another computer, and the software transplanting process refers to a process of installing software installed on an original computer onto another computer, and the original computer is not installed with the software. The software package downloader downloads the target software and all the dependent software to the local, such as a local computer, a local server or a local host, but the target software and all the dependent software need to be installed on the target host (computer, server, etc.), so the software package downloaded to the local needs to be transplanted to the target host.
In the process of migrating the software package to the target host, various manners can be adopted, such as direct migration, for example, packing the software package into a portable package and then migrating the corresponding portable package to the target host, and other manners that the software package can be migrated to the target host from the local. In this embodiment, the downloaded software package is packaged into a portable package by the software package packager, and the software package is transplanted to a target host computer to which the target software needs to be installed in the form of the portable package, so that the method has high reusability, and can also be quickly and effectively transplanted, thereby effectively simplifying the process of transplanting the software package and reducing the cost of transplanting the software package.
As an optional embodiment, the software package packer may be CreateRepo, and the software package may be packed by CreateRepo to generate a portable software package, that is, a portable package, and the portable package is transplanted onto a target host, and the target software and all the dependent software thereof are installed on the target host, compared with a method in which a server is built for a software package manager YUM, a host configuration is changed, and a software package of the target software and the dependent software thereof is automatically downloaded from a specified path or a website by YUM and installed in the related art, because a local YUM source server does not need to be built again, the method has an advantage of reducing hardware resource consumption, and solves a problem that hardware resources are wasted because an idle cloud host is used to build a YUM source server in the related art.
Compared with the mode that the target software and the dependent software thereof are downloaded from the internet through an yum source in the related technology, the method can effectively avoid the hidden danger of network attack and improve the installation safety of the target software.
Optionally, installing the target software and all dependent software in the portable package on the target host includes: generating a local source according to the portable package; and installing the target software and all the dependent software on the target host according to the local source.
Before the target software in the portable package and all the dependent software thereof are installed on the target host, the portable package is transplanted to the target host and installed on the target host. And generating a local source according to the portable package, and installing target software and all dependent software thereof on a target host according to the local source, wherein the local source can be a local yum source. And a local source is adopted to install the target software and all the target software depending on the target software, so that interference factors are few. Compared with the prior art in which a network source is adopted and dependent software of target software is installed, the method has the advantages of being not influenced by network speed, having no hidden danger of network attack and the like.
Optionally, before installing the target software and all dependent software in the portable package on the target host, the method further includes: backing up a system source of a target host to obtain a backup source; after the target software and all dependent software in the portable package are installed on the target host, the method further comprises the following steps: the local source is replaced with the backup source.
When the portable package is transplanted to the target host and the local source is generated according to the portable package, the target host itself has a system source, and the system source may include a local source or a network source and other sources, so as to implement corresponding functions. Before the target software of the portable package and its dependent software are installed on the target host, the target host needs to be ready for installation. For example, the system source on the target host may be deleted, but the original functionality and use of the target host may be affected.
In this embodiment, a manner that the system source of the backup host obtains the backup source is adopted, the local source is installed on the target host according to the portable package, and then the backup source is used to replace the local source after the target software and all dependent software in the portable package are installed on the host, so as to recover the system source of the target host without affecting the use and operation of the system source of the subsequent target host. The local sources can be deleted to reduce system memory.
Optionally, generating the local source from the portable package includes: and deploying the target software in the portable package and the software packages which all depend on the software to a preset position to obtain a local source.
The local source is generated according to the portable package, the original system source of the target host can be changed according to the installation requirement of the portable package by changing the system source on the target host, and the original system source of the target host is changed back to the original system source of the target host by the local source after the installation is finished.
The system source can also be deleted, and the local source can be directly determined according to the portable packet. The target software in the portable package and the software packages which all depend on the software can be deployed to a preset position to obtain a local source. For example, in Linux, yum sources (local sources) are all placed in/etc/yum.
Optionally, before downloading the target software and the software package of all dependent software by using the package downloader, the method further includes: acquiring a dependency tree of target software, wherein a root node of the dependency tree corresponds to the target software, other nodes except the root node correspond to the dependency software of the target software, and an adjacent pair of parent-child nodes represents parent-node dependency-child nodes; the downloading of the target software and the software package of all dependent software by using the package downloader comprises: downloading software packages corresponding to all nodes in a dependency tree of target software by adopting a package downloader; installing the target software and all dependent software in the portable package on the target host includes: and installing the target software and all the dependent software according to the dependency relationship in the dependency tree of the target software.
Because the dependent software on which the target software is installed may have multiple levels of dependent software, and the installation of the dependent software is also dependent step by step, before the target software and the dependent software are installed, a dependency tree, i.e., a dependency relationship, between the target software and all the dependent software thereof needs to be determined, in the dependency tree, a root node of the dependency tree corresponds to the target software, other nodes except the root node correspond to the dependent software of the target software, and an adjacent pair of parent-child nodes characterize parent-child nodes, where the parent-child nodes represent the dependency relationship between parent-child dependencies, for example, the installation of the parent dependent software depends on all the child dependent software, i.e., all the child dependent software are installed completely, and then the parent dependent software can be installed.
When the target software and all the dependent software thereof have the dependency relationship of the dependency tree, the software package of the target software and all the dependent software is downloaded by using the package downloader, the software package corresponding to all the nodes in the dependency tree of the target software can be downloaded by using the package downloader, the software package can be one software package which comprises the target software and all the dependent software thereof, and the number of the software packages can be multiple. The dependent software in the software package, or the target software and the dependent software, are previously ordered according to the dependency relationship. The above ordering may be determined according to an installation order, for example, in the present embodiment, the parent dependent software is installed based on the child dependent software, and thus the child dependent software is before the parent dependent software. The sorting may also be performed in other manners, such as downloading time of software, size of data block, and the like.
When the target software and all the dependent software thereof have the dependency relationship of the dependency tree, the target software and all the dependent software in the portable package are installed on the host, and the target software and all the dependent software can be installed according to the dependency relationship in the dependency tree of the target software. The child dependent software can be installed first, the parent dependent software is installed after the child dependent software required by the parent dependent software is installed, and the target software is installed based on the installed dependent software after all the dependent software is installed.
Optionally, each software package includes an installer and attribute information, the attribute information includes a version, and installing the target software and all dependent software on the host according to the local source includes: for each software package of a local source, the installation steps are as follows: judging whether the target host is provided with software in the software package; if the target host does not install the software in the software package, installing the software; under the condition that the target host is provided with the software in the software package, judging whether the current version of the software on the target host is lower than the version in the software package; the software is updated when the current version of the software is lower than the versions in the software package.
The attribute information may further include a size, a version, a data type, dependent software corresponding to the software package dependent on the software, verification information of whether the software package dependent on the software is required to be installed by the target host, and the like.
In the above case where the target software and all the dependent software are installed on the host, each software package depending on the software may be installed at the same time, a plurality of software packages depending on the software may be installed at the same time, or all the child dependent software of the same parent dependent software may be installed at the same time. The installation process of each software package of the dependent software between the same levels can be independent and does not interfere with each other, and the dependent software between different levels can be installed in a parent dependent software after the child dependent software is installed due to the existence of the dependency relationship.
In the case that the dependent software of the same layer is independent of each other, installing each software package of the local source may include: judging whether the target host is provided with software in the software package; if the software in the software package is not installed on the target host, installing the software; under the condition that the software in the software package is installed on the target host, judging whether the current version of the software on the target host is lower than the version in the software package; the software is updated when the current version of the software is lower than the versions in the software package. In the event that the current version of the software is not lower than the version in the software package, the installation of the software is terminated. The problems of software failure or incompatibility caused by repeated installation or replacement installation of the dependent software of a lower version for the dependent software of a higher version are avoided.
Optionally, before packaging the downloaded software package into the portable package by the software package packager, the method further comprises: deleting data irrelevant to the target software in all the software packages; packaging the downloaded software package into a portable package by a software package packager comprises: and packaging all the software packages after the irrelevant data is deleted into a portable package through a software package packager.
Various files or data of the target software and the dependent software can be contained in the downloaded target software and the software package of all the dependent software, and after the software package is downloaded, the data irrelevant to the installation of the target software and the dependent software in the software package can be deleted, so that the system load can be effectively reduced, the occupied memory can be reduced, and the operation efficiency can be improved. The above-mentioned management pipe data may include links in software packages, advertisement information, etc.
After the irrelevant data in the software package is deleted, the downloaded software package is packaged into a portable package through a software package packager. That is, the software package packer packs all the software packages with the irrelevant data deleted into the portable packages. The method can effectively reduce the data volume of the portable package, thereby improving the transplanting speed of the portable package, and the portable package can be more efficient in the process of installing the target software and the dependent software thereof.
It should be noted that this embodiment also provides a method relying on software installation, which is an optional implementation and is described in detail below.
As described in the background art, in the prior art, a server providing yum source services is built inside a local area network accessible by private cloud hosts, and then the configuration of hosts requiring yum source access is modified. However, the method for building the local source not only needs to occupy an idle cloud host, but also fundamentally does not cut off the connection problem between the local area network and the wide area network, and may have the hidden danger of network attack. Additionally, changing the yum source is also an operation that is highly error prone.
The implementation mode depends on all the dependencies of the RepoTrack package to flexibly manage the designated software package, the CreateRepo quick packaging function and the automatic system yum source substitution and recovery script, so that the software package depended by the application system can be quickly installed in place without influencing the subsequent yum source updating operation.
Fig. 2 is a flowchart of a software installation method provided in an embodiment of the present application, and as shown in fig. 2, the embodiment mainly includes the following steps:
acquiring a software package and a sub-dependency thereof (corresponding to an rpm package in a graph) which an application system (namely target software) depends on by using repoTrack; rejecting files of non-application systems in the downloaded dependency packages; packaging the downloaded dependencies (corresponding to rpm metadata in the graph) using createRepo, and generating yum source repo files; copying the generated software package to a target host (corresponding to a target server in a figure); the target host automatically backs up the target host's system yum source using the script; the target host automatically deploys the local software package to a specified position (such as usr/local/yum in the figure) by using the script, and calls a yuminstall command to complete the installation and upgrade of the dependent software package; the local source is removed and the previously backed up system yum source is restored.
The implementation method can effectively reduce hardware resource consumption (without building a local yum source server again), dependence of the application system can be flexibly managed, dependence is automatically installed, and deployment efficiency is improved.
According to the software installation method provided by the embodiment of the application, the target software and the software package which completely depends on the software are downloaded by adopting the package downloader; packaging the downloaded software package into a portable package through a software package packager; after the portable package is transplanted to a target host computer needing to install target software, the target software and all dependent software in the portable package are installed on the target host computer, and the problems that in the related technology, an idle cloud host computer is adopted to build an yum source server, network attack hidden dangers possibly exist, and errors easily occur are solved. And therefore, the effects that all the dependencies of the software packages are appointed by the package downloader, the software package packager has a quick packaging function, and the software packages depended by the application system can be quickly installed in place by combining the software package manager are achieved.
It should be noted that the steps illustrated in the flowcharts of the figures may be performed in a computer system such as a set of computer-executable instructions and that, although a logical order is illustrated in the flowcharts, in some cases, the steps illustrated or described may be performed in an order different than presented herein.
The embodiment of the present application further provides a software installation apparatus, and it should be noted that the software installation apparatus of the embodiment of the present application may be used to execute the software installation method provided in the embodiment of the present application. The following describes a software installation apparatus provided in an embodiment of the present application.
Fig. 3 is a schematic diagram of a software installation apparatus provided according to an embodiment of the present application. As shown in fig. 3, the apparatus includes: a download module 32, a packaging module 34, and an installation module 36, which are described in detail below.
A download module 32, configured to download the target software and the software package that depends on all the software by using a package downloader; a packaging module 34, configured to package the downloaded software package into a portable package through a software package packager; and the installation module 36 is used for installing the target software and all dependent software in the portable package on the target host after the portable package is transplanted to the target host needing to install the target software.
Optionally, the installation module 36 includes: the generating unit is used for generating a local source according to the portable package; the first installation unit is used for installing the target software and all the dependent software on the target host according to the local source.
Optionally, the apparatus further comprises: the backup module is used for backing up a system source of the target host to obtain a backup source; a replacement module to replace the local source with the backup source.
Optionally, the generating unit includes: and the deployment subunit is used for deploying the target software in the portable package and the software packages which all depend on the software to a preset position to obtain a local source.
Optionally, the apparatus further comprises: the acquisition module is used for acquiring a dependency tree of the target software, wherein a root node of the dependency tree corresponds to the target software, other nodes except the root node correspond to the dependency software of the target software, and an adjacent pair of parent and child nodes represent parent node dependency and child nodes; the download module 32 includes: the downloading unit is used for downloading the software packages corresponding to all the nodes in the dependency tree of the target software by adopting a package downloader; the installation module 36 includes: and the second installation unit is used for installing the target software and all the dependent software according to the dependency relationship in the dependency tree of the target software.
Optionally, each software package includes an installer and attribute information, the attribute information includes a version, and the first installation unit includes: for each software package of a local source, the installation steps are as follows: the first judgment subunit is used for judging whether the target host computer is provided with software in the software package; an installation subunit, configured to install the software in the software package if the target host does not install the software; the second judging subunit judges whether the current version of the software on the target host is lower than the version in the software package under the condition that the target host is provided with the software in the software package; and the updating subunit is used for updating the software when the current version of the software is lower than the version in the software package.
Optionally, the apparatus further comprises: the deleting module is used for deleting data irrelevant to the target software in all the software packages; packaging the downloaded software package into a portable package by a software package packager comprises: and packaging all the software packages after the irrelevant data is deleted into a portable package through a software package packager.
According to the software installation device provided by the embodiment of the application, the target software and the software package which depends on the target software are downloaded by the package downloader; the software packager is adopted to package the downloaded software package into a portable package, the portable package is transplanted to a target host computer needing to install target software, and then the target software in the portable package and all the dependent software are installed on the target host computer, so that the problem that in the related technology, an idle cloud host computer is adopted to build an yum source server, and hardware resources are wasted is solved. And the effects that target software and the dependence thereof are installed on the target host according to the portable package, the target software can be quickly installed in place, and hardware resource consumption is effectively saved are achieved.
The software installation device comprises a processor and a memory, wherein the download module 32, the packaging module 34, the installation module 36 and the like are stored in the memory as program units, and the processor executes the program units stored in the memory to realize corresponding functions.
The processor comprises a kernel, and the kernel calls the corresponding program unit from the memory. The kernel can be set to be one or more than one, all dependencies of the software package are specified according to the package downloader by adjusting kernel parameters, the software package packer can rapidly pack functions, and the software package manager is combined, so that the effect of rapidly installing the software package depended by the application system in place can be realized.
The memory may include volatile memory in a computer readable medium, Random Access Memory (RAM) and/or nonvolatile memory such as Read Only Memory (ROM) or flash memory (flash RAM), and the memory includes at least one memory chip.
An embodiment of the present invention provides a storage medium on which a program is stored, the program implementing an installation method of software when executed by a processor.
The embodiment of the invention provides a processor, which is used for running a program, wherein the installation method of software is executed when the program runs.
The embodiment of the invention provides equipment, which comprises a processor, a memory and a program which is stored on the memory and can run on the processor, wherein the processor executes the program and realizes the following steps: downloading target software and a software package which completely depends on the software by adopting a package downloader; packaging the downloaded software package into a portable package through a software package packager; after the portable package is transplanted to a target host needing to install the target software, the target software and all dependent software in the portable package are installed on the target host.
Optionally, installing the target software and all dependent software in the portable package on the target host includes: generating a local source according to the portable package; and installing the target software and all the dependent software on the target host according to the local source.
Optionally, before installing the target software and all dependent software in the portable package on the target host, the method further includes: backing up a system source of a target host to obtain a backup source; after the target software and all dependent software in the portable package are installed on the target host, the method further comprises the following steps: the local source is replaced with the backup source.
Optionally, generating the local source according to the portable package includes: and deploying the target software in the portable package and the software packages which all depend on the software to a preset position to obtain a local source.
Optionally, before the software package of the target software and all dependent software is downloaded by using the package downloader, the method further includes: acquiring a dependency tree of target software, wherein a root node of the dependency tree corresponds to the target software, other nodes except the root node correspond to the dependency software of the target software, and an adjacent pair of parent-child nodes represents parent-node dependency-child nodes; the downloading of the target software and the software package of all dependent software by using the package downloader comprises: downloading software packages corresponding to all nodes in a dependency tree of target software by adopting a package downloader; installing the target software and all dependent software in the portable package on the target host includes: and installing the target software and all the dependent software according to the dependency relationship in the dependency tree of the target software.
Optionally, each software package includes an installer and attribute information, the attribute information includes a version, and installing the target software and all dependent software on the target host according to the local source includes: for each software package of a local source, the installation steps are as follows: judging whether the target host is provided with software in the software package; in the case that the target host does not install the software in the software package, installing the software; under the condition that the target host is provided with the software in the software package, judging whether the current version of the software on the target host is lower than the version in the software package; the software is updated when the current version of the software is lower than the versions in the software package.
Optionally, before packaging the downloaded software package into the portable package by the software package packager, the method includes: deleting data irrelevant to the target software in all the software packages; packaging the downloaded software package into a portable package by a software package packager comprises: and packaging all the software packages after the irrelevant data is deleted into a portable package through a software package packager.
The device herein may be a server, a PC, a PAD, a mobile phone, etc.
The present application further provides a computer program product adapted to perform a program for initializing the following method steps when executed on a data processing device: downloading target software and a software package which completely depends on the software by adopting a package downloader; packaging the downloaded software package into a portable package through a software package packager; after the portable package is transplanted to a target host needing to install the target software, the target software and all dependent software in the portable package are installed on the target host.
Optionally, installing the target software and all dependent software in the portable package on the target host includes: generating a local source according to the portable package; and installing the target software and all the dependent software on the target host according to the local source.
Optionally, before installing the target software and all dependent software in the portable package on the target host, the method further includes: backing up a system source of a target host to obtain a backup source; after the target software and all dependent software in the portable package are installed on the target host, the method further comprises the following steps: the local source is replaced with the backup source.
Optionally, generating the local source according to the portable package includes: and deploying the target software in the portable package and the software packages which all depend on the software to a preset position to obtain a local source.
Optionally, before the software package of the target software and all dependent software is downloaded by using the package downloader, the method further includes: acquiring a dependency tree of target software, wherein a root node of the dependency tree corresponds to the target software, other nodes except the root node correspond to the dependency software of the target software, and an adjacent pair of parent-child nodes represents parent-node dependency-child nodes; the downloading of the target software and the software package of all dependent software by using the package downloader comprises: downloading software packages corresponding to all nodes in a dependency tree of target software by adopting a package downloader; installing the target software and all dependent software in the portable package on the target host includes: and installing the target software and all the dependent software according to the dependency relationship in the dependency tree of the target software.
Optionally, each software package includes an installer and attribute information, the attribute information includes a version, and installing the target software and all dependent software on the target host according to the local source includes: for each software package of a local source, the installation steps are as follows: judging whether the target host is provided with software in the software package; in the case that the target host does not install the software in the software package, installing the software; under the condition that the target host is provided with the software in the software package, judging whether the current version of the software on the target host is lower than the version in the software package; the software is updated when the current version of the software is lower than the versions in the software package.
Optionally, before packaging the downloaded software package into the portable package by the software package packager, the method includes: deleting data irrelevant to the target software in all the software packages; packaging the downloaded software package into a portable package by a software package packager comprises: and packaging all the software packages after the irrelevant data is deleted into a portable package through a software package packager.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). The memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in the process, method, article, or apparatus that comprises the element.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The above are merely examples of the present application and are not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (10)

1. A method of installing software, comprising:
downloading target software and a software package which completely depends on the software by adopting a package downloader;
packaging the downloaded software package into a portable package through a software package packager;
and after the portable package is transplanted to a target host needing to install the target software, installing the target software and all dependent software in the portable package on the target host.
2. The method of claim 1, wherein installing the target software and all dependent software in the portable package on the target host comprises:
generating a local source according to the portable package;
and installing target software and all dependent software on the target host according to the local source.
3. The method of claim 2, wherein installing the target software and all dependent software in the portable package on the target host further comprises:
backing up a system source of the target host to obtain a backup source;
after the target software and all dependent software in the portable package are installed on the target host, the method further comprises the following steps:
replacing the local source with the backup source.
4. The method of claim 2, wherein generating the local source from the portable package comprises:
and deploying the target software in the portable package and all software packages depending on the software to a preset position to obtain a local source.
5. The method of claim 1, further comprising, prior to downloading the target software and all software-dependent software packages using the package downloader:
acquiring a dependency tree of the target software, wherein a root node of the dependency tree corresponds to the target software, other nodes except the root node correspond to the dependency software of the target software, and an adjacent pair of parent and child nodes represent parent node dependency and child nodes;
the downloading of the target software and the software package of all dependent software by using the package downloader includes: downloading software packages corresponding to all nodes in the dependency tree of the target software by adopting a package downloader;
the installing the target software and all dependent software in the portable package on the target host comprises: and installing the target software and all the dependent software according to the dependency relationship in the dependency tree of the target software.
6. The method of claim 2, wherein each software package includes an installer and attribute information, wherein attribute information includes a version, and wherein installing target software and all dependent software on the target host in accordance with the local source comprises:
for each software package of a local source, the installation steps are as follows:
judging whether the target host is provided with software in the software package or not;
installing the software in the case that the target host does not install the software in the software package;
under the condition that the target host is provided with the software in the software package, judging whether the current version of the software on the target host is lower than the version in the software package;
updating the software when the current version of the software is lower than the version in the software package.
7. The method of any of claims 1-6, prior to packaging the downloaded software package into a portable package by a software package packager, comprising:
deleting data irrelevant to the target software in all software packages;
packaging the downloaded software package into a portable package by a software package packager comprises: and packaging all the software packages after the irrelevant data is deleted into a portable package through a software package packager.
8. An apparatus for installing software, comprising:
the download module is used for downloading the target software and the software package which depends on the software by adopting a package downloader;
the packaging module is used for packaging the downloaded software package into a portable package through a software package packager;
and the installation module is used for installing the target software and all dependent software in the portable package on the target host after the portable package is transplanted to the target host needing to install the target software.
9. A storage medium, characterized in that the storage medium comprises a stored program, wherein the program performs the method of any one of claims 1 to 8.
10. A processor, characterized in that the processor is configured to run a program, wherein the program when running performs the method of any of claims 1 to 8.
CN201811385607.0A 2018-11-20 2018-11-20 Software installation method and device Pending CN111198694A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811385607.0A CN111198694A (en) 2018-11-20 2018-11-20 Software installation method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811385607.0A CN111198694A (en) 2018-11-20 2018-11-20 Software installation method and device

Publications (1)

Publication Number Publication Date
CN111198694A true CN111198694A (en) 2020-05-26

Family

ID=70744504

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811385607.0A Pending CN111198694A (en) 2018-11-20 2018-11-20 Software installation method and device

Country Status (1)

Country Link
CN (1) CN111198694A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112104736A (en) * 2020-09-17 2020-12-18 广州汽车集团股份有限公司 OTA-based multi-ECU upgrading method
CN113486362A (en) * 2021-08-17 2021-10-08 平安普惠企业管理有限公司 Vulnerability repairing method and device for server and computer equipment

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101859251A (en) * 2009-04-09 2010-10-13 研祥智能科技股份有限公司 Method and device for installing embedded operating system
CN103559591A (en) * 2013-11-20 2014-02-05 北京可信华泰信息技术有限公司 Software management system and management method based on trusted computing
CN104731707A (en) * 2015-03-20 2015-06-24 浪潮集团有限公司 Transplanting method for iSCSI consistency testing software IscsiSim between platforms
US20150277886A1 (en) * 2014-03-31 2015-10-01 Red Hat Israel, Ltd. Configuring dependent services associated with a software package on a host system
CN105487891A (en) * 2015-11-26 2016-04-13 航天恒星科技有限公司 Distributed cluster deploying method and system
CN106406960A (en) * 2016-09-28 2017-02-15 郑州云海信息技术有限公司 Method for deploying software quickly in linux environment

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101859251A (en) * 2009-04-09 2010-10-13 研祥智能科技股份有限公司 Method and device for installing embedded operating system
CN103559591A (en) * 2013-11-20 2014-02-05 北京可信华泰信息技术有限公司 Software management system and management method based on trusted computing
US20150277886A1 (en) * 2014-03-31 2015-10-01 Red Hat Israel, Ltd. Configuring dependent services associated with a software package on a host system
CN104731707A (en) * 2015-03-20 2015-06-24 浪潮集团有限公司 Transplanting method for iSCSI consistency testing software IscsiSim between platforms
CN105487891A (en) * 2015-11-26 2016-04-13 航天恒星科技有限公司 Distributed cluster deploying method and system
CN106406960A (en) * 2016-09-28 2017-02-15 郑州云海信息技术有限公司 Method for deploying software quickly in linux environment

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112104736A (en) * 2020-09-17 2020-12-18 广州汽车集团股份有限公司 OTA-based multi-ECU upgrading method
CN113486362A (en) * 2021-08-17 2021-10-08 平安普惠企业管理有限公司 Vulnerability repairing method and device for server and computer equipment
CN113486362B (en) * 2021-08-17 2023-10-03 湖北溢丰数字科技股份有限公司 Vulnerability restoration method and device for server and computer equipment

Similar Documents

Publication Publication Date Title
US10216509B2 (en) Continuous and automatic application development and deployment
US9959108B2 (en) Fast deployment across cloud platforms
CN109597626B (en) Component deployment method and device
US10599423B2 (en) Source code management for a multi-tenant platform-as-a-service (PaaS) system
US9262238B2 (en) Connection management for an application in a computing platform
US9170797B2 (en) Automated deployment of an application in a computing platform
US9665356B2 (en) Configuration of an application in a computing platform
CN108255497B (en) Application deployment method and device
CN111492347A (en) System and method for updating containers
CN110727440B (en) Software packaging method
US9747091B1 (en) Isolated software installation
WO2017095382A1 (en) Application migration system
CN109857516B (en) Cluster migration method and device based on container
US11645086B2 (en) System and method for implementing a filesystem agent management solution
CN111831396A (en) Docker software and hardware integration-based delivery method and device
US8225316B1 (en) Methods and systems for creating and applying patches for virtualized applications
CN109558143B (en) Method and device for deploying applications in cluster
CN111198694A (en) Software installation method and device
CN107465709A (en) Distributed mirror image structure multitask method and device, system
US8806477B2 (en) Space efficient software package management
CN113918274A (en) Docker container-based KVM virtual machine migration method
CN112230930A (en) Method and device for constructing and packaging hybrid technology stack and machine-readable storage medium
US20220353341A1 (en) Efficient deployment of cloud resources
CN109660575B (en) Method and device for realizing NFV service deployment
US9798571B1 (en) System and method for optimizing provisioning time by dynamically customizing a shared virtual machine

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