CN109800028B - Web environment deployment method and device - Google Patents

Web environment deployment method and device Download PDF

Info

Publication number
CN109800028B
CN109800028B CN201811644020.7A CN201811644020A CN109800028B CN 109800028 B CN109800028 B CN 109800028B CN 201811644020 A CN201811644020 A CN 201811644020A CN 109800028 B CN109800028 B CN 109800028B
Authority
CN
China
Prior art keywords
component
installation
project
installation script
port number
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
CN201811644020.7A
Other languages
Chinese (zh)
Other versions
CN109800028A (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.)
Seashell Housing Beijing Technology Co Ltd
Original Assignee
Seashell Housing Beijing 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 Seashell Housing Beijing Technology Co Ltd filed Critical Seashell Housing Beijing Technology Co Ltd
Priority to CN201811644020.7A priority Critical patent/CN109800028B/en
Publication of CN109800028A publication Critical patent/CN109800028A/en
Application granted granted Critical
Publication of CN109800028B publication Critical patent/CN109800028B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Stored Programmes (AREA)

Abstract

The embodiment of the invention discloses a method and a device for deploying a Web environment. Wherein the method comprises the following steps: starting an automatic project installation file, wherein the automatic project installation file comprises a component installation script list and a project installation script list; wherein the project automatic installation file is generated in advance; traversing the component installation script list, and installing each component one by one; and configuring each item according to the item installation script list. The device is used for executing the method. The deployment method and device of the Web environment provided by the embodiment of the invention can realize automatic deployment of the Web environment and improve the deployment efficiency of the Web environment.

Description

