CN112363737B - A system installation method and related device - Google Patents
A system installation method and related device Download PDFInfo
- Publication number
- CN112363737B CN112363737B CN202011346983.6A CN202011346983A CN112363737B CN 112363737 B CN112363737 B CN 112363737B CN 202011346983 A CN202011346983 A CN 202011346983A CN 112363737 B CN112363737 B CN 112363737B
- Authority
- CN
- China
- Prior art keywords
- mirror image
- pxe
- image
- basic system
- installation
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/61—Installation
- G06F8/63—Image based installation; Cloning; Build to order
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/65—Updates
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/70—Software maintenance or management
- G06F8/71—Version control; Configuration management
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computer Security & Cryptography (AREA)
- Stored Programmes (AREA)
Abstract
Description
技术领域Technical Field
本申请涉及计算机技术领域,特别涉及一种系统安装方法、系统安装装置、服务器以及计算机可读存储介质。The present application relates to the field of computer technology, and in particular to a system installation method, a system installation device, a server, and a computer-readable storage medium.
背景技术Background Art
随着信息技术的不断发展,目前计算机对应的服务器设备在越来越多的场景下被应用。因此,在生产制造计算机服务器的过程中,对计算机设备及服务器设备安装系统就成为极为重要的操作。计算机安装系统是SIT(System Integration Testing,系统集成测试)工作中的一个重要且繁琐的工作。通常安装几台机器的系统通过光盘或U盘的方式引导进行安装。如果安装场合变为拥有几十上百台的机房或者工厂生产线安装系统时,不仅需要大量耗材更是使得原本的技术工作变成了重复性体力劳动。同时,多台机器安装时需要安装人员一台一台操作值守,也极大地增加了出错几率和人工成本。With the continuous development of information technology, server equipment corresponding to computers is currently being used in more and more scenarios. Therefore, in the process of manufacturing computer servers, installing the system for computer equipment and server equipment has become an extremely important operation. Computer installation system is an important and tedious task in SIT (System Integration Testing). Usually, the system for installing several machines is installed by guiding the installation through a CD or USB flash drive. If the installation venue becomes a computer room with dozens or hundreds of machines or a factory production line to install the system, not only a large amount of consumables is required, but the original technical work becomes repetitive physical labor. At the same time, when installing multiple machines, the installers need to operate and guard one by one, which greatly increases the probability of errors and labor costs.
相关技术中,产生了PXE(Preboot eXecution Environment,预启动执行环境)安装,是一种无人值守自动安装技术,工作于Client/Server的网络模式,支持工作站通过网络从远端服务器下载映像,并由此支持通过网络启动操作系统,在启动过程中,终端要求服务器分配IP地址,再用TFTP(trivial file transfer protocol,简单文件传输协议)或MTFTP(multicast trivial file transfer protocol,multicast trivial filetransfer protocol,多点简单文件传输协议)协议下载一个启动软件包到本机内存中执行,由这个启动软件包完成终端基本软件设置,从而引导预先安装在服务器中的终端操作系统。但是,现有PXE安装主要存在无法安装ghost镜像的问题。只能采用母盘拷贝的方式来批量安装系统,但是母盘拷贝的方式无法应对复杂的系统更新场景,导致系统安装的效率降低。In the related art, PXE (Preboot eXecution Environment) installation is generated, which is an unattended automatic installation technology, working in the Client/Server network mode, supporting workstations to download images from remote servers through the network, and thus supporting the booting of operating systems through the network. During the boot process, the terminal requires the server to allocate an IP address, and then uses TFTP (trivial file transfer protocol, simple file transfer protocol) or MTFTP (multicast trivial file transfer protocol, multicast trivial filetransfer protocol, multipoint simple file transfer protocol) protocol to download a startup software package to the local memory for execution, and the startup software package completes the basic software settings of the terminal, thereby booting the terminal operating system pre-installed in the server. However, the existing PXE installation mainly has the problem of being unable to install ghost images. The system can only be installed in batches by copying the mother disk, but the mother disk copy method cannot cope with complex system update scenarios, resulting in reduced efficiency of system installation.
因此,如何提高ghost镜像系统安装的效率是本领域技术人员关注的重点问题。Therefore, how to improve the efficiency of ghost mirror system installation is a key issue that those skilled in the art are concerned about.
发明内容Summary of the invention
本申请的目的是提供一种系统安装方法、系统安装装置、服务器以及计算机可读存储介质,通过将ghost镜像和对应的基础系统镜像均设置在PXE服务器,然后再向PXE服务器请求镜像数据,实现了通过PXE服务器进行ghost镜像安装,提高了ghost镜像安装的效率。The purpose of the present application is to provide a system installation method, a system installation device, a server and a computer-readable storage medium. By setting a ghost image and a corresponding basic system image on a PXE server, and then requesting the image data from the PXE server, the ghost image installation is achieved through the PXE server, thereby improving the efficiency of the ghost image installation.
为解决上述技术问题,本申请提供一种系统安装方法,包括:In order to solve the above technical problems, the present application provides a system installation method, comprising:
PXE客户端向PXE服务器发送安装请求,以便所述PXE服务器向所述PXE客户端返回地址信息;其中,所述PXE服务器为已部署ghost镜像和基础系统镜像的服务器;The PXE client sends an installation request to the PXE server, so that the PXE server returns address information to the PXE client; wherein the PXE server is a server on which a ghost image and a basic system image have been deployed;
当所述PXE客户端选择ghost镜像安装时,根据所述地址信息查询所述ghost镜像和所述基础系统镜像;When the PXE client selects the ghost image to install, querying the ghost image and the basic system image according to the address information;
当查询到所述ghost镜像和所述基础系统镜像时,通过PXE协议根据所述ghost镜像和所述基础系统镜像进行系统安装。When the ghost image and the basic system image are found, the system is installed according to the ghost image and the basic system image through the PXE protocol.
可选的,还包括:Optionally, also include:
当查询不到所述ghost镜像和所述基础系统镜像时,通过挂载的所有目录和每个目录对应的目录名称确定目标目录;When the ghost image and the basic system image cannot be found, the target directory is determined by all mounted directories and the directory name corresponding to each directory;
通过PXE协议从所述目标目录获取所述ghost镜像和所述基础系统镜像,并进行系统安装。The ghost image and the basic system image are obtained from the target directory through the PXE protocol, and the system is installed.
可选的,还包括:Optionally, also include:
当确定不到所述目标目录时,将所述ghost镜像和所述基础系统镜像挂载至预设目录下;When the target directory cannot be determined, mounting the ghost image and the basic system image to a preset directory;
通过PXE协议从所述预设目录获取所述ghost镜像和所述基础系统镜像,并进行系统安装。The ghost image and the basic system image are obtained from the preset directory through the PXE protocol, and the system is installed.
可选的,通过PXE协议根据所述ghost镜像和所述基础系统镜像进行系统安装,包括:Optionally, performing system installation according to the ghost image and the basic system image through a PXE protocol includes:
通过PXE协议将所述ghost镜像和所述基础系统镜像下载至所述PXE客户端;Downloading the ghost image and the basic system image to the PXE client through the PXE protocol;
根据所述基础系统镜像进行系统部署启动处理,得到基础系统;Perform system deployment and startup processing according to the basic system image to obtain a basic system;
通过所述基础系统对所述ghost镜像进行系统安装处理。The ghost image is subjected to system installation processing through the basic system.
本申请还提供一种系统安装装置,包括:The present application also provides a system installation device, comprising:
请求发送模块,用于向PXE服务器发送安装请求,以便所述PXE服务器向所述PXE客户端返回地址信息;其中,所述PXE服务器为已部署ghost镜像和基础系统镜像的服务器;A request sending module, used for sending an installation request to a PXE server so that the PXE server returns address information to the PXE client; wherein the PXE server is a server on which a ghost image and a basic system image have been deployed;
镜像查询模块,用于当所述PXE客户端选择ghost镜像安装时,根据所述地址信息查询所述ghost镜像和所述基础系统镜像;An image query module, used for querying the ghost image and the basic system image according to the address information when the PXE client selects the ghost image installation;
镜像安装模块,用于当查询到所述ghost镜像和所述基础系统镜像时,通过PXE协议根据所述ghost镜像和所述基础系统镜像进行系统安装。The image installation module is used to perform system installation according to the ghost image and the basic system image through the PXE protocol when the ghost image and the basic system image are queried.
可选的,还包括:Optionally, also include:
目录查询模块,用于当查询不到所述ghost镜像和所述基础系统镜像时,通过挂载的所有目录和每个目录对应的目录名称确定目标目录;A directory query module, used for determining a target directory through all mounted directories and the directory name corresponding to each directory when the ghost image and the basic system image cannot be queried;
目录镜像安装模块,用于通过PXE协议从所述目标目录获取所述ghost镜像和所述基础系统镜像,并进行系统安装。The directory image installation module is used to obtain the ghost image and the basic system image from the target directory through the PXE protocol and perform system installation.
可选的,还包括:Optionally, also include:
镜像挂载模块,用于当确定不到所述目标目录时,将所述ghost镜像和所述基础系统镜像挂载至预设目录下;An image mounting module, used for mounting the ghost image and the basic system image to a preset directory when the target directory cannot be determined;
挂载镜像安装模块,用于通过PXE协议从所述预设目录获取所述ghost镜像和所述基础系统镜像,并进行系统安装。The mounting image installation module is used to obtain the ghost image and the basic system image from the preset directory through the PXE protocol and perform system installation.
可选的,所述镜像安装模块,包括:Optionally, the image installation module includes:
镜像数据下载单元,用于通过PXE协议将所述ghost镜像和所述基础系统镜像下载至所述PXE客户端;An image data downloading unit, used for downloading the ghost image and the basic system image to the PXE client through the PXE protocol;
基础系统部署单元,用于根据所述基础系统镜像进行系统部署启动处理,得到基础系统;A basic system deployment unit, used to perform system deployment startup processing according to the basic system image to obtain a basic system;
ghost镜像安装单元,用于通过所述基础系统对所述ghost镜像进行系统安装处理。The ghost image installation unit is used to perform system installation processing on the ghost image through the basic system.
本申请还提供一种服务器,包括:The present application also provides a server, comprising:
存储器,用于存储计算机程序;Memory for storing computer programs;
处理器,用于执行所述计算机程序时实现如上所述的系统安装方法的步骤。A processor is used to implement the steps of the system installation method as described above when executing the computer program.
本申请还提供一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现如上所述的系统安装方法的步骤。The present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the system installation method described above are implemented.
本申请所提供的一种系统安装方法,包括:PXE客户端向PXE服务器发送安装请求,以便所述PXE服务器向所述PXE客户端返回地址信息;其中,所述PXE服务器为已部署ghost镜像和基础系统镜像的服务器;当所述PXE客户端选择ghost镜像安装时,根据所述地址信息查询所述ghost镜像和所述基础系统镜像;当查询到所述ghost镜像和所述基础系统镜像时,通过PXE协议根据所述ghost镜像和所述基础系统镜像进行系统安装。A system installation method provided by the present application includes: a PXE client sends an installation request to a PXE server, so that the PXE server returns address information to the PXE client; wherein the PXE server is a server that has deployed a ghost image and a basic system image; when the PXE client selects a ghost image for installation, the ghost image and the basic system image are queried according to the address information; when the ghost image and the basic system image are queried, the system is installed according to the ghost image and the basic system image through the PXE protocol.
通过将ghost镜像和对应的基础系统镜像均设置在PXE服务器,然后再向PXE服务器请求镜像数据,实现了通过PXE服务器进行ghost镜像安装,提高了ghost镜像安装的效率。By setting both the ghost image and the corresponding basic system image on the PXE server and then requesting the image data from the PXE server, the ghost image installation is achieved through the PXE server, thereby improving the efficiency of the ghost image installation.
本申请还提供一种系统安装装置、服务器以及计算机可读存储介质,具有以上有益效果,在此不作赘述。The present application also provides a system installation device, a server and a computer-readable storage medium, which have the above beneficial effects and are not elaborated here.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据提供的附图获得其他的附图。In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are merely embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.
图1为本申请实施例所提供的一种系统安装方法的流程图;FIG1 is a flow chart of a system installation method provided in an embodiment of the present application;
图2为本申请实施例所提供的一种系统安装装置的结构示意图。FIG. 2 is a schematic diagram of the structure of a system installation device provided in an embodiment of the present application.
具体实施方式DETAILED DESCRIPTION
本申请的核心是提供一种系统安装方法、系统安装装置、服务器以及计算机可读存储介质,通过将ghost镜像和对应的基础系统镜像均设置在PXE服务器,然后再向PXE服务器请求镜像数据,实现了通过PXE服务器进行ghost镜像安装,提高了ghost镜像安装的效率。The core of this application is to provide a system installation method, a system installation device, a server and a computer-readable storage medium. By setting the ghost image and the corresponding basic system image on a PXE server, and then requesting the image data from the PXE server, the ghost image installation is realized through the PXE server, thereby improving the efficiency of the ghost image installation.
为使本申请实施例的目的、技术方案和优点更加清楚,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
相关技术中,产生了PXE安装,是一种无人值守自动安装技术,工作于Client/Server的网络模式,支持工作站通过网络从远端服务器下载映像,并由此支持通过网络启动操作系统,在启动过程中,终端要求服务器分配IP地址,再用TFTP或MTFTP协议下载一个启动软件包到本机内存中执行,由这个启动软件包完成终端基本软件设置,从而引导预先安装在服务器中的终端操作系统。但是,现有PXE安装主要存在无法安装ghost镜像的问题。只能采用母盘拷贝的方式来批量安装系统,但是母盘拷贝的方式无法应对复杂的系统更新场景,导致系统安装的效率降低。In the related technology, PXE installation is produced, which is an unattended automatic installation technology that works in the Client/Server network mode. It supports workstations to download images from remote servers through the network, and thus supports booting the operating system through the network. During the startup process, the terminal requires the server to allocate an IP address, and then uses the TFTP or MTFTP protocol to download a startup software package to the local memory for execution. This startup software package completes the basic software settings of the terminal, thereby booting the terminal operating system pre-installed in the server. However, the existing PXE installation mainly has the problem of being unable to install ghost images. The system can only be installed in batches by copying the master disk, but the master disk copy method cannot cope with complex system update scenarios, resulting in reduced efficiency of system installation.
因此,本申请提供一种系统安装方法,通过将ghost镜像和对应的基础系统镜像均设置在PXE服务器,然后再向PXE服务器请求镜像数据,实现了通过PXE服务器进行ghost镜像安装,提高了ghost镜像安装的效率。Therefore, the present application provides a system installation method, which realizes ghost image installation through the PXE server by setting both the ghost image and the corresponding basic system image on the PXE server, and then requesting the image data from the PXE server, thereby improving the efficiency of ghost image installation.
以下通过一个实施例,对本申请提供的一种系统安装方法进行说明。The following describes a system installation method provided by the present application through an embodiment.
请参考图1,图1为本申请实施例所提供的一种系统安装方法的流程图。Please refer to FIG. 1 , which is a flow chart of a system installation method provided in an embodiment of the present application.
本实施例中,该方法可以包括:In this embodiment, the method may include:
S101,PXE客户端向PXE服务器发送安装请求,以便PXE服务器向PXE客户端返回地址信息;其中,PXE服务器为已部署ghost镜像和基础系统镜像的服务器;S101, a PXE client sends an installation request to a PXE server, so that the PXE server returns address information to the PXE client; wherein the PXE server is a server on which a ghost image and a basic system image have been deployed;
可见,本步骤中主要是PXE客户端向PXE服务器发送安装请求。其中,PXE客户端向PXE服务器发送安装请求的过程就是在现有技术中PXE客户端向PXE服务器进行请求的过程。It can be seen that in this step, the PXE client mainly sends an installation request to the PXE server. Among them, the process of the PXE client sending the installation request to the PXE server is the process of the PXE client making a request to the PXE server in the prior art.
其中,PXE也被称为预执行环境,提供了一种使用网络接口(NetworkInterface)启动计算机的机制。这种机制让计算机的启动可以不依赖本地数据存储设备或本地已安装的操作系统。PXE客户端(client)这个术语是指机器在PXE启动过程中的角色。一个PXE客户端(client)可以是一台服务器、桌面级电脑、笔记本电脑或者其他装有PXE启动代码的机器。客户端的固件为接收到可用的PXE启动服务器,要在网络中尝试找出PXE重定向服务。在分析返回的包后,固件会向合适的启动服务器询问网络自检程序(NBP)的路径,并且通过TFTP协议下载到电脑的内存中,有可能会去校验它,最后执行它。Among them, PXE, also known as the pre-execution environment, provides a mechanism for starting a computer using a network interface (NetworkInterface). This mechanism allows the computer to start without relying on local data storage devices or locally installed operating systems. The term PXE client refers to the role of the machine in the PXE boot process. A PXE client can be a server, desktop computer, laptop, or other machine with PXE boot code installed. The client's firmware will try to find the PXE redirection service on the network to receive an available PXE boot server. After analyzing the returned packet, the firmware will ask the appropriate boot server for the path of the network self-test program (NBP), and download it to the computer's memory through the TFTP protocol, and it may be verified and finally executed.
其中,本实施例中的PXE服务器中已经被部署了ghost镜像和基础系统镜像的服务器。其中,ghost镜像是ghost系统进行系统安装时使用的系统镜像文件。ghost系统是指ghost软件在装好的操作系统中进行镜像克隆的版本,通常ghost用于操作系统的备份,在系统不能正常启动的时候用来进行恢复的。ghost工作的基本方法不同于其他的备份软件,它是将硬盘的一个分区或整个硬盘作为一个对象来操作,可以完整复制对象(包括对象的硬盘分区信息、操作系统的引导区信息等等),并打包压缩成为一个映像文件,在需要的时候,又可以把该映像文件恢复到对应的分区或对应的硬盘中。可以提高系统安装的效率,降低系统安装的门槛。Among them, the PXE server in this embodiment has been deployed with the ghost image and the basic system image. Among them, the ghost image is the system image file used by the ghost system when installing the system. The ghost system refers to the version of the ghost software that clones the image in the installed operating system. Usually, ghost is used for the backup of the operating system and for recovery when the system cannot start normally. The basic method of ghost working is different from other backup software. It operates a partition of the hard disk or the entire hard disk as an object, and can completely copy the object (including the hard disk partition information of the object, the boot area information of the operating system, etc.), and package and compress it into an image file. When needed, the image file can be restored to the corresponding partition or the corresponding hard disk. The efficiency of system installation can be improved and the threshold of system installation can be lowered.
而相关技术中仅仅支持普通的系统安装程序,当采用ghost镜像进行安装时,则会出现不兼容的问题。因此,本实施例中,将兼容ghost镜像文件的基础系统也部署在PXE服务器中。以便通过基础系统使用ghost镜像进行系统安装操作。However, the related art only supports ordinary system installation programs, and when ghost images are used for installation, incompatibility issues will occur. Therefore, in this embodiment, a basic system compatible with ghost image files is also deployed in the PXE server, so that the ghost image can be used to perform system installation operations through the basic system.
S102,当PXE客户端选择ghost镜像安装时,根据地址信息查询ghost镜像和基础系统镜像;S102, when the PXE client selects the ghost image installation, query the ghost image and the basic system image according to the address information;
在S101的基础上,本步骤旨在当PXE客户端选择ghost镜像安装时,根据地址信息查询ghost镜像和基础系统镜像。也就是,PXE客户端在多个系统安装模式中选择了ghost镜像安装。那么此时可以通过PXE服务器查询对应的ghost镜像和基础系统镜像。也就是,通过PXE服务器查询到对应的镜像文件,以便采用该镜像文件进行系统安装。Based on S101, this step is intended to query the ghost image and the basic system image according to the address information when the PXE client selects the ghost image installation. That is, the PXE client selects the ghost image installation in multiple system installation modes. Then, the corresponding ghost image and the basic system image can be queried through the PXE server. That is, the corresponding image file is queried through the PXE server so that the image file can be used for system installation.
其中,ghost镜像和基础系统镜像一般被部署在特定的几个目录下。因此,其中查询的过程只需要查询特定的目录下是否挂载镜像数据即可。Among them, ghost images and basic system images are generally deployed in several specific directories. Therefore, the query process only needs to query whether the image data is mounted in a specific directory.
S103,当查询到ghost镜像和基础系统镜像时,通过PXE协议根据ghost镜像和基础系统镜像进行系统安装。S103, when the ghost image and the basic system image are found, the system is installed according to the ghost image and the basic system image through the PXE protocol.
在S102的基础上,本步骤旨在当查询到ghost镜像和基础系统镜像时,通过PXE协议根据ghost镜像和基础系统镜像进行系统安装。也就是,查询到对应的ghost镜像和基础系统镜像时,即可通过PXE的协议获取到的ghost镜像和基础系统镜像的数据。并在本地计算机,即客户端安装的计算机中进行系统安装。Based on S102, this step aims to install the system according to the ghost image and the basic system image through the PXE protocol when the ghost image and the basic system image are queried. That is, when the corresponding ghost image and the basic system image are queried, the data of the ghost image and the basic system image can be obtained through the PXE protocol. And the system is installed in the local computer, that is, the computer installed by the client.
其中,进行系统安装的过程即为采用基础系统镜像先部署对应的基础系统,然后采用基础系统对ghost镜像进行安装。其中,部署基础系统的方式可以采用现有技术提供的任意一种基础系统的部署方式,在此不做具体限定。其中,通过基础系统安装ghost镜像的方式也可以采用现有技术提供的任意一种安装方式,在此不做具体限定。The process of system installation is to first deploy the corresponding basic system using the basic system image, and then install the ghost image using the basic system. The method of deploying the basic system can adopt any one of the basic system deployment methods provided by the prior art, which is not specifically limited here. The method of installing the ghost image through the basic system can also adopt any one of the installation methods provided by the prior art, which is not specifically limited here.
进一步的,为了将ghost镜像进行适配,本步骤中进行系统安装的过程可以包括:Furthermore, in order to adapt the ghost image, the process of system installation in this step may include:
步骤1,通过PXE协议将ghost镜像和基础系统镜像下载至PXE客户端;Step 1: Download the ghost image and the basic system image to the PXE client through the PXE protocol;
步骤2,根据基础系统镜像进行系统部署启动处理,得到基础系统;Step 2: Perform system deployment and startup processing according to the basic system image to obtain the basic system;
步骤3,通过基础系统对ghost镜像进行系统安装处理。Step 3: Install the ghost image using the base system.
可见,本可选方案中主要是如何进行系统安装的过程进行说明。本可选方案中首先通过PXE协议将ghost镜像和基础系统镜像下载至PXE客户端;然后,根据基础系统镜像进行系统部署启动处理,得到基础系统;最后,通过基础系统对ghost镜像进行系统安装处理。实现了对ghost镜像的安装过程,提高了ghost镜像的安装效率。It can be seen that this optional solution mainly describes how to install the system. In this optional solution, the ghost image and the basic system image are first downloaded to the PXE client through the PXE protocol; then, the system deployment and startup processing is performed according to the basic system image to obtain the basic system; finally, the ghost image is installed through the basic system. The installation process of the ghost image is realized, and the installation efficiency of the ghost image is improved.
进一步的,为了避免出现PXE服务器卡顿的问题,本实施例还可以包括:Furthermore, in order to avoid the problem of PXE server freezing, this embodiment may also include:
步骤1,当查询不到ghost镜像和基础系统镜像时,通过挂载的所有目录和每个目录对应的目录名称确定目标目录;Step 1: When the ghost image and the basic system image cannot be found, the target directory is determined by all mounted directories and the directory name corresponding to each directory;
步骤2,通过PXE协议从目标目录获取ghost镜像和基础系统镜像,并进行系统安装。Step 2: Obtain the ghost image and basic system image from the target directory through the PXE protocol and install the system.
可见,本可选方案中主要是说明当查询不到ghost镜像和基础系统镜像时如何进行操作。相关技术中,当查询不到ghost镜像和基础系统镜像时会出现卡顿情况。因此,本可选方案中通过挂载的所有目录和每个目录对应的目录名称确定目标目录;然后,通过PXE协议从目标目录获取ghost镜像和基础系统镜像,并进行系统安装。也就是,通过挂载的所有目录以及对应的目录名称确定到设置有镜像数据的目标目录,然后通过PXE协议从目标目录中获取到对应的镜像数据。It can be seen that this optional solution mainly explains how to operate when the ghost image and the basic system image cannot be queried. In the related art, a freeze occurs when the ghost image and the basic system image cannot be queried. Therefore, in this optional solution, the target directory is determined by all mounted directories and the directory name corresponding to each directory; then, the ghost image and the basic system image are obtained from the target directory through the PXE protocol, and the system is installed. That is, the target directory with the image data is determined through all mounted directories and the corresponding directory names, and then the corresponding image data is obtained from the target directory through the PXE protocol.
进一步的,为了避免出现PXE服务器卡顿的问题,本实施例还可以包括:Furthermore, in order to avoid the problem of PXE server freezing, this embodiment may also include:
步骤1,当确定不到目标目录时,将ghost镜像和基础系统镜像挂载至预设目录下;Step 1: When the target directory cannot be determined, mount the ghost image and the basic system image to the preset directory;
步骤2,通过PXE协议从预设目录获取ghost镜像和基础系统镜像,并进行系统安装。Step 2: Obtain the ghost image and basic system image from the preset directory through the PXE protocol, and install the system.
可见,本可选方案主要是说明当确定不到目标目录时如何进行操作。本可选方案中当确定不到目标目录时主要采用主动挂载镜像文件的方式,获取到镜像文件。具体的,当确定不到目标目录时,首先,将ghost镜像和基础系统镜像挂载至预设目录下;然后,通过PXE协议从预设目录获取ghost镜像和基础系统镜像,并进行系统安装。It can be seen that this optional solution mainly explains how to operate when the target directory cannot be determined. In this optional solution, when the target directory cannot be determined, the image file is mainly obtained by actively mounting the image file. Specifically, when the target directory cannot be determined, first, the ghost image and the basic system image are mounted to the preset directory; then, the ghost image and the basic system image are obtained from the preset directory through the PXE protocol, and the system is installed.
综上,本实施例通过将ghost镜像和对应的基础系统镜像均设置在PXE服务器,然后再向PXE服务器请求镜像数据,实现了通过PXE服务器进行ghost镜像安装,提高了ghost镜像安装的效率。In summary, this embodiment realizes ghost image installation through the PXE server by setting both the ghost image and the corresponding basic system image on the PXE server and then requesting the image data from the PXE server, thereby improving the efficiency of ghost image installation.
以下通过一个具体的实施例,对本申请提供的一种系统安装方法做进一步说明。The following is a specific example to further illustrate a system installation method provided by the present application.
本实施例中,首先对各个设备进行设置。其中,被安装系统机器的网卡需要支持PXE协议,且主板支持网络引导。需要有一台DHCP服务器为客户机自动分配地址、指定引导文件位置。服务器通过TFTP协议,提供引导镜像文件的下载。In this embodiment, each device is first set up. Among them, the network card of the system machine to be installed needs to support the PXE protocol, and the motherboard needs to support network booting. A DHCP server is required to automatically assign addresses to clients and specify the location of boot files. The server provides downloading of boot image files through the TFTP protocol.
首先将两个镜像上传PXE服务器。然后,被安装机器PXE启动,选择基础系统引导。通过PXE服务器进行ghost安装,一般挂载在media下,如果没有找到,可以在终端中输入sudo su获取权限,然后输入df–Th查看挂载目录和目录名字,如果还没有可通过mount/dev/sdb/mnt手动将镜像所在目录挂载到/mnt目录下。最后,随后便无需人员值守,去安装下一台即可。据现场检验,一名工作人员可同时安装12台机器。First, upload the two images to the PXE server. Then, the machine to be installed starts with PXE, and the basic system is selected for booting. Ghost installation is performed through the PXE server, and is generally mounted under media. If it is not found, you can enter sudo su in the terminal to obtain permissions, and then enter df-Th to view the mount directory and directory name. If it is not available, you can manually mount the directory where the image is located to the /mnt directory through mount/dev/sdb/mnt. Finally, there is no need for personnel to be on duty, and you can install the next one. According to on-site inspections, one staff member can install 12 machines at the same time.
可见,本实施例可以通过将ghost镜像和对应的基础系统镜像均设置在PXE服务器,然后再向PXE服务器请求镜像数据,实现了通过PXE服务器进行ghost镜像安装,提高了ghost镜像安装的效率。It can be seen that this embodiment can realize ghost image installation through the PXE server by setting both the ghost image and the corresponding basic system image on the PXE server and then requesting the image data from the PXE server, thereby improving the efficiency of ghost image installation.
下面对本申请实施例提供的系统安装装置进行介绍,下文描述的系统安装装置与上文描述的系统安装方法可相互对应参照。The following is an introduction to the system installation device provided in the embodiment of the present application. The system installation device described below and the system installation method described above can be referenced to each other.
请参考图2,图2为本申请实施例所提供的一种系统安装装置的结构示意图。Please refer to FIG. 2 , which is a schematic diagram of the structure of a system installation device provided in an embodiment of the present application.
本实施例中,该方法可以包括:In this embodiment, the method may include:
请求发送模块100,用于向PXE服务器发送安装请求,以便PXE服务器向PXE客户端返回地址信息;其中,PXE服务器为已部署ghost镜像和基础系统镜像的服务器;The request sending module 100 is used to send an installation request to the PXE server so that the PXE server returns address information to the PXE client; wherein the PXE server is a server on which the ghost image and the basic system image have been deployed;
镜像查询模块200,用于当PXE客户端选择ghost镜像安装时,根据地址信息查询ghost镜像和基础系统镜像;The image query module 200 is used to query the ghost image and the basic system image according to the address information when the PXE client selects the ghost image installation;
镜像安装模块300,用于当查询到ghost镜像和基础系统镜像时,通过PXE协议根据ghost镜像和基础系统镜像进行系统安装。The image installation module 300 is used to perform system installation according to the ghost image and the basic system image through the PXE protocol when the ghost image and the basic system image are queried.
可选的,该装置还可以包括:Optionally, the device may further include:
目录查询模块,用于当查询不到ghost镜像和基础系统镜像时,通过挂载的所有目录和每个目录对应的目录名称确定目标目录;The directory query module is used to determine the target directory through all mounted directories and the directory name corresponding to each directory when the ghost image and the basic system image cannot be found;
目录镜像安装模块,用于通过PXE协议从目标目录获取ghost镜像和基础系统镜像,并进行系统安装。The directory image installation module is used to obtain the ghost image and basic system image from the target directory through the PXE protocol and perform system installation.
可选的,该装置还可以包括:Optionally, the device may further include:
镜像挂载模块,用于当确定不到目标目录时,将ghost镜像和基础系统镜像挂载至预设目录下;The image mounting module is used to mount the ghost image and the basic system image to the preset directory when the target directory cannot be determined;
挂载镜像安装模块,用于通过PXE协议从预设目录获取ghost镜像和基础系统镜像,并进行系统安装。The mount image installation module is used to obtain the ghost image and basic system image from the preset directory through the PXE protocol and perform system installation.
可选的,该镜像安装模块300,包括:Optionally, the image installation module 300 includes:
镜像数据下载单元,用于通过PXE协议将ghost镜像和基础系统镜像下载至PXE客户端;An image data downloading unit, used for downloading the ghost image and the basic system image to the PXE client through the PXE protocol;
基础系统部署单元,用于根据基础系统镜像进行系统部署启动处理,得到基础系统;A basic system deployment unit, used to perform system deployment and startup processing according to the basic system image to obtain a basic system;
ghost镜像安装单元,用于通过基础系统对ghost镜像进行系统安装处理。The ghost image installation unit is used to perform system installation processing on the ghost image through the basic system.
本申请实施例还提供一种服务器,包括:The present application also provides a server, including:
存储器,用于存储计算机程序;Memory for storing computer programs;
处理器,用于执行所述计算机程序时实现如以上实施例所述的系统安装方法的步骤。A processor is used to implement the steps of the system installation method as described in the above embodiment when executing the computer program.
本申请实施例还提供一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现如以上实施例所述的系统安装方法的步骤。An embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the system installation method described in the above embodiment are implemented.
说明书中各个实施例采用递进的方式描述,每个实施例重点说明的都是与其他实施例的不同之处,各个实施例之间相同相似部分互相参见即可。对于实施例公开的装置而言,由于其与实施例公开的方法相对应,所以描述的比较简单,相关之处参见方法部分说明即可。The various embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
专业人员还可以进一步意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、计算机软件或者二者的结合来实现,为了清楚地说明硬件和软件的可互换性,在上述说明中已经按照功能一般性地描述了各示例的组成及步骤。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
结合本文中所公开的实施例描述的方法或算法的步骤可以直接用硬件、处理器执行的软件模块,或者二者的结合来实施。软件模块可以置于随机存储器(RAM)、内存、只读存储器(ROM)、电可编程ROM、电可擦除可编程ROM、寄存器、硬盘、可移动磁盘、CD-ROM、或技术领域内所公知的任意其它形式的存储介质中。The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
以上对本申请所提供的一种系统安装方法、系统安装装置、服务器以及计算机可读存储介质进行了详细介绍。本文中应用了具体个例对本申请的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本申请的方法及其核心思想。应当指出,对于本技术领域的普通技术人员来说,在不脱离本申请原理的前提下,还可以对本申请进行若干改进和修饰,这些改进和修饰也落入本申请权利要求的保护范围内。The above is a detailed introduction to a system installation method, a system installation device, a server, and a computer-readable storage medium provided by the present application. Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and core idea of the present application. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the scope of protection of the claims of the present application.
Claims (4)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011346983.6A CN112363737B (en) | 2020-11-26 | 2020-11-26 | A system installation method and related device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011346983.6A CN112363737B (en) | 2020-11-26 | 2020-11-26 | A system installation method and related device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112363737A CN112363737A (en) | 2021-02-12 |
CN112363737B true CN112363737B (en) | 2024-09-17 |
Family
ID=74532849
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011346983.6A Active CN112363737B (en) | 2020-11-26 | 2020-11-26 | A system installation method and related device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112363737B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113407201A (en) * | 2021-06-24 | 2021-09-17 | 浪潮电子信息产业股份有限公司 | System installation method and device |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102843397A (en) * | 2011-06-23 | 2012-12-26 | 神讯电脑(昆山)有限公司 | Distributed system and distributed method for automatically copying hard disk |
CN103546492A (en) * | 2013-11-14 | 2014-01-29 | 国家电网公司 | An unattended installation system and method |
Family Cites Families (17)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8918587B2 (en) * | 2012-06-13 | 2014-12-23 | International Business Machines Corporation | Multilevel cache hierarchy for finding a cache line on a remote node |
CN104679537A (en) * | 2013-11-28 | 2015-06-03 | 英业达科技有限公司 | System and method for using mirror images to establish bootable storage device |
CN103984575A (en) * | 2014-05-28 | 2014-08-13 | 浪潮电子信息产业股份有限公司 | Rapid deployment method of cluster Linux operation system in cloud-computing environment |
CN104219099A (en) * | 2014-09-25 | 2014-12-17 | 浪潮(北京)电子信息产业有限公司 | Automatic server cluster deploying method and device |
CN105094929A (en) * | 2015-09-07 | 2015-11-25 | 浪潮(北京)电子信息产业有限公司 | PXE based linux operating system installation method and system |
US10372464B2 (en) * | 2016-06-22 | 2019-08-06 | Western Digital Technologies, Inc. | Provisioning the hyper-converged infrastructure bare metal systems from the top of the rack switch |
CN106506587B (en) * | 2016-09-23 | 2021-08-06 | 中国人民解放军国防科学技术大学 | A Docker image download method based on distributed storage |
CN106484437A (en) * | 2016-11-10 | 2017-03-08 | 广东浪潮大数据研究有限公司 | A kind of method of deployment operation system, apparatus and system |
CN106776128B (en) * | 2016-11-29 | 2020-04-21 | 邦彦技术股份有限公司 | Method for ensuring normal start of Linux operating system |
CN106855819B (en) * | 2017-01-01 | 2020-05-22 | 国云科技股份有限公司 | A method of automatically deploying an operating system |
CN107315617A (en) * | 2017-06-30 | 2017-11-03 | 郑州云海信息技术有限公司 | A kind of method and device of auto-filling mirror image |
CN108769267B (en) * | 2018-07-12 | 2021-10-01 | 成都傲梅科技有限公司 | Method for booting ISO and WIM image files in PXE protocol-based network starting mode |
CN110134496A (en) * | 2019-05-22 | 2019-08-16 | 中国联合网络通信集团有限公司 | Container monitoring method, device, equipment and computer-readable storage medium |
CN110489134B (en) * | 2019-07-26 | 2022-10-25 | 苏州浪潮智能科技有限公司 | A method and system for deploying a PXE server and a high-performance cluster environment |
CN110673992B (en) * | 2019-09-16 | 2022-06-03 | 苏州浪潮智能科技有限公司 | Multi-mirror image fusion self-starting method and system |
CN110955494B (en) * | 2019-11-15 | 2022-04-22 | 北京浪潮数据技术有限公司 | Virtual machine disk image construction method, device, equipment and medium |
CN111966463B (en) * | 2020-08-18 | 2025-02-28 | 江苏安超云软件有限公司 | A method, device, storage medium and electronic device for building a container image |
-
2020
- 2020-11-26 CN CN202011346983.6A patent/CN112363737B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102843397A (en) * | 2011-06-23 | 2012-12-26 | 神讯电脑(昆山)有限公司 | Distributed system and distributed method for automatically copying hard disk |
CN103546492A (en) * | 2013-11-14 | 2014-01-29 | 国家电网公司 | An unattended installation system and method |
Also Published As
Publication number | Publication date |
---|---|
CN112363737A (en) | 2021-02-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2021217871A1 (en) | Method and apparatus for deploying micro service cluster, computer device and storage medium | |
US9465625B2 (en) | Provisioning of operating environments on a server in a networked environment | |
RU2417415C2 (en) | Method and system for deploying software, software deployment server and user server | |
US7139816B2 (en) | Method, apparatus, and program for server based network computer load balancing across multiple boot servers | |
US6810478B1 (en) | System for remote booting of muntliple operating systems using chained bootstrap mechanism in a network | |
US7802084B2 (en) | System and method for management and installation of operating system images for computers | |
US8037198B2 (en) | Firmware upgrade for thin clients using one or more servers | |
CN101917452B (en) | Platform discovery in a pre-boot environment using web services | |
US8346886B2 (en) | System, method, and medium for configuring client computers to operate disconnected from a server computer while using a master instance of the operating system | |
CN101344852A (en) | A method, device and system for deploying WINDOWS enterprise edition operating system | |
US20140129819A1 (en) | Cloud cluster system and boot deployment method for the same | |
US20040221146A1 (en) | Build time dynamic installation of drivers on cloned systems | |
CN105159704A (en) | Method and apparatus for batch deployment of operation systems | |
CN104394223A (en) | Automatic rapid deployment method for large-scale computer cluster system nodes | |
CN114115917A (en) | Operating system installation method and device | |
CN105183529A (en) | Method for refreshing server firmware, target server, source server and system | |
CN107360042A (en) | A kind of server management method and device | |
CN107566518A (en) | The method and apparatus of management equipment information during installation file | |
CN112363737B (en) | A system installation method and related device | |
CN110633086B (en) | Blade server | |
CN115333933B (en) | Automatic management method, medium and equipment for servers on machine room | |
JP2006338225A (en) | Automatic installation method of computer | |
CN113407201A (en) | System installation method and device | |
CN107172161A (en) | A kind of method of rapid installing operating system, client and server cluster | |
CN100397338C (en) | Software installation system and method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |