Movatterモバイル変換


[0]ホーム

URL:


CN108920157A - Installation method, device, computer equipment and the storage medium of Nginx software - Google Patents

Installation method, device, computer equipment and the storage medium of Nginx software
Download PDF

Info

Publication number
CN108920157A
CN108920157ACN201810607070.1ACN201810607070ACN108920157ACN 108920157 ACN108920157 ACN 108920157ACN 201810607070 ACN201810607070 ACN 201810607070ACN 108920157 ACN108920157 ACN 108920157A
Authority
CN
China
Prior art keywords
nginx
installation
software
server
catalogue
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.)
Granted
Application number
CN201810607070.1A
Other languages
Chinese (zh)
Other versions
CN108920157B (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.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen 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 Ping An Technology Shenzhen Co LtdfiledCriticalPing An Technology Shenzhen Co Ltd
Priority to CN201810607070.1ApriorityCriticalpatent/CN108920157B/en
Priority to PCT/CN2018/109311prioritypatent/WO2019237583A1/en
Publication of CN108920157ApublicationCriticalpatent/CN108920157A/en
Application grantedgrantedCritical
Publication of CN108920157BpublicationCriticalpatent/CN108920157B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Classifications

Landscapes

Abstract

The embodiment of the present application discloses installation method, device, computer equipment and the storage medium of Nginx software.This method generates installation directory after receiving mount request, according to the application server identifier in mount request;Configure the listening port number of Nginx software, the listening port difference of the listening port number of the Nginx software and all Nginx softwares in Nginx server;Obtain Nginx software prestores installation kit template, and prestores the configuration file in installation kit template according to installation directory and listening port number update to form installation kit;The catalogue of the static class file of Nginx server Plays Nginx software is obtained, and the soft link instruction of catalogue is generated according to the catalogue of the static class file of standard Nginx software;Installation script is generated according to installation directory and the soft link instruction of catalogue, and sends installation script and installation kit to Nginx server, so that Nginx server completes installation Nginx software.This method may be implemented to install multiple Nginx softwares in Nginx server, improve the resource utilization of Nginx server.

Description

Installation method, device, computer equipment and the storage medium of Nginx software
Technical field
This application involves field of computer technology more particularly to a kind of installation method, device, the computers of Nginx softwareEquipment and storage medium.
Background technique
Nginx is the Reverse Proxy for supporting high concurrent amount and superior performance, and high performance performance is wideIn the general large server applied under Internet Server field, especially Linux system environment.Currently, being serviced in linuxIt, can be by the particular category of Nginx software installation to operating system, such as by Nginx software when Nginx software is installed on deviceConfiguration file is placed in catalogue/etc, other software installation files are placed on/var ,/opt or/usr/local in.This peaceAs soon as dress mode causes a linux server that can only install Nginx software, also clothes can only be provided to an application serverBusiness, this results in the waste of linux server resource, and the utilization rate of linux server is lower.
Summary of the invention
This application provides installation method, device, computer equipment and the storage medium of a kind of Nginx software, withMultiple Nginx softwares are installed in Nginx server, improve the resource utilization of Nginx server.
In a first aspect, this application provides a kind of installation methods of Nginx software comprising:
Receive the mount request of installation Nginx software, wherein the mount request includes application server identifier;
Installation directory is generated according to default create-rule according to the application server identifier;
Configure the listening port number of the Nginx software, wherein the listening port number and Nginx of the Nginx software takeThe listening port difference for all Nginx softwares being engaged in device;
Obtain the Nginx software prestores installation kit template, wherein the installation kit template that prestores includes dynamic class textPart and static class file, the dynamic class file includes configuration file;
The configuration file in installation kit template is prestored according to the installation directory and listening port number update to be formedInstallation kit;
The catalogue of the static class file of the Nginx server Plays Nginx software prestored is obtained, and according to describedThe catalogue of the static class file of standard Nginx software generates the soft link instruction of catalogue;
Generate installation script according to the installation directory and the soft link instruction of catalogue, and send the installation script andInstallation kit is to the Nginx server, so that the Nginx server executes the installation script to create the installation meshRecord, and according to the installation kit by the Nginx software installation in the installation directory, and by executing the soft chain of catalogueConnect instruction by by the catalogue of the static class file in the Nginx software by soft link in a manner of link to the standardThe catalogue of the static class file of Nginx software.
Second aspect, this application provides a kind of mounting devices of Nginx software comprising:
Request reception unit, for receiving the mount request of installation Nginx software, wherein the mount request includes answeringUse server identification;
Catalogue generation unit, for generating installation directory according to default create-rule according to the application server identifier;
Port configuration unit, for configuring the listening port number of the Nginx software, wherein the prison of the Nginx softwareListen the listening port difference of all Nginx softwares in port numbers and Nginx server;
Template acquiring unit prestores installation kit template for obtain the Nginx software, wherein described to prestore installationPacket template includes dynamic class file and static class file, and the dynamic class file includes configuration file;
File updating unit, for being prestored in installation kit template according to the installation directory and listening port number updateConfiguration file to form installation kit;
Instruction generation unit, for obtaining the static class file of the Nginx server Plays Nginx software prestoredCatalogue, and according to the catalogue of the static class file of the standard Nginx software generate the soft link instruction of catalogue;
Transmission unit for generating installation script according to the installation directory and the soft link instruction of catalogue, and sends instituteInstallation script and installation kit are stated to the Nginx server so that the Nginx server execute the installation script withCreate the installation directory, and according to the installation kit by the Nginx software installation in the installation directory, and by holdingThe row soft link instruction of catalogue by by the catalogue of the static class file in the Nginx software by soft link in a manner of linkTo the catalogue of the static class file of the standard Nginx software.
The third aspect, the application provide a kind of computer equipment again, including memory, processor and are stored in described depositOn reservoir and the computer program that can run on the processor, the processor realizes the when executing the computer programOn the one hand the installation method of the Nginx software provided.
Fourth aspect, present invention also provides a kind of storage mediums, wherein the storage medium is stored with computer program,The computer program includes program instruction, and described program instruction makes the processor execute first party when being executed by a processorThe installation method for the Nginx software that face provides.
The application provides installation method, device, computer equipment and the storage medium of a kind of Nginx software.The installation sideMethod may be implemented to install multiple Nginx softwares in Nginx server, improve the resource utilization of Nginx server.MeanwhileThe configuration file of different Nginx software can be arranged in the installation method according to different application servers, establish Nginx softwareCorresponding relationship between application server, so that in Nginx server while Nginx software instances, also convenient pairMultiple Nginx softwares in Nginx server are managed.In addition, since the catalogue of the static class file of Nginx software passes throughThe mode of soft link links to the catalogue of the static class file of standard Nginx software, and static class file can be installed to avoid repetition,Save the set-up time.
Detailed description of the invention
Technical solution in ord to more clearly illustrate embodiments of the present application, below will be to needed in embodiment descriptionAttached drawing is briefly described, it should be apparent that, the accompanying drawings in the following description is some embodiments of the present application, general for this fieldFor logical technical staff, without creative efforts, it is also possible to obtain other drawings based on these drawings.
Fig. 1 is a kind of schematic flow diagram of the installation method of Nginx software provided by the embodiments of the present application;
Fig. 2 is the schematic diagram of a scenario of the installation method of Nginx software in the embodiment of the present application;
Fig. 3 is a kind of specific schematic flow diagram of the installation method of Nginx software provided by the embodiments of the present application;
Fig. 4 is a kind of another specific schematic flow diagram of the installation method of Nginx software provided by the embodiments of the present application;
Fig. 5 is a kind of schematic block diagram of the mounting device of Nginx software provided by the embodiments of the present application;
Fig. 6 is a kind of specific schematic block diagram of the mounting device of Nginx software provided by the embodiments of the present application;
Fig. 7 is a kind of another specific schematic block diagram of the mounting device of Nginx software provided by the embodiments of the present application;
Fig. 8 is a kind of schematic block diagram of computer equipment provided by the embodiments of the present application.
Specific embodiment
Below in conjunction with the attached drawing in the embodiment of the present application, technical solutions in the embodiments of the present application carries out clear, completeSite preparation description, it is clear that described embodiment is some embodiments of the present application, instead of all the embodiments.Based on this ShenPlease in embodiment, every other implementation obtained by those of ordinary skill in the art without making creative effortsExample, shall fall in the protection scope of this application.
It should be appreciated that ought use in this specification and in the appended claims, term " includes " and "comprising" instructionDescribed feature, entirety, step, operation, the presence of element and/or component, but one or more of the other feature, whole is not precludedBody, step, operation, the presence or addition of element, component and/or its set.
It is also understood that mesh of the term used in this present specification merely for the sake of description specific embodimentAnd be not intended to limit the application.As present specification and it is used in the attached claims, unless onOther situations are hereafter clearly indicated, otherwise " one " of singular, "one" and "the" are intended to include plural form.
It will be further appreciated that the term "and/or" used in present specification and the appended claims isRefer to any combination and all possible combinations of one or more of associated item listed, and including these combinations.
Fig. 1 and Fig. 2 are please referred to, Fig. 1 is a kind of signal stream of the installation method of Nginx software provided by the embodiments of the present applicationCheng Tu, Fig. 2 are the schematic diagram of a scenario of the installation method of Nginx software in the embodiment of the present application.The installation method of the Nginx softwareApplied in management server 10.The management server 10 generates installation script and installation according to the installation method of Nginx softwarePacket, and installation script and installation kit are sent into Nginx server 20, so that Nginx server 20 is according to the installation footThis and installation kit complete installation Nginx software.
Wherein, the Nginx server 20 is is equipped with Nginx software to provide the server of service to application server,For example, which can be Web server.In addition, the operating system in the Nginx server 20 can beLinux system.
It should be noted that only illustrating a Nginx server 20, in practical applications, the management service in Fig. 2Device 10 can also manage more Nginx servers 20, and management server 10 can be according to the installation of the Nginx software in the applicationMethod installs multiple Nginx softwares in every Nginx server 20.
This is as shown in Figure 1, the installation method of the Nginx software includes step S101~S107.
S101, the mount request for receiving installation Nginx software, wherein the mount request includes application server identifier.
In the present embodiment, when installation personnel needs to install Nginx in Nginx server 20 for some application serverWhen software, mount request can be sent to management server 10.For example, installation personnel is wanted to be " micro- in Nginx server 20When the application server of letter " installs corresponding Nginx software, installation personnel can be inputted in management server 10 and be answered accordinglyWith server identification, request button is then clicked, this when, management server 10 will receive mount request, wherein shouldThe application server identifier is carried in mount request.
In one embodiment, which can be the title of the corresponding application program of application server.ExampleSuch as, application server identifier can be " wechat ", " Netease's news " etc..Certainly, which may be to answerWith the number etc. of server, the particular content of application server mark and form are not limited herein.
S102, installation directory is generated according to default create-rule according to the application server identifier.
It, will be raw according to default create-rule according to application server identifier after management server 10 receives mount requestAt installation directory.
Specifically, in one embodiment, as shown in figure 3, Fig. 3 is a kind of installation of Nginx software in the embodiment of the present applicationThe specific schematic flow diagram of method.Step S102 specifically includes step S1021 and S1022.
S1021, the safety zone mark for obtaining Nginx server place firewall security region.
In one embodiment, it is previously stored with safety zone identification list in management server 10, the safety zone identification listSafety zone mark including the 20 place firewall security region of every Nginx server that management server 10 is managed.ManagementServer 10 first reads pre-stored safety zone identification list, and Nginx server is then obtained from the identification list of safety zone20 corresponding safety zone marks, i.e., obtain the Nginx server for currently needing to install Nginx software from the identification list of safety zone20 corresponding safety zone marks.
It should be noted that management server 10 obtains where currently needing to install the Nginx server 20 of Nginx softwareThe mode of the safety zone mark in firewall security region is not limited to aforesaid way, can also be other modes.For example, management clothesThe peace in firewall security region where business device 10 can obtain it to the Nginx server 20 for currently needing to install Nginx softwareWhole district's mark, the mode for not obtaining safety zone mark to management server 10 herein are limited.
S1022, installation directory is generated according to the application server identifier and safety zone mark.
For example, it is assumed that currently need to install the peace in the firewall security region where the Nginx server 20 of Nginx softwareThe whole district is identified as in " area A ", and application server identifier is " wechat ", then the safety zone mark that management server 10 is got is" area A " then generates installation directory according to " wechat " and " area A ".The installation directory may be, for example, " area wechat A ".Certainly, at itIn his embodiment, above-mentioned " area wechat A " is not limited to according to the installation directory that " wechat " and " area A " generates, can also be generatedOther kinds of installation directory.That is, the life of the installation directory generated according to application server identifier and safety zone markName mode is not limited to aforesaid way, is not limited herein to the naming method of installation directory.
In another embodiment, at least two Nginx softwares are needed to answer to some in a Nginx server 20 sometimesIt is bound in this way with server providing services if only generating installation directory at this time with application server identifier and safety zone markThe installation directory that will lead to the corresponding at least two Nginx software of some application server is identical, be easy to cause subsequent installation withAnd using when go wrong.In order to avoid there is the problem of installation directory conflict, the present embodiment generates installation in the following waysCatalogue.Specifically, as shown in figure 4, Fig. 4 specifically shows for the another of the installation method of Nginx software a kind of in the embodiment of the present applicationMeaning flow chart.Step S102 specifically includes step S1023 to S1026.
S1023, the safety zone mark for obtaining Nginx server place firewall security region.
Management server 10 obtains the 20 place firewall security area of Nginx server for currently needing to install Nginx softwareThe safety zone in domain identifies.
S1024, it obtains in the Nginx server to the corresponding application server offer clothes of the application server identifierThe current quantity of the Nginx software of business.
Management server 10 obtains already existing to the corresponding application clothes of application server identifier in Nginx server 20Business device provides the current quantity of the Nginx software of service.For example, it is assumed that current to need to be " wechat " corresponding application server peaceNginx software is filled, then management server 10 just first obtains already installed in Nginx server 20 be used for " wechat "Application server provides the quantity of the Nginx software of service.
Specifically, management server 10 can prestore quantity table according to application server identifier acquisition is corresponding,In, described prestore is stored in the Nginx server in quantity table to the corresponding application server of the application server identifierThe current quantity of the Nginx software of service is provided;And it is obtained in quantity table from described prestore to application server offerThe current quantity of the Nginx software of service.
Store that each application server identifier is corresponding to prestore quantity table in management server 10.Each pre-stored dataTable, which is used to store in Nginx server 20, provides the Nginx software of service to the corresponding application server of application server identifierCurrent quantity.For example, management server 10 according to " wechat " get it is corresponding prestore quantity table, prestore quantity table at thisIn, describing and providing the quantity of the Nginx software serviced to " wechat " corresponding application server in Nginx server 20 is 1,That is, being mounted with that a Nginx software provides service to the application server of " wechat " in Nginx server 20.At this point, pipeThe current quantity that reason server 10 is got is 1.
S1025, the corresponding number of the application server identifier is generated according to the current quantity.
Management server 10 generates the corresponding volume of application server identifier according to the current quantity that step S1024 is gotNumber.For example, the corresponding number of the application server identifier of generation is " 002 ".It is understood that application server identifier is correspondingThe form of number be not limited to the form in example, can also be other forms, be not particularly limited herein.
S1026, generation installation directory is identified and numbered according to the application server identifier, safety zone.
For example, management server 10 is according to application server identifier:" wechat ", safety zone mark:" area A " and number:" 002 " generates installation directory, which can be, for example, " area wechat A 002 ".At this point, first in Nginx server 20The installation directory of Nginx software for providing service to the application server of " wechat " is:" area wechat A 001 ".Thus realizeTwo Nginx softwares are installed in Nginx server 20 and provide service to the same application server.
The listening port number of S103, the configuration Nginx software, wherein the listening port number of the Nginx software withThe listening port difference of all Nginx softwares in Nginx server.
In the present embodiment, the monitoring end of all Nginx softwares in Nginx server 20 is stored in management server 10When in order to avoid running Nginx software in Nginx server 20, there are the problem of listening port number conflict, management clothes in sloganBe engaged in device 10 when for Nginx software distribution listening port, therefore, to assure that the listening port number of current Nginx software andThe listening port difference of other all Nginx softwares in Nginx server 20.
S104, obtain the Nginx software prestore installation kit template, wherein the installation kit template that prestores includes dynamicState class file and static class file, the dynamic class file includes configuration file.
In the present embodiment, it is previously stored in management server 10 and prestores installation kit template.This prestores installation kit templateIncluding dynamic class file and static class file, wherein the dynamic class file is in addition to including conf (Chinese:Configuration file)It outside, can also include workdir (Chinese:Working directory) and logs catalogue.The static state class file may include sbin (inLiterary fame claims:Binary format file) and lib (Chinese:Static library).
S105, according to the installation directory and listening port number update described in prestore the configuration file in installation kit template withForm installation kit.
Specifically, after the management server 10 acquisition prestores installation kit template, by the configuration for prestoring installation kit templateDefault installation catalogue in file is updated to the installation directory, and will be in the configuration file that prestore installation kit templateDefault listening port number is updated to the listening port number to form installation kit.
The catalogue of the static class file for the Nginx server Plays Nginx software that S106, acquisition prestore, and rootThe soft link instruction of catalogue is generated according to the catalogue of the static class file of the standard Nginx software.
In the present embodiment, the standard Nginx software in the Nginx server 20 is preparatory according to scheduled installation directoryThe Nginx software being mounted in Nginx server 20.For example, the Nginx server 20 by standard Nginx software installation/In the scheduled installation directory of wls/apache/Nginx.In this way for class file sbin static in standard Nginx software,The catalogue of sbin is in standard Nginx software:/wls/apache/Nginx/sbin.Similarly, for quiet in standard Nginx softwareFor state class file Lib, the catalogue of Lib is in standard Nginx software:/wls/apache/Nginx/Lib.
In the present embodiment, management server 10 is previously stored with the catalogue of the static class file of standard Nginx software.I.e./ wls/apache/Nginx/sbin and/wls/apache/Nginx/Lib is stored in management server 10.Management server10 after getting the catalogue of static class file of standard Nginx software, will be according to the static class text of these standards Nginx softwareThe catalogue of part generates the soft link instruction of catalogue.
For example, the soft link instruction of the corresponding catalogue of sbin can be:Ln-s/wls/apache/Nginx/sbin sbin.The soft link instruction of the corresponding catalogue of Lib can be:Ln-s/wls/apache/Nginx/Lib Lib.
S107, installation script is generated according to the installation directory and the soft link instruction of catalogue, and sends the installation footThis and installation kit are to the Nginx server, so that the Nginx server execution installation script is described to createInstallation directory, and according to the installation kit by the Nginx software installation in the installation directory, and by executing the meshRecord soft link instruction by by the catalogue of the static class file in the Nginx software by soft link in a manner of link to the markThe catalogue of the static class file of quasi- Nginx software.
Management server 10 generates installation script according to the soft link instruction of catalogue and installation directory.Wherein, the installation scriptIn will carry installation directory and the soft link instruction of catalogue.Management server 10 sends installation script and installation kit to NginxIn server 20.
Nginx server 20 in this way executes installation script after receiving installation script and installation kit to be created that peaceFill catalogue, then run installation kit with by Nginx software installation in installation directory.Meanwhile by executing in installation scriptThe soft link instruction of catalogue links in such a way that the catalogue of the static class file in the Nginx software that will newly install is by soft linkThe catalogue of the static class file of standard Nginx software, so that it is corresponding to complete the installation application server in Nginx server 20Nginx software.
For example, Nginx server 20 executes the soft link instruction of catalogue of Ln-s/wls/apache/Nginx/sbin sbinWhen, the catalogue of the sbin in the Nginx software newly installed can be linked in Nginx server 20 by way of soft linkThe catalogue of the sbin of standard Nginx software.Similarly, Nginx server 20 executes Ln-s/wls/apache/Nginx/Lib LibCatalogue soft link instruction when, the catalogue of the Lib in the Nginx software newly installed can be linked to by way of soft linkThe catalogue of the Lib of 20 Plays Nginx software of Nginx server.It can make the institute installed in Nginx server 20 in this wayThere is the static class file of Nginx software to link to by way of soft link in the static class file of standard Nginx software, instituteThere is the static class file of Nginx software that the static class file in standard Nginx software can be used.It is quiet due to not needing to installState class file can save the set-up time.
In one embodiment, when step S102 uses installation directory generating mode shown in Fig. 4, and by prestoring quantity tableWhen obtaining corresponding current quantity, after management server 10 executes the step S107, also execute:Read the application serviceDevice mark is corresponding to prestore quantity table, and the current quantity in quantity table is prestored described in update.That is, management server 10After completing that new Nginx software is installed in Nginx server 20, need to update the current quantity prestored in quantity table.ExampleSuch as, current quantity is updated to 2 by 1, when in order to next time be that the same application server installs Nginx software, Ke YizhunReally generate the corresponding number of application server identifier.
The installation method of Nginx software in the present embodiment may be implemented to install in Nginx server 20 multipleNginx software improves the resource utilization of Nginx server 20.Meanwhile in the installation method, management server 10 can rootThe configuration file of different Nginx software is set according to different application servers, and the Nginx established in Nginx server 20 is softCorresponding relationship between part and application server, so that also facilitating while Nginx software instances in Nginx server 20Multiple Nginx softwares in Nginx server 20 are managed.In addition, the catalogue of the static class file due to Nginx softwareThe catalogue of the static class file of standard nginx software is linked to by the way of soft link, can save peace to avoid repeating to installETL estimated time of loading.
The embodiment of the present application also provides a kind of mounting device of Nginx software, and the mounting device of the Nginx software is for holdingThe installation method of the aforementioned any one Nginx software of row.Specifically, referring to Fig. 5, Fig. 5 is one kind provided by the embodiments of the present applicationThe schematic block diagram of the mounting device of Nginx software.The mounting device 300 of Nginx software can be installed in management server.
As shown in figure 5, the mounting device 300 of Nginx software include request reception unit 301, catalogue generation unit 302,Port configuration unit 303, template acquiring unit 304, file updating unit 305, instruction generation unit 306 and transmission unit 307.
Request reception unit 301, for receiving the mount request of installation Nginx software, wherein the mount request includesApplication server identifier.
Catalogue generation unit 302, for generating installation mesh according to default create-rule according to the application server identifierRecord.
Specifically, in one embodiment, as shown in fig. 6, Fig. 6 is a kind of Nginx software provided by the embodiments of the present applicationThe specific schematic block diagram of mounting device.The catalogue generation unit 302 includes that the first acquisition subelement 3021 and first generate sonUnit 3022.
First obtains subelement 3021, the safety zone for firewall security region where obtaining the Nginx serverMark.
First generates subelement 3022, for generating installation mesh according to the application server identifier and safety zone markRecord.
Specifically, in another embodiment, as shown in fig. 7, Fig. 7 is a kind of Nginx software provided by the embodiments of the present applicationMounting device another specific schematic block diagram.The catalogue generation unit 302 is obtained including the second acquisition subelement 3023, quantityIt takes subelement 3024, number to generate subelement 3025 and second and generates subelement 3026.
Second obtains subelement 3023, the safety zone for firewall security region where obtaining the Nginx serverMark.
Quantity obtains subelement 3024, corresponding to the application server identifier in the Nginx server for obtainingApplication server provide service Nginx software current quantity.
Specifically, in one embodiment, which obtains subelement 3024 and is specifically used for according to the application server markKnowledge acquisition is corresponding to prestore quantity table, wherein described prestore is stored in the Nginx server in quantity table to application clothesBusiness device identifies the current quantity that corresponding application server provides the Nginx software of service;And it is prestored in quantity table from describedIt obtains and the current quantity of the Nginx software of service is provided to the application server.
Number generates subelement 3025, for generating the corresponding volume of the application server identifier according to the current quantityNumber.
Second generates subelement 3026, generates peace for identifying and numbering according to the application server identifier, safety zoneFill catalogue.
Port configuration unit 303, for configuring the listening port number of the Nginx software, wherein the Nginx softwareListening port number and all Nginx softwares in Nginx server listening port difference.
Template acquiring unit 304 prestores installation kit template for obtain the Nginx software, wherein described to prestore peaceDress packet template includes dynamic class file and static class file, and the dynamic class file includes configuration file.
In one embodiment, the dynamic class file is in addition to including conf (Chinese:Configuration file) outside, can also includeWorkdir (Chinese:Working directory) and logs catalogue.The static state class file may include sbin (Chinese:Binary systemFormatted file) and lib (Chinese:Static library).
File updating unit 305, for prestoring installation kit mould according to the installation directory and listening port number updateConfiguration file in plate is to form installation kit.
Specifically, updating unit 305 is specifically used for the default installation in the configuration file for prestoring installation kit templateCatalogue is updated to the installation directory, and more by the default listening port number in the configuration file for prestoring installation kit templateIt is newly the listening port number to form installation kit.
Instruction generation unit 306, for obtaining the static class of the Nginx server Plays Nginx software prestoredThe catalogue of file, and the soft link instruction of catalogue is generated according to the catalogue of the static class file of the standard Nginx software.
Transmission unit 307 for generating installation script according to the installation directory and the soft link instruction of catalogue, and is sentThe installation script and installation kit are to the Nginx server, so that the Nginx server executes the installation scriptTo create the installation directory, and according to the installation kit by the Nginx software installation in the installation directory, and pass throughExecute the soft link instruction of the catalogue by by the catalogue of the static class file in the Nginx software by soft link in a manner of chainIt is connected to the catalogue of the static class file of the standard Nginx software.
In one embodiment, as shown in fig. 7, the mounting device 300 of the Nginx software further includes updating unit 308.Work as meshIt records generation unit 302 and uses structure shown in Fig. 7, and quantity obtains subelement 3024 and obtains corresponding work as by prestoring quantity tableWhen preceding quantity, after transmission unit 307 has executed and has sent installation script and installation kit to Nginx server, updating unit308 the application server identifier is corresponding to prestore quantity table for reading, and the current number in quantity table is prestored described in updatingAmount.
The mounting device 300 of Nginx software in the present embodiment may be implemented to install in Nginx server multipleNginx software improves the resource utilization of Nginx server.Meanwhile the mounting device 300 of the Nginx software can be according to notWith application server the configuration file of different Nginx software is set, the Nginx software established in Nginx server with answerWith the corresponding relationship between server, so that in Nginx server while Nginx software instances, it is convenient that Nginx is servicedMultiple Nginx softwares in device are managed.In addition, since the catalogue of the static class file of Nginx software uses soft linkMode links to the catalogue of the static class file of standard nginx software, can save the set-up time to avoid repeating to install.
The mounting device of above-mentioned Nginx software can be implemented as a kind of form of computer program, which canTo be run in computer equipment as shown in Figure 8.
Referring to Fig. 8, Fig. 8 is a kind of schematic block diagram of computer equipment provided by the embodiments of the present application.The computer500 equipment of equipment can be management server.The computer equipment 500 for manage an at least Nginx server, withMultiple Nginx softwares are installed, so that Nginx server can provide clothes to multiple application servers in Nginx serverBusiness.Wherein, which may be, for example, Web server, and the operating system of the Nginx server can be Linux systemSystem.
Refering to Fig. 8, which includes processor 502, memory and the net connected by system bus 501Network interface 505, wherein memory may include non-volatile memory medium 503 and built-in storage 504.
The non-volatile memory medium 503 can storage program area 5031 and computer program 5032.The computer program5032 include program instruction, which is performed, and processor 502 may make to execute a kind of installation side of Nginx softwareMethod.
The processor 502 supports the operation of entire computer equipment 500 for providing calculating and control ability.
The built-in storage 504 provides environment for the operation of the computer program 5032 in non-volatile memory medium 503, shouldWhen computer program 5032 is executed by processor 502, processor 502 may make to execute a kind of installation method of Nginx software.
The network interface 505 such as sends the task dispatching of distribution for carrying out network communication.Those skilled in the art can manageIt solves, structure shown in Fig. 8, only the block diagram of part-structure relevant to application scheme, is not constituted to the application sideThe restriction for the computer equipment 500 that case is applied thereon, specific computer equipment 500 may include more than as shown in the figureOr less component, perhaps combine certain components or with different component layouts.
Wherein, the processor 502 is for running computer program 5032 stored in memory, to realize following functionEnergy:Receive the mount request of installation Nginx software, wherein the mount request includes application server identifier;It is answered according to describedInstallation directory is generated according to default create-rule with server identification;Configure the listening port number of the Nginx software, whereinThe listening port difference of the listening port number of the Nginx software and all Nginx softwares in Nginx server;It obtainsThe Nginx software prestores installation kit template, wherein the installation kit template that prestores includes dynamic class file and static class textPart, the dynamic class file includes configuration file;Installation kit is prestored according to the installation directory and listening port number updateConfiguration file in template is to form installation kit;Obtain the static class of the Nginx server Plays Nginx software prestoredThe catalogue of file, and the soft link instruction of catalogue is generated according to the catalogue of the static class file of the standard Nginx software;According to instituteIt states installation directory and the soft link instruction of catalogue generates installation script, and send the installation script and installation kit to describedNginx server, so that the Nginx server executes the installation script to create the installation directory, and according to instituteInstallation kit is stated by the Nginx software installation in the installation directory, and by execute the soft link instruction of catalogue with incite somebody to actionThe catalogue of static class file in the Nginx software links to the quiet of the standard Nginx software by way of soft linkThe catalogue of state class file.
In one embodiment, processor 502 is being executed according to the application server identifier according to the life of default create-ruleWhen at installation directory, it is implemented as follows function:The safety zone mark in firewall security region where obtaining the Nginx serverKnow;And installation directory is generated according to the application server identifier and safety zone mark.
In one embodiment, processor 502 is being executed according to the application server identifier according to the life of default create-ruleWhen at installation directory, it is implemented as follows function:The safety zone mark in firewall security region where obtaining the Nginx serverKnow;It is soft to obtain the Nginx for providing service to the corresponding application server of the application server identifier in the Nginx serverThe current quantity of part;The corresponding number of the application server identifier is generated according to the current quantity;And it is answered according to describedInstallation directory is generated with server identification, safety zone mark and number.
Further, processor 502 is corresponding to the application server identifier in executing the acquisition Nginx serverApplication server provide service Nginx software current quantity when, be implemented as follows function:According to the application serviceDevice mark, which obtains, corresponding prestores quantity table, wherein it is described prestore to store in quantity table answered in the Nginx server to describedThe current quantity of the Nginx software of service is provided with the corresponding application server of server identification;And quantity is prestored from describedIt is obtained in table and the current quantity of the Nginx software of service is provided to the application server.
In one embodiment, processor 502 is being executed according to the installation directory and the soft link instruction generation peace of catalogueScript is filled, and after sending the installation script and installation kit to the Nginx server, is also implemented function such as:It readsThe application server identifier is corresponding to prestore quantity table, and the current quantity in quantity table is prestored described in update.
In one embodiment, processor 502 is prestored according to the installation directory and listening port number update in executionWhen configuration file in installation kit template is to form installation kit, it is implemented as follows function:By the installation kit template of prestoringDefault installation catalogue in configuration file is updated to the installation directory, and by the configuration file for prestoring installation kit templateIn default listening port number be updated to the listening port number to form installation kit.
In one embodiment, the static class file includes binary format file and static library.
It should be appreciated that in the embodiment of the present application, processor 502 can be central processing unit (CentralProcessing Unit, CPU), which can also be other general processors, digital signal processor (DigitalSignal Processor, DSP), specific integrated circuit (Application Specific Integrated Circuit,ASIC), ready-made programmable gate array (Field-Programmable GateArray, FPGA) or other programmable logic devicesPart, discrete gate or transistor logic, discrete hardware components etc..Wherein, general processor can be microprocessor orThe processor is also possible to any conventional processor etc..
Those of ordinary skill in the art will appreciate that be complete in the installation method embodiment for realize above-mentioned Nginx softwarePortion or part process are relevant hardware can be instructed to complete by computer program.The computer program includes programInstruction, computer program can be stored in a storage medium, which is computer readable storage medium.The program instructionIt is executed by least one processor in the computer system, includes the reality such as the installation method of above-mentioned Nginx software with realizationApply the process step of example.
The storage medium can be USB flash disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), magnetic disk orThe various media that can store program code such as person's CD.
Those of ordinary skill in the art may be aware that list described in conjunction with the examples disclosed in the embodiments of the present disclosureMember and algorithm steps, can be realized with electronic hardware, computer software, or a combination of the two, in order to clearly demonstrate hardwareWith the interchangeability of software, each exemplary composition and step are generally described according to function in the above description.ThisA little functions are implemented in hardware or software actually, the specific application and design constraint depending on technical solution.SpeciallyIndustry technical staff can use different methods to achieve the described function each specific application, but this realization is notIt is considered as beyond scope of the present application.
In several embodiments provided herein, it should be understood that disclosed device and method can pass through itIts mode is realized.For example, the apparatus embodiments described above are merely exemplary.For example, the division of each unit, onlyOnly a kind of logical function partition, there may be another division manner in actual implementation.Such as multiple units or components can be tiedAnother system is closed or is desirably integrated into, or some features can be ignored or not executed.
Step in the embodiment of the present application method can be sequentially adjusted, merged and deleted according to actual needs.This ShenPlease the unit in embodiment device can be combined, divided and deleted according to actual needs.In addition, in each implementation of the applicationEach functional unit in example can integrate in one processing unit, is also possible to each unit and physically exists alone, can also be withIt is that two or more units are integrated in one unit.Above-mentioned integrated unit both can take the form of hardware realization,It can also realize in the form of software functional units.
If the integrated unit is realized in the form of SFU software functional unit and when sold or used as an independent product,It can store in one storage medium.Based on this understanding, the technical solution of the application is substantially in other words to existing skillThe all or part of part or the technical solution that art contributes can be embodied in the form of software products, the meterCalculation machine software product is stored in a storage medium, including some instructions are used so that a computer equipment (can be aPeople's computer, terminal or network equipment etc.) execute each embodiment the method for the application all or part of the steps.
The above, the only specific embodiment of the application, but the protection scope of the application is not limited thereto, it is anyThose familiar with the art within the technical scope of the present application, can readily occur in various equivalent modifications or replaceIt changes, these modifications or substitutions should all cover within the scope of protection of this application.Therefore, the protection scope of the application should be with rightIt is required that protection scope subject to.

Claims (10)

CN201810607070.1A2018-06-132018-06-13Nginx software installation method and device, computer equipment and storage mediumActiveCN108920157B (en)

Priority Applications (2)

Application NumberPriority DateFiling DateTitle
CN201810607070.1ACN108920157B (en)2018-06-132018-06-13Nginx software installation method and device, computer equipment and storage medium
PCT/CN2018/109311WO2019237583A1 (en)2018-06-132018-10-08Nginx software installation method and apparatus, computer device, and storage medium

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN201810607070.1ACN108920157B (en)2018-06-132018-06-13Nginx software installation method and device, computer equipment and storage medium

Publications (2)

Publication NumberPublication Date
CN108920157Atrue CN108920157A (en)2018-11-30
CN108920157B CN108920157B (en)2021-02-23

Family

ID=64419237

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN201810607070.1AActiveCN108920157B (en)2018-06-132018-06-13Nginx software installation method and device, computer equipment and storage medium

Country Status (2)

CountryLink
CN (1)CN108920157B (en)
WO (1)WO2019237583A1 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN110147240A (en)*2019-04-302019-08-20广州微算互联信息技术有限公司Application program installation method, system and storage medium based on cloud storage
CN110399137A (en)*2019-06-182019-11-01平安科技(深圳)有限公司Port delet method, device, equipment and the storage medium of more live load equilibrium applications
CN111158782A (en)*2019-12-272020-05-15郑州信大捷安信息技术股份有限公司DPDK technology-based Nginx configuration hot update system and method
CN114936031A (en)*2022-07-222022-08-23浙江中控技术股份有限公司Component calling method and electronic equipment

Citations (6)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US20110106844A1 (en)*2009-11-042011-05-05International Business Machines CorporationIdentifying implicit services links using service usage information
US20110161344A1 (en)*2009-12-302011-06-30International Business Machines CorporationEnhancing soft file system links
CN104618508A (en)*2015-02-262015-05-13浪潮电子信息产业股份有限公司Load balancing mesh architecture based on Nginx, Memcached and Tomcat
CN105335173A (en)*2014-07-012016-02-17北京奇虎科技有限公司Method, apparatus and system for initializing intelligent terminal device
CN106909432A (en)*2017-02-152017-06-30南京赛宁信息技术有限公司The online ambient intelligence deployment system and method for a kind of online competition platforms of CTF
CN107122211A (en)*2017-04-252017-09-01努比亚技术有限公司Application software installation method, terminal and computer-readable recording medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN104486402B (en)*2014-12-112017-09-12江苏爱信诺航天信息科技有限公司A kind of method based on large-scale website combined equalization
CN108055157B (en)*2017-12-192021-02-23北京奇艺世纪科技有限公司Service node acquisition method and device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US20110106844A1 (en)*2009-11-042011-05-05International Business Machines CorporationIdentifying implicit services links using service usage information
US20110161344A1 (en)*2009-12-302011-06-30International Business Machines CorporationEnhancing soft file system links
CN105335173A (en)*2014-07-012016-02-17北京奇虎科技有限公司Method, apparatus and system for initializing intelligent terminal device
CN104618508A (en)*2015-02-262015-05-13浪潮电子信息产业股份有限公司Load balancing mesh architecture based on Nginx, Memcached and Tomcat
CN106909432A (en)*2017-02-152017-06-30南京赛宁信息技术有限公司The online ambient intelligence deployment system and method for a kind of online competition platforms of CTF
CN107122211A (en)*2017-04-252017-09-01努比亚技术有限公司Application software installation method, terminal and computer-readable recording medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
JINGXIAN: "在linux系统下安装两个nginx的简单方法", 《脚本之家》*
孔祥真 等: "Linux负载均衡集群技术在网络服务器中的应用", 《软件导刊》*

Cited By (7)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN110147240A (en)*2019-04-302019-08-20广州微算互联信息技术有限公司Application program installation method, system and storage medium based on cloud storage
CN110147240B (en)*2019-04-302023-09-05广州微算互联信息技术有限公司Cloud storage-based application program installation method, system and storage medium
CN110399137A (en)*2019-06-182019-11-01平安科技(深圳)有限公司Port delet method, device, equipment and the storage medium of more live load equilibrium applications
CN110399137B (en)*2019-06-182024-05-31平安科技(深圳)有限公司Port deletion method, device, equipment and storage medium for multi-live load balancing application
CN111158782A (en)*2019-12-272020-05-15郑州信大捷安信息技术股份有限公司DPDK technology-based Nginx configuration hot update system and method
CN111158782B (en)*2019-12-272022-03-15郑州信大捷安信息技术股份有限公司DPDK technology-based Nginx configuration hot update system and method
CN114936031A (en)*2022-07-222022-08-23浙江中控技术股份有限公司Component calling method and electronic equipment

Also Published As

Publication numberPublication date
CN108920157B (en)2021-02-23
WO2019237583A1 (en)2019-12-19

Similar Documents

PublicationPublication DateTitle
CN104601592B (en)A kind of method and access device for accessing cloud service
CN108920157A (en)Installation method, device, computer equipment and the storage medium of Nginx software
CN112448856B (en)Method and system for providing public network access for external through intranet kubernets
CN108829560A (en)Data monitoring method, device, computer equipment and storage medium
CN113010378B (en)Log processing method and device of microservice module, storage medium and electronic device
CN113568970B (en) Application business data management method, device, equipment and storage medium
CN109586969A (en)Content distributing network disaster recovery method, device, computer equipment and storage medium
CN109284458A (en)Webpage display process, device, computer equipment and storage medium
CN109783357A (en)The method and device of test application program, computer equipment, storage medium
CN109391673A (en)A kind of method, system and the terminal device of management update file
CN103179099A (en)Unified certification method for accessing to open website platforms and website platform
US8584146B1 (en)Communications driver management
CN111245634A (en)Virtualization management method and device
CN113556359A (en) A communication protocol conversion method, device, system and gateway device
CN110798358B (en)Distributed service identification method and device, computer readable medium and electronic equipment
CN108345508A (en)Interface calls test method and device
CN101277301A (en) Distributed system interface calling method and device
CN113778499B (en)Method, apparatus, device and computer readable medium for publishing services
CN115469961A (en)Method and device for creating container group, electronic equipment and storage medium
CN106533716A (en)Method and system for managing northbound interface
CN106528423B (en)Dynamic journal recording method and device
CN108418857B (en)Zookeeper cluster system and connection method and device thereof
CN115190064B (en)Method, device, system and storage medium for implementing client dynamic routing
CN107404410B (en)Method and device for constructing virtual network function platform in cloud environment
CN106936643B (en)Equipment linkage method and terminal equipment

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
GR01Patent grant
GR01Patent grant

[8]ページ先頭

©2009-2025 Movatter.jp