Web environment deployment method and device
Technical Field
The embodiment of the invention relates to the technical field of computers, in particular to a method and a device for deploying a Web environment.
Background
The development flow of the Web application comprises project development and project test, a Web development environment is required to be constructed when the project development is carried out, the Web development environment is a series of software tools installed on development equipment for carrying out Web application program development, a Web test environment is required to be constructed when the project test is carried out, and the Web test environment is a series of software tools installed on test equipment for carrying out the Web application program test.
When a Web development environment or a Web test environment is constructed, different components are installed according to the actual needs of a project, for example, components such as PHP, IIS and MySQL are installed. The technical scheme of establishing a Web development environment or a Web test environment in the prior art is divided into two schemes, one scheme is manual installation, components required by projects are manually installed one by one, the projects are manually configured, a large amount of time is required, and the efficiency is low; one is automatic installation, which can support a limited number of component installations, typically 4, and only a default project configuration, which can be subsequently modified manually.
Therefore, how to provide a deployment method of a Web environment, which can automatically install required components of a project, so as to improve the deployment efficiency of the Web environment becomes an important issue to be solved in the industry.
Disclosure of Invention
Aiming at the defects in the prior art, the embodiment of the invention provides a method and a device for deploying a Web environment.
On one hand, an embodiment of the present invention provides a method for deploying a Web environment, including:
starting an automatic project installation file, wherein the automatic project installation file comprises a component installation script list and a project installation script list; wherein the project automatic installation file is generated in advance;
traversing the component installation script list, and installing each component one by one; and
and configuring each item according to the item installation script list.
On the other hand, an embodiment of the present invention provides a deployment apparatus for a Web environment, including:
the system comprises a starting unit, a storage unit and a processing unit, wherein the starting unit is used for starting an automatic project installation file, and the automatic project installation file comprises a component installation script list and a project installation script list; wherein the project automatic installation file is obtained in advance;
the installation unit is used for traversing the component installation script list and installing each component one by one; and
and the configuration unit is used for configuring each item according to the item installation script list.
In another aspect, an embodiment of the present invention provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the steps of the deployment method of the Web environment according to any one of the foregoing embodiments when executing the program.
In still another aspect, an embodiment of the present invention provides a non-transitory computer readable storage medium, on which a computer program is stored, and the computer program, when executed by a processor, implements the steps of the deployment method of the Web environment described in any of the above embodiments.
According to the deployment method and device for the Web environment, which are provided by the embodiment of the invention, the automatic project installation files which are obtained in advance and comprise the component installation script list and the project installation script list can be started, the component installation script list is traversed, the components are installed one by one, and each project is configured according to the project installation script list, so that the automatic deployment of the Web environment can be realized, and the deployment efficiency of the Web environment is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a schematic flowchart of a deployment method of a Web environment according to an embodiment of the present invention;
fig. 2 is a schematic flowchart of a deployment method of a Web environment according to another embodiment of the present invention;
fig. 3 is a flowchart illustrating a deployment method of a Web environment according to another embodiment of the present invention;
FIG. 4 is a flowchart illustrating a method for deploying a Web environment according to yet another embodiment of the present invention;
fig. 5 is a schematic flowchart of a deployment method of a Web environment according to a further embodiment of the present invention;
fig. 6 is a schematic structural diagram of a deployment apparatus of a Web environment according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of a deployment apparatus of a Web environment according to another embodiment of the present invention;
fig. 8 is a schematic structural diagram of a deployment apparatus of a Web environment according to another embodiment of the present invention;
fig. 9 is a schematic structural diagram of a deployment apparatus of a Web environment according to still another embodiment of the present invention;
fig. 10 is a schematic structural diagram of a deployment apparatus of a Web environment according to a further embodiment of the present invention;
fig. 11 is a schematic physical structure diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly described below with reference to the accompanying drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. 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 invention.
Fig. 1 is a schematic flowchart of a deployment method of a Web environment according to an embodiment of the present invention, and as shown in fig. 1, the deployment method of a Web environment according to the embodiment of the present invention includes:
s101, starting an automatic project installation file, wherein the automatic project installation file comprises a component installation script list and a project installation script list; wherein the project automatic installation file is generated in advance;
specifically, in the development process of the Web application, a corresponding Web environment needs to be deployed on the relevant device, for example, a Web development environment or a Web test environment is deployed. A deployment device (hereinafter referred to as a deployment device) of a Web environment may obtain a project automatic installation file for deploying the Web environment, and start the project automatic installation file, where the project automatic installation file includes a component installation script list and a project installation script list. Wherein the project automatic installation file is generated in advance.
S102, traversing the component installation script list, and installing each component one by one;
specifically, the component installation script list includes information of each component that needs to be installed, for example, a component name, and the deployment apparatus may obtain the component installation script of the component according to the information of the component, and then execute the component installation script to complete installation of the component. The deployment device traverses the whole component installation script list, and installs each component according to the component installation script of each component until the installation of each component is completed. The component installation script list comprises all components required by the project, and is not limited in quantity, so that automatic installation of all the components required by the project is realized, and the installation efficiency of the components of the project is improved.
S103, configuring each item according to the item installation script list.
Specifically, after all the components in the component installation script list are installed, the deployment apparatus may obtain a project installation script for each project according to project information of each project included in the project installation script list, and then execute each project installation script to configure each project. The project installation script list can automatically configure each project, and the project configuration efficiency is improved.
According to the deployment method of the Web environment, which is provided by the embodiment of the invention, the pre-obtained project automatic installation files comprising the component installation script list and the project installation script list can be started, the component installation script list is traversed, the components are installed one by one, and each project is configured according to the project installation script list, so that the deployment efficiency of the Web environment is improved.
Fig. 2 is a schematic flowchart of a deployment method of a Web environment according to another embodiment of the present invention, where as shown in fig. 2, the step S102 of traversing the component installation script list, and installing each component one by one includes:
s1021, acquiring a component installation script according to the component installation script list, wherein the component installation script comprises a component download address and a default port number; wherein the component installation script list comprises component installation scripts of the components;
specifically, each of the components has a corresponding component installation script, and the deployment apparatus may obtain the component installation script of each of the components from the component installation script list, for example, obtain the corresponding component installation script according to a component name included in the component installation script list, and then execute the component installation script, where the component installation script includes a component download address and a default port number. Wherein the component installation script list includes component installation scripts of the respective components.
S1022, downloading the component installation package according to the component downloading address;
specifically, after obtaining the component download address, the deployment device initiates downloading of the component installation package according to the component download address, and may download the component installation package.
S1023, if the default port number is judged to meet port configuration conditions, taking the default port number as a component port number of the component; otherwise, acquiring the port number meeting the port configuration condition as the component port number; wherein the port configuration condition is that a port number is not occupied;
specifically, each of the components needs to be configured with a free port number at the time of installation. The deployment device may detect whether the default port number is occupied after obtaining the default port number, and if the default port number is not occupied, the default port number satisfies a port configuration condition, and the default port number is used as a component port number of the component; if the default port number is occupied, a port number satisfying the port configuration condition, that is, a port number that is not occupied, is acquired as the component port number. S1022, downloading an assembly installation package and S1023 according to the assembly downloading address, and if the default port number is judged to meet port configuration conditions, taking the default port number as the assembly port number of the assembly; otherwise, acquiring a port number meeting the port configuration condition as the component port number; the port configuration condition is that the port number is not occupied, the two steps are independent, and there is no precedence relationship.
For example, under the Linux system, the lsof-i: and detecting whether the default port number is occupied or not.
S1024, decompressing the component installation package and installing the component; wherein the component port number is configured to the component during installation of the component;
specifically, the deployment device decompresses the component installation package after obtaining the component installation package, then performs installation of the component, and configures the component port number to the component during the installation process. The specific process of installing the component through the component installation package is prior art, and is not described herein any further.
And S1025, acquiring the component running script, and adding the component running script into the boot self-starting queue.
Specifically, after the component is installed, the deployment device may acquire a component running script from the component installation package, and then add the component running script to a boot self-starting queue, so as to quickly start the component.
Fig. 3 is a schematic flowchart of a deployment method of a Web environment according to another embodiment of the present invention, and as shown in fig. 3, the S1024 decompressing the component installation package, and installing the component includes:
s10241, inquiring whether the user modifies the component configuration file;
specifically, the deployment device asks the user whether to modify the component configuration file during the process of installing the component. For example, a dialog box may pop up, showing "do component configuration files modified? ", ask the user if a modification to the component profile is to be made, and provide options" Y "and" N "for the user to select. Each component installation package can comprise the component configuration file, the component configuration file comprises component configuration information, the component configuration information can be used in the use process of subsequent components, and a user can modify the content of the component configuration file according to the actual needs of the user or use a default component configuration file without modifying the component configuration file.
S10242, if receiving the information for confirming the modification, displaying the component configuration file for the user to modify.
Specifically, if the deployment apparatus receives information confirming the modification, for example, the user selects an option "Y" confirming the modification in a pop-up dialog box, the component configuration file is displayed on the screen, the user may modify the component configuration file, and after the user has modified the component configuration file, the deployment apparatus may save the component configuration file. It will be appreciated that if the deployment device receives information that is not modified, for example the user selects the option "N" that is not modified in a pop-up dialog, then the deployment device stores the default component configuration file.
On the basis of the foregoing embodiments, further, the acquiring a port number that satisfies the port configuration condition as the component port number includes:
and performing self-adding operation on the default port number until the port number obtained after the self-adding operation meets the port configuration condition.
Specifically, the deployment device may add 1 to the default port number after detecting that the default port number is occupied, then detect whether the port number of the default port number plus 1 is occupied, and if the port number of the default port number plus 1 is not occupied, take the port number of the default port number plus 1 as the component port number. Denying, continuing the self-adding operation until an unoccupied port number is obtained as the component port number.
On the basis of the foregoing embodiments, further, the step S102 of traversing the component installation script list, and installing each component one by one includes:
and acquiring each component installation script according to the component installation script list, and verifying whether the component corresponding to each component installation script is installed before installing each component.
Specifically, if the deployment device deploys the Web environment of another item before deploying the Web environment of the current item, some components are installed, and since components of different items can be shared, after the deployment device acquires each component installation script according to the component installation script list, it can check whether the component corresponding to each component installation script is installed before installing each component, and it can skip the installed component and does not need to repeat installation, so as to save time for installing components and improve deployment efficiency of the Web environment.
For example, under the Linux system, it may be queried with a related command whether the component has been installed, for example, for an rpm package installed component, it may be queried using the "rpm-qa component name" whether the component is installed. Wherein the component name is obtainable by the component installation script.
Fig. 4 is a flowchart of a deployment method of a Web environment according to yet another embodiment of the present invention, and as shown in fig. 4, on the basis of the foregoing embodiments, the step of S103 configuring each item according to the item installation script list includes:
s1031, acquiring a project installation script according to the project installation script list, wherein the project installation script comprises a copy address of a project configuration file; wherein the item installation script list comprises an item installation script for each of the items;
specifically, each of the projects has a corresponding project installation script, and after the deployment device completes installation of each component in the component installation script list, the deployment device obtains the project installation script of each of the projects from the project installation script list, and executes each of the project installation scripts one by one. Wherein the project installation script comprises a copy address of a project configuration file; the item installation script list includes an item installation script for each of the items.
S1032, inquiring whether the user copies the project configuration file;
specifically, the deployment device may query the user whether to copy the project configuration file when executing the project installation script. For example, a dialog box may pop up, showing "do or not duplicate project profiles? ", ask the user whether to copy the project profile, and provide options" Y "and" N "for the user to select.
And S1033, if the information for confirming the copying is received, copying the project configuration file according to the copying address of the project configuration file.
Specifically, if the deployment apparatus receives information confirming the copying, for example, the user selects an option "Y" confirming the copying in a pop-up dialog box, the deployment apparatus copies the project configuration file to a corresponding address according to the copy address of the project configuration file. It will be appreciated that if the deployment device receives no-copy information, such as the user selecting the no-copy option "N" in a pop-up dialog, the deployment device will not copy the project profile from the copy address of the project profile.
Fig. 5 is a schematic flowchart of a deployment method of a Web environment according to still another embodiment of the present invention, and as shown in fig. 5, on the basis of the foregoing embodiments, the step of generating the automatic installation file further includes:
s501, establishing the component installation script list in a component configuration center, wherein the component installation script list comprises component installation scripts of all the components;
specifically, in order to be able to generate the project automatic installation file quickly, a component configuration center may be established on the server, and the component configuration center stores an installation package, a component configuration file, a component installation script, and a component execution script of each of the components. In the component configuration center, the component configuration file, the component installation script and the component operation script of each component can be modified. According to the actual needs of the project, selecting required components in the component configuration center, establishing the component installation script list, wherein the component installation script list can comprise component installation scripts of all the components required by the project, and the component installation scripts of the components can be found through the component installation script list. Wherein the component installation script of the component includes a component download address and a default port number.
S502, establishing the project installation script list in a project configuration center, wherein the project installation script list comprises at least one project installation script of the project;
specifically, the project configuration center may modify a project configuration file, where the project configuration file is determined by the content of the project, and perform information configuration for the project, such as a login password of redis, a request address of a house source, and other information. An installation script for a project may be generated at the project configuration center, the project installation script including a copy address of the project configuration file. The project installation script list can be established in the project configuration center, the project installation script list includes at least one project installation script of the project, when a Web environment of a plurality of projects needs to be established at the same time, project configuration files of the plurality of projects can be established in the same project installation script list, and correspondingly, component installation scripts of components needed by the plurality of projects are included in the corresponding component installation script list. The configuration files of the projects are established in the same project installation script, so that the project automatic installation files are prevented from being generated for each project, and the Web environment deployment efficiency of the projects is improved.
S503, generating the automatic project installation file according to the component installation script list and the project installation script list.
Specifically, after obtaining the component installation script list and the project installation script list, the deployment apparatus may generate the project automatic installation file according to the component installation script list and the project installation script list, where the project automatic installation file is used to guide component installation and configure project information.
Fig. 6 is a schematic structural diagram of a deployment apparatus of a Web environment according to an embodiment of the present invention, and as shown in fig. 6, the deployment apparatus of a Web environment according to the embodiment of the present invention includes a starting unit 601, an installation unit 602, and a configuration unit 603, where:
the starting unit 601 is configured to start an item automatic installation file, where the item automatic installation file includes a component installation script list and an item installation script list; wherein the project automatic installation file is obtained in advance; the installation unit 602 is configured to traverse the component installation script list and install each component one by one; the configuration unit 603 is configured to configure each item according to the item installation script list.
Specifically, in the development process of the Web application, a corresponding Web environment needs to be deployed on the relevant device, for example, a Web development environment or a Web test environment is deployed. The starting unit 601 may acquire a project automatic installation file for deploying a Web environment, and start the project automatic installation file, the project automatic installation file including a component installation script list and a project installation script list. Wherein the project automatic installation file is generated in advance.
The component installation script list includes information of each component that needs to be installed, for example, a component name, and the installation unit 602 may obtain the component installation script of the component according to the information of the component, and then execute the component installation script to complete installation of the component. The installation unit 602 will traverse the whole component installation script list, and install each component according to the component installation script of each component until the installation of each component is completed. The component installation script list comprises all components required by the project, and is not limited in quantity, so that automatic installation of all the components required by the project is realized, and the installation efficiency of the components of the project is improved.
After all the components in the component installation script list are installed, the configuration unit 603 may obtain an item installation script for each item according to item information of each item included in the item installation script list, and then execute each item installation script to configure each item. The project installation script list can automatically configure each project, and the project configuration efficiency is improved.
According to the deployment device of the Web environment, which is provided by the embodiment of the invention, the pre-obtained project automatic installation files comprising the component installation script list and the project installation script list can be started, the component installation script list is traversed, the components are installed one by one, and each project is configured according to the project installation script list, so that the deployment efficiency of the Web environment is improved.
Fig. 7 is a schematic structural diagram of a deployment apparatus in a Web environment according to another embodiment of the present invention, and as shown in fig. 7, on the basis of the foregoing embodiments, the installation unit 602 further includes an acquisition sub-unit 6021, a download sub-unit 6022, a determination sub-unit 6023, an installation sub-unit 6024, and an addition sub-unit 6025, where:
the obtaining subunit 6021 is configured to obtain a component installation script according to the component installation script list, where the component installation script includes a component download address and a default port number; wherein the component installation script list comprises component installation scripts of the components; the download subunit 6022 is configured to download the component installation package according to the component download address; the determining subunit 6023 is configured to, after it is determined that the default port number meets the port configuration condition, take the default port number as the component port number of the component; otherwise, acquiring the port number meeting the port configuration condition as the component port number; wherein the port configuration condition is that a port number is not occupied; a mounting subunit 6024 for decompressing the component mounting package and mounting the component; wherein the component port number is configured to the component during installation of the component; the adding subunit 6025 is configured to obtain the component running script, and add the component running script to the power-on self-starting queue.
Specifically, each of the components has a corresponding component installation script, the fetching subunit 6021 may obtain the component installation script of each of the components from the component installation script list, for example, obtain the corresponding component installation script according to the component name included in the component installation script list, and then execute the component installation script, where the component installation script includes a component download address and a default port number. Wherein the component installation script list includes component installation scripts of the components.
After obtaining the component download address, the download subunit 6022 initiates downloading of the component installation package according to the component download address, and may download and obtain the component installation package.
Each of the components needs to be configured with a free port number at installation. Determining that subunit 6023 may detect whether the default port number is occupied after obtaining the default port number, and if the default port number is not occupied, the default port number satisfies a port configuration condition, and the default port number is used as a component port number of the component; if the default port number is occupied, a port number satisfying the port configuration condition, that is, a port number that is not occupied, is acquired as the component port number.
After obtaining the component installation package, the installation sub-unit 6024 decompresses the component installation package, then performs installation of the component, and configures the component port number to the component during installation. The specific process of installing the component through the component installation package is prior art, and is not described herein any further.
After the component is installed, the adding subunit 6025 may acquire the component running script from the component installation package, and then add the component running script to the power-on self-starting queue to quickly start the component.
Fig. 8 is a schematic structural diagram of a deployment apparatus of a Web environment according to yet another embodiment of the present invention, and as shown in fig. 8, on the basis of the foregoing embodiments, further, the installation subunit 6024 includes an inquiry module 60241 and a display module 60242, where:
the query module 60241 is used to query the user whether to modify the component configuration file; the display module 60242 is configured to display the component configuration file for modification by the user after receiving information confirming the modification.
Specifically, during installation of the component, the query module 60241 queries the user whether to make a modification to the component configuration file. For example, a dialog box may pop up, showing "do component configuration files modified? ", ask the user if a modification of the component profile is to be made, and provide options" Y "and" N "for the user to select. Each component installation package can comprise the component configuration file, the component configuration file comprises component configuration information, the component configuration information can be used in the use process of subsequent components, and a user can modify the content of the component configuration file according to the actual needs of the user or use a default component configuration file without modifying the component configuration file.
The display module 60242 displays the component profile on the screen if information confirming the modification is received, for example, the user selects an option "Y" confirming the modification in a pop-up dialog box, the user may modify the component profile, and the display module 60242 may save the component profile after the user has modified the component profile. It will be appreciated that if no-modification information is received, for example the user selects the no-modification option "N" in a pop-up dialog, then the default component profile is stored.
On the basis of the foregoing embodiments, the judgment subunit 6023 is specifically configured to:
and performing self-adding operation on the default port number until the port number obtained after the self-adding operation meets the port configuration condition.
Specifically, determining subunit 6023 may add 1 to the default port number after detecting that the default port number is occupied, then detect whether the port number of the default port number plus 1 is occupied, and if the port number of the default port number plus 1 is not occupied, take the port number of the default port number plus 1 as the component port number. Denying, continuing the self-adding operation until an unoccupied port number is obtained as the component port number.
On the basis of the foregoing embodiments, further, the mounting unit 602 is specifically configured to:
and acquiring each component installation script according to the component installation script list, and verifying whether the component corresponding to each component installation script is installed before installing each component.
Specifically, if the Web environment of another project is deployed before the Web environment of the current project is deployed, some components may be installed, and since components of different projects may be shared, after obtaining each component installation script according to the component installation script list, the installation unit 602 may check whether the component corresponding to each component installation script is already installed before installing each component, and may skip the already installed component without repeating installation, so as to save the time for installing the component and improve the deployment efficiency of the Web environment.
Fig. 9 is a schematic structural diagram of a deployment apparatus in a Web environment according to yet another embodiment of the present invention, and based on the foregoing embodiments, the configuration unit 603 further includes an obtaining subunit 6031, an inquiring subunit 6032, and a replication subunit 6033, where:
an obtaining subunit 6031 is configured to obtain, according to the item installation script list, an item installation script that includes a copy address of the item configuration file; wherein the item installation script list comprises an item installation script for each of the items; an inquiry subunit 6032 is used to inquire whether the user copies the item profile; the copy sub-unit 6033 is configured to copy the project configuration file according to the copy address of the project configuration file after receiving the information confirming the copy.
Specifically, each of the items has a corresponding item installation script, and after the installation of each of the components in the component installation script list is completed, the obtaining sub-unit 6031 obtains the item installation script of each of the items from the item installation script list, and executes each of the item installation scripts one by one. Wherein the project installation script comprises a copy address of a project configuration file; the item installation script list includes an item installation script for each of the items.
While executing the item installation script, the query subunit 6032 may query the user whether to copy the item configuration file. For example, a dialog box may pop up, showing "do or not duplicate project profiles? ", ask the user whether to copy the project profile, and provide options" Y "and" N "for the user to select.
The copy sub unit 6033, if receiving information confirming the copy, for example, the user selects an option "Y" confirming the copy in a dialog box that pops up, the copy sub unit 6033 copies the project profile to a corresponding address according to the copy address of the project profile. It is understood that the replication sub-unit 6033 does not replicate the project profile from its replication address if it receives information not to replicate, e.g., the user selects option "N" not to replicate in the pop-up dialog.
Fig. 10 is a schematic structural diagram of a deployment apparatus of a Web environment according to still another embodiment of the present invention, as shown in fig. 10, on the basis of the foregoing embodiments, further, the deployment apparatus of a Web environment according to the embodiment of the present invention further includes a first establishing unit 604, a second establishing unit 605, and a generating unit 606, where:
the first establishing unit 604 is configured to establish the component installation script list in the component configuration center, where the component installation script list includes component installation scripts of each of the components; the second establishing unit 605 is configured to establish the project installation script list in a project configuration center, where the project installation script list includes at least one project installation script of the project; the generating unit 606 is configured to generate the automatic project installation file according to the component installation script list and the project installation script list.
Specifically, in order to be able to generate the project automatic installation file quickly, a component configuration center may be established on the server, and the component configuration center stores an installation package, a component configuration file, a component installation script, and a component execution script of each of the components. In the component configuration center, the component configuration file, the component installation script and the component operation script of each component can be modified. According to the actual need of the project, a needed component is selected in the component configuration center, the first establishing unit 604 establishes the component installation script list, the component installation script list may include component installation scripts of each component needed by the project, and the component installation scripts of the component may be found through the component installation script list. Wherein the component installation script of the component includes a component download address and a default port number.
The project configuration center can modify project configuration files determined by the contents of the projects, and perform information configuration for the projects, such as information of login passwords of redis, request addresses of house sources, and the like. An installation script for a project may be generated at the project configuration center, the project installation script including a duplicate address of the project configuration file. The second establishing unit 605 may establish the project installation script list in the project configuration center, where the project installation script list includes at least one project installation script of the project, and when a Web environment of a plurality of the projects needs to be established simultaneously, the second establishing unit 605 may establish project configuration files of the plurality of the projects in the same project installation script list, and accordingly, the corresponding component installation script list includes component installation scripts of components needed by the projects. The configuration files of the projects are established in the same project installation script, so that the project automatic installation files are prevented from being generated for each project, and the Web environment deployment efficiency of the projects is improved.
After obtaining the component installation script list and the item installation script list, the generating unit 606 may generate the item automatic installation file according to the component installation script list and the item installation script list, where the item automatic installation file is used to guide component installation and configure item information.
Fig. 11 is a schematic physical structure diagram of an electronic device according to an embodiment of the present invention, and as shown in fig. 11, the electronic device may include: a processor (processor)1101, a communication Interface (Communications Interface)1102, a memory (memory)1103 and a communication bus 1104, wherein the processor 1101, the communication Interface 1102 and the memory 1103 are communicated with each other via the communication bus 1104. The processor 1101 may call logic instructions in the memory 1103 to perform the following method: starting an automatic project installation file, wherein the automatic project installation file comprises a component installation script list and a project installation script list; wherein the project automatic installation file is generated in advance; traversing the component installation script list, and installing each component one by one; and configuring each item according to the item installation script list.
In addition, the logic instructions in the memory 1103 can be implemented in the form of software functional units and stored in a computer readable storage medium when the logic instructions are sold or used as independent products. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The present embodiment discloses a computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions which, when executed by a computer, enable the computer to perform the method provided by the above-mentioned method embodiments, for example, comprising: starting an automatic project installation file, wherein the automatic project installation file comprises a component installation script list and a project installation script list; wherein the project automatic installation file is generated in advance; traversing the component installation script list, and installing each component one by one; and configuring each item according to the item installation script list.
The present embodiments provide a non-transitory computer-readable storage medium storing a computer program that causes a computer to perform the methods provided by the above-described method embodiments, for example, including: starting an automatic project installation file, wherein the automatic project installation file comprises a component installation script list and a project installation script list; wherein the project automatic installation file is generated in advance; traversing the component installation script list, and installing each component one by one; and configuring each item according to the item installation script list.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (9)

