System installation method and device
1. A system installation method, comprising:
configuring a DHCP service address field of a server;
executing a boot script in a boot medium through a machine to be installed, and establishing communication connection with the server based on the DHCP service address field;
acquiring a system file image stored in a specified directory in the server based on the communication connection;
and carrying out system installation on the machine to be installed by utilizing the system file mirror image.
2. The system installation method according to claim 1, wherein the configuring the DHCP service address field of the server includes:
configuring a DHCP service address field of a server side as a default network segment;
correspondingly, the executing a boot script in a boot medium through the machine to be installed, and establishing a communication connection with the server based on the DHCP service address field includes:
executing a boot script in a boot medium through a machine to be installed, and establishing communication connection with the server by using a default IP address in the boot script;
and the default IP address is the address in the default network segment.
3. The system installation method according to claim 1, wherein the configuring the DHCP service address field of the server includes:
configuring a DHCP service address field of a server side into a non-default network segment;
correspondingly, the executing a boot script in a boot medium through the machine to be installed, and establishing a communication connection with the server based on the DHCP service address field includes:
executing a guide script in a guide medium through a machine to be installed to generate an operation interface;
acquiring an IP address input by a user through the operation interface to obtain a target IP address;
establishing communication connection with the server by using the target IP address;
and the target IP address is the address in the non-default network segment.
4. The system installation method according to claim 1, wherein the obtaining the system file image stored in the server under a specified directory based on the communication connection comprises:
and acquiring a system file image stored in a specified directory in the server based on the communication connection and the TFTP service and the NFS service deployed in the server.
5. The system installation method according to claim 1, wherein the obtaining the system file image stored in the server under a specified directory based on the communication connection comprises:
and acquiring the system file image corresponding to the machine to be installed stored in the specified directory in the server based on the communication connection and the name of the system file image.
6. The system installation method according to any one of claims 1 to 5, further comprising:
and acquiring system file images of machines to be installed of different types through the server, and storing the system file images of different types in different specified catalogs.
7. A system installation apparatus, comprising:
the server side is used for configuring a DHCP service address field of the server side;
the machine to be installed is used for executing the boot script in the boot medium and establishing communication connection with the server based on the DHCP service address field; acquiring a system file image stored in a specified directory in the server based on the communication connection; and carrying out system installation on the machine to be installed by utilizing the system file mirror image.
8. The system installation apparatus according to claim 7, wherein the server is specifically configured to configure a DHCP service address field of the server as a default network segment;
correspondingly, the machine to be installed is specifically configured to:
executing a boot script in a boot medium through a machine to be installed, and establishing communication connection with the server by using a default IP address in the boot script;
and the default IP address is the address in the default network segment.
9. The system installation apparatus according to claim 7, wherein the server is specifically configured to configure a DHCP service address field of the server as a non-default network segment;
correspondingly, the machine to be installed is specifically configured to:
executing a guide script in a guide medium through a machine to be installed to generate an operation interface;
acquiring an IP address input by a user through the operation interface to obtain a target IP address;
establishing communication connection with the server by using the target IP address;
and the target IP address is the address in the non-default network segment.
10. The system installation apparatus of any one of claims 7 to 9, wherein the server is further configured to:
and acquiring system file images of machines to be installed of different types, and storing the system file images of different types in different specified catalogs.
Background
The System installation of a computer is an important work in the SIT (System Integration Testing) work, the traditional scene facing a large number of machines through an optical disk or a U disk has the problems of large material consumption and repetitive physical labor, and meanwhile, installation personnel need to operate and watch one by one when a plurality of machines are installed, so that the error probability and the labor cost are greatly increased. Thus, an unattended automatic installation technique of PXE (i.e., Preboot execution Environment) installation has been created. However, for a special purpose machine, there is a dedicated System, a hard disk, a BIOS (Basic Input Output System), and a unique component (security card) including a PC and a server, and in order to ensure security, because of IP port limitation and security limitation of the special BIOS, it cannot be installed by PXE on HOST interface as a general purpose machine.
At present, the batch installation of a special machine is carried out in a mother disc filling mode, but the defect of mother disc filling is limited by the design of a hard disc copying machine, and a 16-path copying machine is commonly used on a production line at present, so that a plurality of copying machines need to be prepared during batch production, a plurality of mother discs are manufactured, and a specially-assigned person needs to be equipped for watching. Not only occupy a large amount of manpower and materials, the biggest problem is the in-process of preparing polylith mother disc, if certain mother disc has appeared the problem, add and be arranged in later sequence, can not be perceived by the very first time. And when the master disk is used for copying, the hard disk needs to be detached from the case, and if the hard disk is used for an assembled machine, the hard disk needs to be detached again, so that the aging is carried out again, and a large amount of time is wasted. Most importantly, the firmware of the special hard disk of some special machines is updated during version upgrading, the adoption of a mother disk filling mode is not allowed, and the traditional network mode or the special network mode needs to be manually selected after the system is installed, so that the mother disk filling cannot be used during the installation of the system. In addition, ensuring the safety of installation of the special machine system is also a problem to be considered.
Disclosure of Invention
In view of this, an object of the present application is to provide a system installation method and apparatus, which can implement batch installation of special machine systems, and improve efficiency, save cost, and ensure safety of system installation. The specific scheme is as follows:
in a first aspect, the present application discloses a system installation method, comprising:
configuring a DHCP service address field of a server;
executing a boot script in a boot medium through a machine to be installed, and establishing communication connection with the server based on the DHCP service address field;
acquiring a system file image stored in a specified directory in the server based on the communication connection;
and carrying out system installation on the machine to be installed by utilizing the system file mirror image.
Optionally, the configuring the DHCP service address field of the server includes:
configuring a DHCP service address field of a server side as a default network segment;
correspondingly, the executing a boot script in a boot medium through the machine to be installed, and establishing a communication connection with the server based on the DHCP service address field includes:
executing a boot script in a boot medium through a machine to be installed, and establishing communication connection with the server by using a default IP address in the boot script;
and the default IP address is the address in the default network segment.
Optionally, the configuring the DHCP service address field of the server includes:
configuring a DHCP service address field of a server side into a non-default network segment;
correspondingly, the executing a boot script in a boot medium through the machine to be installed, and establishing a communication connection with the server based on the DHCP service address field includes:
executing a guide script in a guide medium through a machine to be installed to generate an operation interface;
acquiring an IP address input by a user through the operation interface to obtain a target IP address;
establishing communication connection with the server by using the target IP address;
and the target IP address is the address in the non-default network segment.
Optionally, the obtaining the system file image stored in the server under the specified directory based on the communication connection includes:
and acquiring a system file image stored in a specified directory in the server based on the communication connection and the TFTP service and the NFS service deployed in the server.
Optionally, the obtaining the system file image stored in the server under the specified directory based on the communication connection includes:
and acquiring the system file image corresponding to the machine to be installed stored in the specified directory in the server based on the communication connection and the name of the system file image.
Optionally, the method further includes:
and acquiring system file images of machines to be installed of different types through the server, and storing the system file images of different types in different specified catalogs.
In a second aspect, the present application discloses a system installation apparatus, comprising:
the server side is used for configuring a DHCP service address field of the server side;
the machine to be installed is used for executing the boot script in the boot medium and establishing communication connection with the server based on the DHCP service address field; acquiring a system file image stored in a specified directory in the server based on the communication connection; and carrying out system installation on the machine to be installed by utilizing the system file mirror image.
Optionally, the server is specifically configured to configure a DHCP service address field of the server as a default network segment;
correspondingly, the machine to be installed is specifically configured to:
executing a boot script in a boot medium through a machine to be installed, and establishing communication connection with the server by using a default IP address in the boot script;
and the default IP address is the address in the default network segment.
Optionally, the server is specifically configured to configure a DHCP service address field of the server as a non-default network segment;
correspondingly, the machine to be installed is specifically configured to:
executing a guide script in a guide medium through a machine to be installed to generate an operation interface;
acquiring an IP address input by a user through the operation interface to obtain a target IP address;
establishing communication connection with the server by using the target IP address;
and the target IP address is the address in the non-default network segment.
Optionally, the server is further configured to:
and acquiring system file images of machines to be installed of different types, and storing the system file images of different types in different specified catalogs.
It is thus clear that this application configures the DHCP service address field of server side earlier, later through waiting to install the machine execution guide script in the medium, and based on DHCP service address field establish with the communication connection of server side, based on communication connection obtains the system file mirror image of saving under appointed directory in the server side, utilizes the system file mirror image is right wait to install the machine and carry out system installation. Therefore, batch installation of the special machine system is realized, a server can be configured for one time when a plurality of machines are installed, the guide medium can be reused, manpower and material resources are reduced, efficiency is improved, cost is saved, in addition, other external networks and redundant installation packages are not introduced in the installation process, and the safety of system installation is ensured.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
FIG. 1 is a flow chart of a system installation method disclosed herein;
FIG. 2 is a flow chart of a particular system installation method disclosed herein;
FIG. 3 is a schematic view of a particular system installation scheme disclosed herein;
fig. 4 is a schematic structural diagram of a system installation device disclosed in the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
At present, the batch installation of a special machine is carried out in a mother disc filling mode, but the defect of mother disc filling is limited by the design of a hard disc copying machine, and a 16-path copying machine is commonly used on a production line at present, so that a plurality of copying machines need to be prepared during batch production, a plurality of mother discs are manufactured, and a specially-assigned person needs to be equipped for watching. Not only occupy a large amount of manpower and materials, the biggest problem is the in-process of preparing polylith mother disc, if certain mother disc has appeared the problem, add and be arranged in later sequence, can not be perceived by the very first time. And when the master disk is used for copying, the hard disk needs to be detached from the case, and if the hard disk is used for an assembled machine, the hard disk needs to be detached again, so that the aging is carried out again, and a large amount of time is wasted. Most importantly, the firmware of the special hard disk of some special machines is updated during version upgrading, the adoption of a mother disk filling mode is not allowed, and the traditional network mode or the special network mode needs to be manually selected after the system is installed, so that the mother disk filling cannot be used during the installation of the system. In addition, ensuring the safety of installation of the special machine system is also a problem to be considered. Therefore, the system installation scheme is provided, batch installation of the special machine system can be realized, efficiency is improved, cost is saved, and safety of system installation is guaranteed.
Referring to fig. 1, an embodiment of the present application discloses a system installation method, which is characterized by including:
step S11: and configuring a DHCP (Dynamic Host Configuration Protocol) service address field of the server.
Step S12: and executing a boot script in a boot medium through a machine to be installed, and establishing communication connection with the server based on the DHCP service address field.
In a specific implementation manner, a DHCP service address field of a server may be configured as a default network segment; correspondingly, the executing a boot script in a boot medium through the machine to be installed, and establishing a communication connection with the server based on the DHCP service address field includes: executing a boot script in a boot medium through a machine to be installed, and establishing communication connection with the server by using a default IP address in the boot script; and the default IP address is the address in the default network segment.
In another specific implementation, a DHCP service address field of a server may be configured as a non-default network segment; correspondingly, the executing a boot script in a boot medium through the machine to be installed, and establishing a communication connection with the server based on the DHCP service address field includes: executing a guide script in a guide medium through a machine to be installed to generate an operation interface; acquiring an IP address input by a user through the operation interface to obtain a target IP address; establishing communication connection with the server by using the target IP address; and the target IP address is the address in the non-default network segment.
That is, in the embodiment of the present application, a network needs to be configured at the server first, a default network segment may be configured, or a non-default network may be configured, an installer fills in according to an IP format, and the machine to be installed establishes a communication connection with the server based on the configured network segment.
In addition, it is necessary to check whether or not a mirror exists under a specified directory, such as:
the optical/osupdate/earch 64/single/kylin-disk-120-zf, wherein the kylin-disk-120-zf is a mirror image name.
It should be noted that the machine to be installed has an optical drive or may use a USB optical drive to boot by a boot medium, which is a storage device for booting files such as a USB disk, an optical disk, etc. The boot process is usually performed by the CPU by loading a segment mapped in the memory by the BIOS, checking the health of the computer (e.g., CPU fan, network card, etc.), and then calling the boot file in the boot medium into the memory to boot.
Step S13: and acquiring a system file image stored in a specified directory in the server based on the communication connection.
In a specific embodiment, the System File image stored in the specified directory in the server may be acquired based on the communication connection and TFTP (simple File Transfer Protocol) service and NFS (Network File System) service deployed in the server.
That is, the server deploys the TFTP service and the NFS service in addition to the DHCP service, so as to implement secure and stable batch installation of the special machines.
Step S14: and carrying out system installation on the machine to be installed by utilizing the system file mirror image.
It can be seen that, in the embodiment of the present application, a DHCP service address field of a server is configured first, then a boot script in a boot medium is executed by a machine to be installed, a communication connection with the server is established based on the DHCP service address field, a system file image stored in an appointed directory in the server is obtained based on the communication connection, and the system file image is utilized to perform system installation on the machine to be installed. Therefore, batch installation of the special machine system is realized, a server can be configured for one time when a plurality of machines are installed, the guide medium can be reused, manpower and material resources are reduced, efficiency is improved, cost is saved, in addition, other external networks and redundant installation packages are not introduced in the installation process, and the safety of system installation is ensured.
Referring to fig. 2, an embodiment of the present application discloses a specific system installation method, including:
step S21: and acquiring system file images of machines to be installed of different types, and storing the system file images of different types in different specified catalogs.
Step S22: and configuring a DHCP service address field of the server.
Step S23: and executing a boot script in a boot medium through a machine to be installed, and establishing communication connection with the server based on the DHCP service address field.
Step S24: and acquiring a system file image stored in a specified directory in the server based on the communication connection.
In a specific embodiment, the system file image corresponding to the to-be-installed machine stored in the server under a specified directory may be obtained based on the communication connection and the name of the system file image.
That is, in the embodiment of the present application, system file images of the same model are stored in the same directory, but different to-be-installed machines may exist in the same model and correspond to different system file images, so the corresponding system file images may be searched according to names of the images, but it should be noted that, in the same model, a to-be-installed machine having the same system disk size and the same target software (such as triple software) type may only exist in the corresponding directory, and for example, only one system file image may exist in a mirror image of 120-zf under/opt/osupdate, and directories with two names of 120-zf and 120-zf-lx may not exist.
Step S25: and carrying out system installation on the machine to be installed by utilizing the system file mirror image.
For example, referring to fig. 3, the embodiment of the present application discloses a specific schematic diagram of a system installation scheme. Firstly, configuring a service end, comprising the steps of starting network configuration, DHCP service, TFTP service, NFS service and checking whether an appointed directory has image files, if not, uploading again, then inserting a guide medium into a machine to be installed, entering an operation interface, clicking to start restoration, namely, installing a system, if a default network segment of the DHCP service configuration, then automatically establishing communication connection with the service end by the machine to be installed, acquiring a system file image stored in the appointed directory in the service end based on the communication connection, utilizing the system file image to carry out system installation on the machine to be installed, clicking to start restoration without personnel watching, installing a system of the next machine, if the DHCP service configuration is a non-default network segment, inputting a corresponding IP address through the operation interface, establishing connection with the service end, and then carrying out subsequent operation, after the IP address is input, the next machine can be installed without the need of personnel on duty. If the restoration fails, namely the system installation fails, whether the DHCP service address is correct or not can be checked, the IP address in the DHCP service address field of the configured service end can be input again in the operation interface of the machine to be installed, or the DHCP service address field is reconfigured, if the DHCP service has no problem, the TFTP service and the NSF service are checked, and if the TFTP service and the NSF service are checked, the services can still be installed successfully, the services are reinstalled. It should be noted that, in the embodiment of the present application, network filling is performed in a manner similar to system restoration. Although there is a similarity with the PXE, the PXE installation supports the workstation to download the image from the remote server through the network, and thus supports the start of the operating system through the network, during the start process, the terminal requires the server to allocate an IP address, and then uses TFTP or MTFTP (multipoint TFTP service) protocol to download a start software package into the local memory for execution, and the client automation basic software setting is completed by the start software package, thereby booting the terminal operating system pre-installed in the server. But the scheme of the application guides through the guide medium and acquires the system image file to carry out system installation in a mode similar to system restoration. That is, in the PXE installation, the client downloads the file placed at the remote end to the local operation through the network. In the application, the configuration file is started through the optical disc, and the system file image is obtained from the server side so as to install the system.
Referring to fig. 4, an embodiment of the present application discloses a system installation apparatus, including:
the server 11 is used for configuring a DHCP service address field of the server;
the machine to be installed 12 is used for executing the boot script in the boot medium and establishing communication connection with the server based on the DHCP service address field; acquiring a system file image stored in a specified directory in the server based on the communication connection; and carrying out system installation on the machine to be installed by utilizing the system file mirror image.
It can be seen that, in the embodiment of the present application, a DHCP service address field of a server is configured first, then a boot script in a boot medium is executed by a machine to be installed, a communication connection with the server is established based on the DHCP service address field, a system file image stored in an appointed directory in the server is obtained based on the communication connection, and the system file image is utilized to perform system installation on the machine to be installed. Therefore, batch installation of the special machine system is realized, a server can be configured for one time when a plurality of machines are installed, the guide medium can be reused, manpower and material resources are reduced, efficiency is improved, cost is saved, in addition, other external networks and redundant installation packages are not introduced in the installation process, and the safety of system installation is ensured.
In a specific embodiment, the server 11 is specifically configured to configure a DHCP service address segment of the server as a default network segment;
accordingly, the machine to be installed 12 is specifically configured to:
executing a boot script in a boot medium through a machine to be installed, and establishing communication connection with the server by using a default IP address in the boot script;
and the default IP address is the address in the default network segment.
In another specific embodiment, the server 11 is specifically configured to configure a DHCP service address field of the server as a non-default network segment;
correspondingly, the machine 12 to be installed is specifically configured to:
executing a guide script in a guide medium through a machine to be installed to generate an operation interface;
acquiring an IP address input by a user through the operation interface to obtain a target IP address;
establishing communication connection with the server by using the target IP address;
and the target IP address is the address in the non-default network segment.
In a specific embodiment, the machine to be installed 12 is specifically configured to obtain a system file image stored in a specified directory in the server based on the communication connection and the TFTP service and the NFS service deployed in the server.
And the to-be-installed machine 12 is specifically configured to obtain, based on the communication connection and the name of the system file image, the system file image corresponding to the to-be-installed machine stored in the server under the specified directory.
Further, the server 11 is further configured to:
and acquiring system file images of machines to be installed of different types, and storing the system file images of different types in different specified catalogs.
The embodiments are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same or similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The system installation method and device provided by the present application are introduced in detail, and a specific example is applied in the description to explain the principle and the implementation of the present application, and the description of the above embodiment is only used to help understand the method and the core idea of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.