The content of the invention
In view of this, the purpose of the embodiment of the present invention is to provide a kind of system installation method and device, above-mentioned to improveProblem.
In a first aspect, the embodiments of the invention provide a kind of system installation method, methods described includes:Client passes through netNetwork sends operating system mount request to first server;The client obtains the first serverThe response that mount request of uniting returns, wherein, the response includes the IP address for client distribution, the ground of second serverLocation and startup file position;The client is according to the address of the second server and the startup file position from instituteState second server and obtain startup file;The client starts installation process according to the startup file;The client from3rd server obtains automatic response file and installation file;The client is according to the automatic response file and the installationFile completes the automatic installation of operating system.
Further, the startup file includes image file, kernel file, driving file and installation configuration file.
Further, the first server is Dynamic Host Configuration Protocol server, and the second server is tftp server, describedThree servers are ftp server.
Further, the client obtains automatic response file and installation file from the 3rd server, including:The visitorFamily end is according to the position that automatic response file is obtained in the startup file;The client is according to the automatic response filePosition obtains the automatic response file from the 3rd server;The client obtains peace from the automatic response fileFill the position of file;The client obtains the installation text according to the position of the installation file from the 3rd serverPart.
Further, the client obtains the sound that the first server returns according to the operating system mount requestShould, including:The client obtains the first server and judges the operating system according to the operating system mount requestWhether mount request is legal request, if so, then obtaining the response that the first server returns.
Second aspect, the embodiments of the invention provide a kind of system installation device, runs on client, described device bagInclude:Request sending module, for sending operating system mount request to first server by network;Acquisition module is responded, is usedIn the response that the acquisition first server returns according to the operating system mount request, wherein, the response is included for instituteState IP address, the address and startup file position of second server of client distribution;Startup file acquisition module, for rootAccording to the address and the startup file position of the second server startup file is obtained from the second server;Start mouldBlock, for starting installation process according to the startup file;File acquisition module, for obtaining automatic-answering back device from the 3rd serverFile and installation file;Module is installed, for completing operating system according to the automatic response file and the installation fileAutomatic installation.
Further, the startup file includes image file, kernel file, driving file and installation configuration file.
Further, the first server is Dynamic Host Configuration Protocol server, and the second server is tftp server, describedThree servers are ftp server.
Further, the file acquisition module includes:Answer file position acquisition unit, for starting text according to describedThe position of automatic response file is obtained in part;Answer file acquiring unit, for the position according to the automatic response file from3rd server obtains the automatic response file;Installation file position acquisition unit, for literary from the automatic-answering back deviceThe position of installation file is obtained in part;Installation file acquiring unit, for the position according to the installation file from the described 3rdServer obtains the installation file.
Further, the response acquisition module, the first server is obtained according to institute specifically for the clientState operating system mount request and judge whether the operating system mount request is legal request, if so, then obtaining describedThe response that one server returns.
The beneficial effect of the embodiment of the present invention is:
The embodiment of the present invention provides a kind of system installation method and device, first client by network to first serverOperating system mount request is sent, then obtains the sound that the first server returns according to the operating system mount requestShould, wherein, the response includes the IP address for client distribution, the address and startup file position of second serverPut, the address and the startup file position further according to the second server obtain from the second server starts textPart, start installation process further according to the startup file, then obtain automatic response file and installation file from the 3rd server,The automatic installation of operating system is completed further according to the automatic response file and the installation file, so as to real by networkNow in high-volume client operating system automatic installation, dramatically saves on time, human and material resources and financial resources cost.
Other features and advantages of the present invention will illustrate in subsequent specification, also, partly become from specificationIt is clear that or by implementing understanding of the embodiment of the present invention.The purpose of the present invention and other advantages can be by saying what is writeSpecifically noted structure is realized and obtained in bright book, claims and accompanying drawing.
Embodiment
Below in conjunction with accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, completeGround describes, it is clear that described embodiment is only part of the embodiment of the present invention, rather than whole embodiments.Generally existThe component of the embodiment of the present invention described and illustrated in accompanying drawing can be configured to arrange and design with a variety of herein.CauseThis, the detailed description of the embodiments of the invention to providing in the accompanying drawings is not intended to limit claimed invention belowScope, but it is merely representative of the selected embodiment of the present invention.Based on embodiments of the invention, those skilled in the art are not doingThe every other embodiment obtained on the premise of going out creative work, belongs to the scope of protection of the invention.
It should be noted that:Similar label and letter represents similar terms in following accompanying drawing, therefore, once a certain Xiang YiIt is defined, then it further need not be defined and explained in subsequent accompanying drawing in individual accompanying drawing.Meanwhile the present invention'sIn description, term " first ", " second " etc. are only used for distinguishing description, and it is not intended that instruction or hint relative importance.
The schematic diagram that Fig. 1 is client 10 provided in an embodiment of the present invention and server 20 interacts, the server20 are communicatively coupled by network 30 and one or more clients 10, to enter row data communication or interaction.The server20 can be the webserver, database server etc., and the server 20 is the first service in the embodiment of the present inventionDevice, second server or the 3rd server.The client 10 can be PC (personal computer, PC), put downPlate computer, smart mobile phone, personal digital assistant (personal digital assistant, PDA), wearable device etc. are eventuallyHold, client 10 refers to computer in the embodiment of the present invention.
Fig. 2 is refer to, Fig. 2 shows a kind of structured flowchart for the electronic equipment 100 that can be applied in the embodiment of the present application.Electronic equipment 100 can include system installation device, memory 101, storage control 102, processor 103, Peripheral Interface104th, input-output unit 105, audio unit 106, display unit 107.
The memory 101, storage control 102, processor 103, Peripheral Interface 104, input-output unit 105, soundFrequency unit 106,107 each element of display unit are directly or indirectly electrically connected between each other, to realize the transmission of data or friendshipMutually.It is electrically connected with for example, these elements can be realized by one or more communication bus or signal wire between each other.The systemErecting device can be stored in the memory 101 or be solidified in the form of software or firmware (firmware) including at least oneSoftware function module in the operation operating system (operating system, OS) of the system installation device.The placeReason device 103 is used to perform the executable module stored in memory 101, such as the software function that the system installation device includesModule or computer program.
Wherein, memory 101 may be, but not limited to, random access memory (Random Access Memory,RAM), read-only storage (Read Only Memory, ROM), programmable read only memory (Programmable Read-OnlyMemory, PROM), erasable read-only memory (Erasable Programmable Read-Only Memory, EPROM),Electricallyerasable ROM (EEROM) (Electric Erasable Programmable Read-Only Memory, EEPROM) etc..Wherein, memory 101 is used for storage program, and the processor 103 performs described program after execute instruction is received, foregoingThe method performed by server that the stream process that any embodiment of the embodiment of the present invention discloses defines can apply to processor 103In, or realized by processor 103.
Processor 103 can be a kind of IC chip, have the disposal ability of signal.Above-mentioned processor 103 canTo be general processor, including central processing unit (Central Processing Unit, abbreviation CPU), network processing unit(Network Processor, abbreviation NP) etc.;Can also be digital signal processor (DSP), application specific integrated circuit (ASIC),Ready-made programmable gate array (FPGA) either other PLDs, discrete gate or transistor logic, discrete hardPart component.It can realize or perform disclosed each method, step and the logic diagram in the embodiment of the present invention.General processorCan be microprocessor or the processor 103 can also be any conventional processor etc..
Various input/output devices are coupled to processor 103 and memory 101 by the Peripheral Interface 104.At someIn embodiment, Peripheral Interface 104, processor 103 and storage control 102 can be realized in one single chip.Other oneIn a little examples, they can be realized by independent chip respectively.
Input-output unit 105 is used to be supplied to user input data to realize user and the server (or local terminal)Interaction.The input-output unit 105 may be, but not limited to, mouse and keyboard etc..
Audio unit 106 provides a user COBBAIF, and it may include one or more microphones, one or more raisesSound device and voicefrequency circuit.
Display unit 107 provided between the electronic equipment 100 and user an interactive interface (such as user operate boundaryFace) or for display image data give user reference.In the present embodiment, the display unit 107 can be liquid crystal displayOr touch control display.If touch control display, it can be the capacitance type touch control screen or resistance for supporting single-point and multi-point touch operationFormula touch screen etc..Single-point and multi-point touch operation is supported to refer to that touch control display can sense on the touch control display oneOr multiple opening positions are with caused touch control operation, and the touch control operation that this is sensed transfer to processor 103 calculate andProcessing.
Various input/output devices are coupled to processor 103 and memory 101 by the Peripheral Interface 104.At someIn embodiment, Peripheral Interface 104, processor 103 and storage control 102 can be realized in one single chip.Other oneIn a little examples, they can be realized by independent chip respectively.
Input-output unit 105 is used to be supplied to user input data to realize interacting for user and processing terminal.It is described defeatedEnter output unit 105 may be, but not limited to, mouse and keyboard etc..
It is appreciated that the structure shown in Fig. 2 is only to illustrate, the electronic equipment 100 may also include more more than shown in Fig. 2Either less component or there is the configuration different from shown in Fig. 2.Each component shown in Fig. 2 can use hardware, softwareOr its combination is realized.
For client in the embodiment of the present invention to be intended to the computer of installation operation system, client passes through network connection respectivelyTo first server, second server and the 3rd server.
The first server is Dynamic Host Configuration Protocol server, and the Dynamic Host Configuration Protocol server is storing external member used in each operating systemFile or driver, the species of external member file include HTTP, FTP or DynamicHost settingAgreement etc., driver include main frame board chip, the display card for having client to need.The driver of sound card and network card etc..The Dynamic Host Configuration Protocol server is additionally operable to provide the necessary network information, such as ip, netmask, gateway, dns for client, and toClient provides position and second server (TFTP service servers) address of guiding file (pxelinux.0) etc., is also visitorDynamic IP addressing is distributed at family end.
The second server is tftp server, and the tftp server is used to provide os starting to clientFile, such as kernel file (vmlinuz, initrd.img) and guiding file (pxelinux.0).
3rd server is ftp server, and the ftp server is used to provide operating system installation file to clientAnd automatic response file, i.e. kickstart response file, it is additionally operable to the image file of storage program area, operation system imageThe species of file be Windows (such as:Windows 2000, NT, XP, Server etc.), (SuSE) Linux OS (exampleSuch as:Red Hat, Fedora or Ubutun operating systems) or Unix operating systems image file file.
Operating system in the embodiment of the present invention refers to unix or Linux system, the installation of other certain operating systemsAlso can be realized by this method, the protection domain of the embodiment of the present invention simultaneously without cease is limited to this.
And the installation of operating system is by PEX (Pre-boot Execution in the embodiment of the present inventionEnvironment) protocol realization, the agreement are the agreements for having Intel to design, and computer can be made to pass through network startup, associationView is divided into client and server both ends, and this one end of client includes the client and first server in the embodiment of the present invention,This one end of server includes the second server and the 3rd server in the embodiment of the present invention.
PXE client are in the ROM of network interface card, and when computer guiding, PXE client are called in internal memory and performed by BIOS,And command menu is shown, after user selects, PXE client download to the operating system for being placed on distal end by networkLocal runtime.
Fig. 3 is refer to, Fig. 3 is a kind of flow chart of system installation method provided in an embodiment of the present invention, and methods described shouldFor client, methods described specifically comprises the following steps:
Step S110:Client sends operating system mount request by network to first server.
Client, it is necessary to IP address, then needs to ask Dynamic Host Configuration Protocol server to give client distribution IP address in start-up course,Wherein, client is by supporting PEX network interface card to send system mount request to Dynamic Host Configuration Protocol server by network, it is, requestDynamic Host Configuration Protocol server distributes the broadcast packet of IP address for it.
It can also be understood that, the BIOS of the client for the NIC for supporting PEX is set to network startup, led toA broadcast request can be sent with UDP by crossing self-starting chip, and the Dynamic Host Configuration Protocol server into network asks for the information such as IP address.
Step S120:The client obtains the sound that the first server returns according to the operating system mount requestShould.
When Dynamic Host Configuration Protocol server receive client transmission operating system mount request after, can also verify the request whether beLegal request, i.e., whether it is the request from PXE Client, if so, then returning to one response of client, the responseIncluding distributed for the client IP address, the address and startup file position of second server (tftp server).
Step S130:The client is according to the address of the second server and the startup file position from describedSecond server obtains startup file.
The client is sent after the response of Dynamic Host Configuration Protocol server return is received by TFTP address to tftp serverOne frame, with acquisition request startup file, these startup files include image file pxelinux.0, installation configuration fileThe files such as pxelinux.cfg/default, kernel file vmlinuz, driving file initrd.img.
Image file pxelinux.0 is client terminal start-up file, and it indicates that client goes to obtain configuration on tftp serverFile, i.e., which specify go on tftp server to download with its pxelinux.cfg subdirectory under same catalogueDefault files, so as to further start.
Step S140:The client starts installation process according to the startup file.
Boot sequence of the client defined in the startup file, the Boot Dernel of start-up operation system installation procedure, that is, is openedDynamic installation process.
Step S150:The client obtains automatic response file and installation file from the 3rd server.
Client described first obtains the position of automatic response file according to the startup file, automatically should further according to describedThe position for answering file obtains the automatic response file from the 3rd server, i.e. client can be from the peace in startup fileFill the automatic response file position that configuration file pxelinux/default is provided and download automatic response file from ftp serverKs.cfg, automatic response file is obtained by ftp server.The client is from the installation configuration file in startup fileKernel is installed and activated in pxelinux/default, and asks download automatic response file ks.cfg, FTP clothes to ftp serverAfter business device receives download automatic response file request, automatic response file ks.cfg is sent to client.
Then the client obtains the position of installation file from the automatic response file, further according to the installation textThe position of part obtains the installation file from the 3rd server, i.e., described client asks to download installation to ftp serverFile, after ftp server receives installation file request, installation file is sent to client.
Step S160:The client completes oneself of operating system according to the automatic response file and the installation fileDynamic installation.
Every software kit needed for installation process can also be downloaded by the configuring request ftp server of automatic response fileWith kickstart response file, Kickstart response file is mainly used to set time zone, password, system partitioning, software kit choosingThe information such as select.In transmitting software packet procedures, client starts installation operation system, so as to be automatically performed operating systemInstallation.
It refer to Fig. 4, Fig. 4 is a kind of structured flowchart of system installation device 200 provided in an embodiment of the present invention, the dressPut and run on client, described device includes:
Request sending module 210, for sending operating system mount request to first server by network.
Acquisition module 220 is responded, is returned according to the operating system mount request for obtaining the first serverResponse, wherein, the response includes the IP address for client distribution, the address and startup file position of second serverPut.
Startup file acquisition module 230, for the address according to the second server and the startup file positionStartup file is obtained from the second server.
Starting module 240, for starting installation process according to the startup file.
File acquisition module 250, for obtaining automatic response file and installation file from the 3rd server.
Module 260 is installed, for completing the automatic of operating system according to the automatic response file and the installation fileInstallation.
As a kind of mode, the startup file includes image file, kernel file, driving file and installation configuration textPart.
As a kind of mode, the first server is Dynamic Host Configuration Protocol server, and the second server is tftp server, instituteIt is ftp server to state the 3rd server.
As a kind of mode, the file acquisition module 250 includes:
Answer file position acquisition unit, for according to the position that automatic response file is obtained in the startup file.
Answer file acquiring unit, institute is obtained from the 3rd server for the position according to the automatic response fileState automatic response file.
Installation file position acquisition unit, for obtaining the position of installation file from the automatic response file.
Installation file acquiring unit, the peace is obtained from the 3rd server for the position according to the installation fileFill file.
As a kind of mode, the response acquisition module 220, the first server is obtained specifically for the clientJudge whether the operating system mount request is legal request according to the operating system mount request, if so, then obtainingThe response that the first server returns.
It is apparent to those skilled in the art that for convenience and simplicity of description, the device of foregoing descriptionSpecific work process, may be referred to the corresponding process in preceding method, no longer excessively repeat herein.
In summary, the embodiment of the present invention provides a kind of system installation method and device, first client by network toFirst server sends operating system mount request, then obtains the first server according to the operating system mount requestThe response of return, wherein, the response is included for the IP address of client distribution, the address of second server and startupDocument location, address and the startup file position further according to the second server obtain from the second server opensDynamic file, start installation process further according to the startup file, then obtain automatic response file and installation from the 3rd serverFile, the automatic installation of operating system is completed further according to the automatic response file and the installation file, so as to pass throughThe automatic installation of operating system in real-time performance high-volume client, dramatically saves on the time, human and material resources and financial resources intoThis.
In several embodiments provided herein, it should be understood that disclosed apparatus and method, can also pass throughOther modes are realized.Device embodiment described above is only schematical, for example, flow chart and block diagram in accompanying drawingShow the device of multiple embodiments according to the present invention, method and computer program product architectural framework in the cards,Function and operation.At this point, each square frame in flow chart or block diagram can represent the one of a module, program segment or codePart, a part for the module, program segment or code include one or more and are used to realize holding for defined logic functionRow instruction.It should also be noted that at some as in the implementation replaced, the function that is marked in square frame can also with different fromThe order marked in accompanying drawing occurs.For example, two continuous square frames can essentially perform substantially in parallel, they are sometimesIt can perform in the opposite order, this is depending on involved function.It is it is also noted that every in block diagram and/or flow chartThe combination of individual square frame and block diagram and/or the square frame in flow chart, function or the special base of action as defined in performing can be usedRealize, or can be realized with the combination of specialized hardware and computer instruction in the operating system of hardware.
In addition, each functional module in each embodiment of the present invention can integrate to form an independent portionPoint or modules individualism, can also two or more modules be integrated to form an independent part.
If the function is realized in the form of software function module and is used as independent production marketing or in use, can be withIt is stored in a computer read/write memory medium.Based on such understanding, technical scheme is substantially in other wordsThe part to be contributed to prior art or the part of the technical scheme can be embodied in the form of software product, the meterCalculation machine software product is stored in a storage medium, including some instructions are causing a computer equipment (can bePeople's computer, server, or network equipment etc.) perform all or part of step of each embodiment methods described of the present invention.And foregoing storage medium includes:USB flash disk, mobile hard disk, read-only storage (ROM, Read-Only Memory), arbitrary access are depositedReservoir (RAM, Random Access Memory), magnetic disc or CD etc. are various can be with the medium of store program codes.
The preferred embodiments of the present invention are the foregoing is only, are not intended to limit the invention, for the skill of this areaFor art personnel, the present invention can have various modifications and variations.Within the spirit and principles of the invention, that is made any repaiiesChange, equivalent substitution, improvement etc., should be included in the scope of the protection.It should be noted that:Similar label and letter existsSimilar terms is represented in following accompanying drawing, therefore, once being defined in a certain Xiang Yi accompanying drawing, is then not required in subsequent accompanying drawingIt is further defined and explained.
The foregoing is only a specific embodiment of the invention, but protection scope of the present invention is not limited thereto, anyThose familiar with the art the invention discloses technical scope in, change or replacement can be readily occurred in, should all be containedCover within protection scope of the present invention.Therefore, protection scope of the present invention described should be defined by scope of the claims.
It should be noted that herein, such as first and second or the like relational terms are used merely to a realityBody or operation make a distinction with another entity or operation, and not necessarily require or imply and deposited between these entities or operationIn any this actual relation or order.Moreover, term " comprising ", "comprising" or its any other variant are intended toNonexcludability includes, so that process, method, article or equipment including a series of elements not only will including thoseElement, but also the other element including being not expressly set out, or it is this process, method, article or equipment also to includeIntrinsic key element.In the absence of more restrictions, the key element limited by sentence "including a ...", it is not excluded thatOther identical element also be present in process, method, article or equipment including the key element.