1. A deployment method of a Web environment, comprising:
acquiring a project automatic installation file for deploying a Web environment, wherein the project automatic installation file comprises a component installation script list and a project installation script list;
traversing the component installation script list, and installing each component one by one; and
configuring components required by each project according to the project installation script list;
traversing the component installation script list, and installing each component one by one comprises:
acquiring a component installation script according to the component installation script list, wherein the component installation script comprises a component download address and a default port number; wherein the component installation script list comprises component installation scripts of the components;
downloading the component installation package according to the component downloading address;
if the default port number is judged and known to meet port configuration conditions, taking the default port number as a component port number of the component; otherwise, acquiring the port number meeting the port configuration condition as the component port number; wherein the port configuration condition is that a port number is not occupied;
decompressing the component installation package and installing the component; wherein the component port number is configured to the component during installation of the component;
and acquiring a component running script, and adding the component running script into a starting self-starting queue.
2. The method of claim 1, wherein the decompressing the component installation package and installing the component comprises:
inquiring whether the user modifies the component configuration file;
and if the information for confirming the modification is received, displaying the component configuration file for the user to modify.
3. The method according to claim 1, wherein the obtaining a port number satisfying the port configuration condition as the component port number comprises:
and performing self-adding operation on the default port number until the port number obtained after the self-adding operation meets the port configuration condition.
4. The method of claim 1, wherein traversing the component installation script list and installing each component one by one comprises:
and acquiring each component installation script according to the component installation script list, and verifying whether the component corresponding to each component installation script is installed before installing each component.
5. The method of claim 1, wherein configuring components required for each project according to the project installation script list comprises:
acquiring a project installation script according to the project installation script list, wherein the project installation script comprises a copy address of a project configuration file; wherein the item installation script list comprises an item installation script for each of the items;
querying a user whether to copy the project profile;
and if the information for confirming the copying is received, copying the project configuration file according to the copying address of the project configuration file.
6. The method according to any one of claims 1 to 5, wherein the step of generating the automatic installation file comprises:
establishing the component installation script list in a component configuration center, wherein the component installation script list comprises component installation scripts of all the components;
establishing the project installation script list in a project configuration center, wherein the project installation script list comprises at least one project installation script of the project;
and generating the automatic project installation file according to the component installation script list and the project installation script list.
7. A deployment apparatus for a Web environment, comprising:
the system comprises a starting unit, a setting unit and a processing unit, wherein the starting unit is used for acquiring a project automatic installation file for deploying a Web environment, and the project automatic installation file comprises an assembly installation script list and a project installation script list;
the installation unit is used for traversing the component installation script list and installing each component one by one; and
the configuration unit is used for configuring components required by each project according to the project installation script list;
the installation unit is specifically configured to obtain a component installation script according to the component installation script list, where the component installation script includes a component download address and a default port number; wherein the component installation script list comprises component installation scripts of the components;
the downloading subunit is used for downloading the component installation package according to the component downloading address;
a judging subunit, configured to, after it is judged and obtained that the default port number satisfies a port configuration condition, take the default port number as a component port number of the component; otherwise, acquiring the port number meeting the port configuration condition as the component port number; wherein the port configuration condition is that a port number is not occupied;
the installation subunit is used for decompressing the component installation package and installing the component; wherein the component port number is configured to the component during installation of the component;
and the adding subunit is used for acquiring the component running script and adding the component running script into the starting self-starting queue.
8. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the steps of the deployment method of a Web environment according to any one of claims 1 to 6 when executing said program.
9. A non-transitory computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method for deploying a Web environment according to any of claims 1 to 6.
CN201811644020.7A 2018-12-30 2018-12-30 Web environment deployment method and device Active CN109800028B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811644020.7A CN109800028B (en) 2018-12-30 2018-12-30 Web environment deployment method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811644020.7A CN109800028B (en) 2018-12-30 2018-12-30 Web environment deployment method and device

Publications (2)

Publication Number Publication Date
CN109800028A CN109800028A (en) 2019-05-24
CN109800028B true CN109800028B (en) 2022-08-16

Family

ID=66558345

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811644020.7A Active CN109800028B (en) 2018-12-30 2018-12-30 Web environment deployment method and device

Country Status (1)

Country Link
CN (1) CN109800028B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110531962B (en) * 2019-08-06 2023-11-17 上海连尚网络科技有限公司 Development processing method and device for applet and computer readable storage medium
CN110825429A (en) * 2019-11-13 2020-02-21 中孚安全技术有限公司 Web project packaging method and system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101763275A (en) * 2009-12-31 2010-06-30 华为终端有限公司 Automatic operation method and device, and mobile device
CN101788917A (en) * 2010-02-26 2010-07-28 浪潮(北京)电子信息产业有限公司 Deployment method of utility software and the system thereof
CN102436501A (en) * 2011-12-02 2012-05-02 曙光信息产业(北京)有限公司 Parallel file managing system based on web

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050289539A1 (en) * 2004-06-29 2005-12-29 Sudhir Krishna S Central installation, deployment, and configuration of remote systems
CN102637130A (en) * 2012-03-15 2012-08-15 北京神州数码思特奇信息技术股份有限公司 Method and device for building web projects
CN106610853A (en) * 2015-10-26 2017-05-03 阿里巴巴集团控股有限公司 Application deployment method and device
CN108334370B (en) * 2017-05-26 2021-02-09 中国电子科技集团公司第四十一研究所 Software automatic incremental updating and upgrading method of distributed test system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101763275A (en) * 2009-12-31 2010-06-30 华为终端有限公司 Automatic operation method and device, and mobile device
CN101788917A (en) * 2010-02-26 2010-07-28 浪潮(北京)电子信息产业有限公司 Deployment method of utility software and the system thereof
CN102436501A (en) * 2011-12-02 2012-05-02 曙光信息产业(北京)有限公司 Parallel file managing system based on web

Also Published As

Publication number Publication date
CN109800028A (en) 2019-05-24

Similar Documents

Publication Publication Date Title
US20210055952A1 (en) Methods and apparatus to manage monitoring agents
US10678585B2 (en) Methods and apparatus to automatically configure monitoring of a virtual machine
US10348861B2 (en) Software upgrade method and terminal
CN106533753B (en) Role configuration method and device of distributed system
US9665357B2 (en) Method and apparatus for synchronizing application configuration data over a network
US20150271014A1 (en) Automatic configuration of new components by infrastructure management software
US9519654B2 (en) Method, device, processing center and system for desktop synchronization
EP2786279B1 (en) Deployment of a driver or an application on a client device having a write-filter
US8606892B2 (en) Deployment and updating of applications and drivers on a client device using an extensible markup language (XML) configuration file
WO2017071494A1 (en) Application deployment method and apparatus
WO2017041613A1 (en) Mirror image deployment method and apparatus
US9854034B2 (en) Workload deployment density management for a multi-stage computing architecture implemented within a multi-tenant computing environment
WO2013081681A1 (en) Creation or installation of a disk image for a target device having one of a plurality of hardware platforms
CN113645071B (en) Cluster deployment method, system, medium and electronic terminal
CN106878334A (en) The automatically dispose system and method for cloud
US9009359B2 (en) Emulating multiple universal serial bus (USB) keys so as to efficiently configure different types of hardware
WO2013081679A1 (en) Automatic updating of an application or a driver on a client device using a deployment configuration file
CN108235763B (en) Detection system, method and related device
CN109800028B (en) Web environment deployment method and device
WO2019051937A1 (en) Method, apparatus and device for automatically configuring test machine, and storage medium
CN106897162B (en) Communication mode selection method of component in application, communication system and mobile terminal
US9122687B2 (en) Crash recovery for attended operating system installations
WO2017107380A1 (en) Method of downloading and installing application and terminal apparatus
WO2019222941A1 (en) Method for evaluating application deployment, apparatus, computer program product, and readable medium
CN111752576A (en) Forwarding system deployment method based on 5G data, terminal 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
TA01 Transfer of patent application right

Effective date of registration: 20191104

Address after: 100085 Floor 102-1, Building No. 35, West Second Banner Road, Haidian District, Beijing

Applicant after: Seashell Housing (Beijing) Technology Co.,Ltd.

Address before: 300 457 days Unit 5, Room 1, 112, Room 1, Office Building C, Nangang Industrial Zone, Binhai New Area Economic and Technological Development Zone, Tianjin

Applicant before: BEIKE TECHNOLOGY Co.,Ltd.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant