CN110806876A - Slitaz-based lightweight Linux system customization method, device computer equipment and storage medium - Google Patents
Slitaz-based lightweight Linux system customization method, device computer equipment and storage medium Download PDFInfo
- Publication number
- CN110806876A CN110806876A CN201911052351.6A CN201911052351A CN110806876A CN 110806876 A CN110806876 A CN 110806876A CN 201911052351 A CN201911052351 A CN 201911052351A CN 110806876 A CN110806876 A CN 110806876A
- Authority
- CN
- China
- Prior art keywords
- file
- slitaz
- rootfs
- mirror image
- iso
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 40
- 238000003860 storage Methods 0.000 title claims abstract description 21
- 238000011161 development Methods 0.000 claims abstract description 27
- 238000004519 manufacturing process Methods 0.000 claims abstract description 12
- 238000004806 packaging method and process Methods 0.000 claims description 19
- 238000004590 computer program Methods 0.000 claims description 13
- 230000010076 replication Effects 0.000 claims description 4
- 238000012217 deletion Methods 0.000 claims description 2
- 230000037430 deletion Effects 0.000 claims description 2
- 238000012423 maintenance Methods 0.000 abstract description 7
- 238000010586 diagram Methods 0.000 description 15
- 238000004458 analytical method Methods 0.000 description 4
- 230000003287 optical effect Effects 0.000 description 4
- 238000004891 communication Methods 0.000 description 3
- 238000012856 packing Methods 0.000 description 3
- 238000012360 testing method Methods 0.000 description 3
- 238000009826 distribution Methods 0.000 description 2
- 230000006870 function Effects 0.000 description 2
- 238000009434 installation Methods 0.000 description 2
- 238000012545 processing Methods 0.000 description 2
- 230000001172 regenerating effect Effects 0.000 description 2
- 238000004088 simulation Methods 0.000 description 2
- 238000003491 array Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Images
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/40—Transformation of program code
- G06F8/41—Compilation
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Stored Programmes (AREA)
Abstract
The invention relates to a lightweight Linux system customizing method and device based on Slitaz, computer equipment and a storage medium, wherein the method comprises the following steps: building a development environment, and mounting an ISO mirror image of Slitaz in the development environment; manufacturing a target rootfs.gz file according to software to be installed and an ISO mirror image; and manufacturing and releasing an ISO mirror image according to the target rootfs. According to the invention, the software to be installed, which needs to be issued, is added in the Slitaz release ISO mirror image and then packaged into the mirror image file again, so that the Linux release is not needed to be installed, and the compatibility problem of the software in the Linux system can be avoided, thereby greatly improving the working efficiency and reducing the maintenance cost.
Description
Technical Field
The invention relates to the field of system customization, in particular to a lightweight Linux system customization method and device based on Slitaz, computer equipment and a storage medium.
Background
SliTaz is a subminiature release of Linux systems, typically with an image of only about 40M, which can be loaded from an optical disc or USB device, run completely in memory, or be installed in a hard disk. SliTaz is a system with a graphical interface and also has a more sophisticated package manager that can update software packages from the network like Ubuntu, which is not common on small Linux releases.
For application development engineers, the way applications are distributed is always a topic worth discussing. Typically, Windows platform based applications are convenient and can be published directly. However, it is troublesome to publish the application program based on the Linux platform, because one of the applications is that the Linux is published in too many versions, and two major users are not familiar with the Linux system, and when the application program based on the Linux platform is published, the version of the Linux system used by the user needs to be known, different users have different requirements, and a large amount of time and labor cost are spent in a testing and communication link, which causes inconvenience in software release by developers, and meanwhile, the later maintenance cost is high.
Disclosure of Invention
The invention aims to overcome the defects of the prior art and provides a lightweight Linux system customizing method and device based on Slitaz, computer equipment and a storage medium.
In order to achieve the purpose, the invention adopts the following technical scheme: a lightweight Linux system customization method based on Slitaz comprises the following steps:
building a development environment, and mounting an ISO mirror image of Slitaz in the development environment;
manufacturing a target rootfs.gz file according to software to be installed and an ISO mirror image;
and manufacturing and releasing an ISO mirror image according to the target rootfs.
Further, the step of building a development environment and mounting an ISO image of Slitaz in the development environment includes:
installing a virtual machine, and mounting an ISO mirror image of Slitaz in the virtual machine to obtain a master machine with the ISO mirror image installed;
configuring a master machine network to enable the master machine to surf the internet normally;
and updating the parent machine software list and installing a compiling tool chain.
Further, the step of manufacturing the rootfs file system according to the ISO image includes:
creating a rootfsn directory under a master machine;
copying an original rootfs.gz file in an ISO mirror image to a rootfsn directory;
unpacking the original rootfs.gz file to obtain an unpacked file;
gz file to get rootfsn directory containing unpacked file
Copying and installing software to be installed to a rootfsn directory;
and exiting the rootfsn directory and packaging to form a target rootfs.
Further, the step of manufacturing and publishing the ISO image according to the target rootfs.
And packaging the target rootfs.gz file and a Linux kernel to generate an ISO mirror image of the target Linux system.
Further, the building of the development environment comprises, before the step of mounting an ISO image of Slitaz in the development environment:
an ISO image of the Slitaz release was obtained from the official website.
The invention also adopts the following technical scheme: a lightweight Slitaz-based Linux system customization apparatus, comprising:
building a mounting unit for building a development environment and mounting an ISO mirror image of Slitaz in the development environment;
the file making unit is used for making a target rootfs.gz file according to the software to be installed and the ISO mirror image;
and the mirror image making unit is used for making and releasing an ISO mirror image according to the target rootfs.
Furthermore, the building mounting unit comprises an environment building module, a network configuration module and a list updating module;
the environment building module is used for installing a virtual machine and mounting an ISO mirror image of Slitaz in the virtual machine to obtain a master machine with the ISO mirror image;
the network configuration module is used for configuring a network of the master machine so that the master machine can surf the internet normally;
and the list updating module is used for updating the parent machine software list and installing a compiling tool chain.
Furthermore, the file making unit comprises a directory new building module, a file copying module, a file unpacking module, a file deleting module, a software copying module and a file packing module;
the directory creation module is used for creating a rootfsn directory under the master machine;
the file copying module is used for copying an original rootfs.gz file in the ISO mirror image to a rootfsn directory;
the file unpacking module is used for unpacking the original rootfs.gz file to obtain an unpacked file;
the file deleting module is used for deleting the original rootfs.gz file to obtain a rootfsn directory containing the unpacked file;
the software copying module is used for copying and installing software to be installed to the rootfsn directory;
and the file packaging module is used for exiting the rootfsn directory and packaging to form the target rootfs.
The invention also adopts the following technical scheme: a computer device comprising a memory having stored thereon a computer program and a processor that, when executed, implements the Slitaz-based lightweight Linux system customization method of any one of the above.
The invention also adopts the following technical scheme: a storage medium, wherein the storage medium stores a computer program, and the computer program can implement the Slitaz-based lightweight Linux system customization method as described in any one of the above when executed by a processor.
Compared with the prior art, the invention has the beneficial effects that: by adding the to-be-installed software to be issued in the Slitaz release ISO mirror image and then packing the to-be-installed software into the mirror image file again, the Linux release is not required to be installed, the compatibility problem of the software in the Linux system can be avoided, the working efficiency can be greatly improved, and the maintenance cost can be reduced.
The invention is further described below with reference to the accompanying drawings and specific embodiments.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic view of an application scenario of a lightweight Linux system customization method based on Slitaz according to an embodiment of the present invention;
FIG. 2 is a block diagram of an ISO mirror file;
fig. 3 is a schematic flow chart of a lightweight Linux system customization method based on Slitaz according to an embodiment of the present invention;
fig. 4 is a sub-flow diagram of a lightweight Linux system customization method based on Slitaz according to an embodiment of the present invention;
fig. 5 is a sub-flow diagram of a lightweight Linux system customization method based on Slitaz according to an embodiment of the present invention;
FIG. 6 is a schematic block diagram of a Slitaz-based lightweight Linux system customizing apparatus according to another embodiment of the present invention;
fig. 7 is a schematic block diagram of a structure of a building mount unit of a lightweight Linux system customization apparatus based on Slitaz according to an embodiment of the present invention;
fig. 8 is a schematic block diagram of a file making unit of the Slitaz-based lightweight Linux system customizing apparatus according to an embodiment of the present invention;
fig. 9 is a schematic block diagram of a mirror image making unit of a lightweight Linux system customizing apparatus based on Slitaz according to an embodiment of the present invention;
FIG. 10 is a schematic block diagram of a computer device provided by an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It is also to be understood that the terminology used in the description of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in the specification of the present invention and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be further understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
Referring to fig. 1 and fig. 3, fig. 1 is a schematic view of an application scenario of a lightweight Linux system customization method based on Slitaz according to an embodiment of the present invention. Fig. 3 is a schematic flowchart of a lightweight Linux system customization method based on Slitaz according to an embodiment of the present invention. The lightweight Linux system customizing method based on Slitaz is applied to a server, the server and a terminal carry out data interaction, the terminal uploads an ISO mirror image of Slitaz to the server, a development environment is built at the server, the ISO mirror image of Slitaz is mounted in the development environment, a target rootfs.gz file is manufactured according to software to be installed and the ISO mirror image, and an ISO mirror image is manufactured and released according to the target rootfs.gz file.
Linux is a Unix-like operating system which is free to use and spread freely, and is a multi-user, multi-task, multi-thread and multi-CPU supporting operating system based on POSIX and Unix.
Fig. 3 is a schematic flow chart of a lightweight Linux system customization method based on Slitaz according to an embodiment of the present invention. As shown in fig. 3, the method includes the following steps S10 to S30.
And S10, building a development environment, and mounting an ISO mirror image of Slitaz in the development environment.
In this embodiment, SliTaz is a subminiature Linux distribution, the image is generally only about 40M, and it can be loaded from an optical disc or a USB (Universal Serial Bus) device, completely run in a memory, or be installed in a hard disk, referring to fig. 2, it is an analysis diagram of an ISO image file of SliTaz, and the ISO image of SliTaz includes a Linux file system (rootfs) composed of rootfs.
Specifically, before step S10, an ISO image of the Slitaz release version needs to be acquired from the official website. Slitaz officers can download ISO image files directly to Slitaz releases on the web.
According to the scheme, when the required lightweight Linux system is customized according to the ISO mirror image of the Slitaz release, a development environment needs to be built first for further operation on ISO. In the scheme, the virtual machine is installed, further operations such as network configuration, software list updating and the like are performed on the ISO mirror image in the virtual machine, and the ISO mirror image is operated through the virtual machine, so that data backup is facilitated, and operations such as simulation test and the like are performed.
In one embodiment, referring to FIG. 4, step S10 includes steps S11-S13.
And S11, installing the virtual machine, and mounting the ISO mirror image of Slitaz in the virtual machine to obtain a parent machine with the ISO mirror image installed.
In this embodiment, the VirtualBox is installed as an operation virtual machine, the downloaded ISO image of the Slitaz is mounted in the VirtualBox for installation, so as to obtain a parent machine with the installed ISO image, and subsequent further operations are performed based on the parent machine.
And S12, configuring the network of the master machine so that the master machine can surf the internet normally.
In this embodiment, the host network is configured to be able to connect to the internet normally. If software (such as a network card drive) needing compiling is required to be added into the image, the compiling can be completed on the mother machine.
And S13, updating the parent machine software list and installing a compiling tool chain.
In this embodiment, the command "tazpkg recharge" is used to update the software list of the master, and then the software can be normally installed on-line in the master. Installing a compiling tool chain: tazpkg get-install slitaz-toolchain. And finishing compiling and installing the driver needing to be newly compiled on the mother machine, memorizing the command after make install, and copying the processed driver to the place needing to be installed.
And S20, manufacturing a target rootfs.gz file according to the software to be installed and the ISO mirror image.
In this embodiment, referring to fig. 2, an analysis diagram of an ISO image file of SliTaz is shown, where the ISO image of SliTaz includes a Linux file system (rootfs) formed by a rootfs.
Referring to FIG. 5, in one embodiment, step S20 includes steps S21-S26.
And S21, creating a rootfsn directory under the master machine.
And S22, copying the original rootfs.gz file in the ISO mirror image to a rootfsn directory.
In this embodiment, a directory is newly created by using an "mkdir rootfsn" command somewhere under the parent machine, and the original rootfs.
And S23, unpacking the original rootfs.gz file to obtain an unpacked file.
In this embodiment, after the original rootfs.gz file is written into the rootfsn directory, the rootfsn directory is entered, and the rootfs.gz is unpacked by using the command "(zcat rootfs.gz 2>/dev/null | | | lzma d rootfs.gz-so) | cpio-id" to obtain the unpacked file.
And S24, deleting the original rootfs.gz file to obtain a rootfsn directory containing the unpacked file.
In this embodiment, after obtaining the unpacked file of the original rootfs.gz file, the original rootfs.gz file is deleted, and at this time, we obtain a rootfsn directory containing the unpacked file, and switch the root directory by using the command, and the root directory seen thereafter is the previous rootfsn directory. The ip address is retrieved by using the command udhcpc-I eth0 to make the mother set normally connect to the network.
And S25, copying the software to be installed to the rootfsn directory and installing.
In this embodiment, the software to be installed may be Locale-zh _ CN, Qt4, Qt-Locale-zh _ CN or Mysql-client. And copying the compiled software package of the software to be installed to a rootfsn directory, executing the recorded makeinstall output command, and clicking to install the corresponding software.
And S26, exiting the rootfsn directory and packaging to form a target rootfs.
In this embodiment, the rootfsn directory is retired using the "exit" command, and the root directory of the following operation is the root directory of the parent machine. And packaging the unpacked file and the installed software package under the rootfsn directory to form a target rootfs.gz file, the target rootfs.gz file and the installed corresponding software program, obtaining the target rootfs.gz file in an upper layer directory of the rootfsn directory, and further regenerating the usable ISO mirror image file according to the target rootfs.gz file and the Linux kernel.
And S30, manufacturing and releasing an ISO mirror image according to the target rootfs.
In this embodiment, the lightweight customized Linux system based on Slitaz can be obtained by packaging the obtained target rootfs. gz file and a Linux kernel (bzImage), establishing a bootable ISO mirror image using isolinux, and packaging the bootable ISO mirror image into a final ISO mirror image using an mkisofs command, and by adding software to be issued and a corresponding dependency package to the Slitaz release system and then repackaging the ISO mirror image file, the Linux release is not required to be installed, and software compatibility problems caused by the incompatibility of the Linux system are not required to be worried about, so that the work efficiency can be greatly improved, and the maintenance cost can be reduced.
In one embodiment, step S30 includes step S31.
And S31, packaging the target rootfs.gz file and a Linux kernel to generate an ISO mirror image of the target Linux system.
In the implementation, the Linux application program is conveniently released by a method for customizing the Linux system, the finally released ISO mirror image is generally within 100M, and the finally released ISO mirror image can be loaded and operated through a USB flash disk, so that the method is convenient and fast and has good compatibility.
According to the invention, the software to be installed, which needs to be issued, is added in the Slitaz release ISO mirror image and then packaged into the mirror image file again, so that the Linux release is not needed to be installed, and the compatibility problem of the software in the Linux system can be avoided, thereby greatly improving the working efficiency and reducing the maintenance cost.
Fig. 6 is a schematic block diagram of a lightweight Linux system customizing device based on Slitaz according to an embodiment of the present invention. As shown in fig. 6, the invention further provides a lightweight Linux system customizing device based on Slitaz, corresponding to the lightweight Linux system customizing method based on Slitaz. The Slitaz-based lightweight Linux system customization device comprises a unit for executing the Slitaz-based lightweight Linux system customization method, and can be configured in a desktop computer, a tablet computer, a portable computer, and other terminals. Specifically, referring to fig. 6, the lightweight Linux system customizing device based on Slitaz includes a build mount unit 10, a file making unit 20, and an image making unit 30.
And building a mounting unit 10 for building a development environment, and mounting the ISO mirror image of Slitaz in the development environment.
In this embodiment, SliTaz is a subminiature Linux distribution, the mirror image is generally only about 40M, and it can be loaded from an optical disc or a USB device, run completely in a memory, or be installed in a hard disk, and referring to fig. 2, it is an analysis diagram of an ISO mirror image file of SliTaz, and the ISO mirror image of SliTaz includes a Linux file system (rootfs) composed of rootfs. gz files, and a Linux kernel (bzmage), and can be obtained by unpacking ISO.
Before environment construction is carried out, an ISO mirror image of a Slitaz release version is acquired from an official website. Slitaz officers can download ISO image files directly to Slitaz releases on the web.
According to the scheme, when the required lightweight Linux system is customized according to the ISO mirror image of the Slitaz release, a development environment needs to be built first for further operation on ISO. In the scheme, the virtual machine is installed, further operations such as network configuration, software list updating and the like are performed on the ISO mirror image in the virtual machine, and the ISO mirror image is operated through the virtual machine, so that data backup is facilitated, and operations such as simulation test and the like are performed.
In one embodiment, as shown in fig. 7, the building mounting unit 10 includes an environment building module 11, a network configuration module 12 and a list updating module 13.
And the environment building module 11 is used for installing a virtual machine and mounting an ISO mirror image of Slitaz in the virtual machine so as to obtain a master machine installed with the ISO mirror image.
In this embodiment, the VirtualBox is installed as an operation virtual machine, the downloaded ISO image of the Slitaz is mounted in the VirtualBox for installation, so as to obtain a parent machine with the installed ISO image, and subsequent further operations are performed based on the parent machine.
And the network configuration module 12 is used for configuring the network of the master machine so that the master machine can surf the internet normally.
In this embodiment, the host network is configured to be able to connect to the internet normally. If software (such as a network card drive) needing compiling is required to be added into the image, the compiling can be completed on the mother machine.
And the list updating module 13 is used for updating the parent machine software list and installing the compiling tool chain.
In this embodiment, the command "tazpkg recharge" is used to update the software list of the master, and then the software can be normally installed on-line in the master. Installing a compiling tool chain: tazpkg get-install slitaz-toolchain. And finishing compiling and installing the driver needing to be newly compiled on the mother machine, memorizing the command after make install, and copying the processed driver to the place needing to be installed.
And the file making unit 20 is used for making a target rootfs.gz file according to the software to be installed and the ISO mirror image.
In this embodiment, referring to fig. 2, an analysis diagram of an ISO image file of SliTaz is shown, where the ISO image of SliTaz includes a Linux file system (rootfs) formed by a rootfs.
In one embodiment, referring to fig. 8, the file creation unit 20 includes a directory creation module 21, a file replication module 22, a file unpacking module 23, a file deletion module 24, a software replication module 25, and a file packing module 26.
And the directory creation module 21 is used for creating a rootfsn directory under the master machine.
The file copying module 22 is used for copying an original rootfs.
In this embodiment, a directory is newly created by using an "mkdir rootfsn" command somewhere under the parent machine, and the original rootfs.
And the file unpacking module 23 is configured to unpack the original rootfs.gz file to obtain an unpacked file.
In this embodiment, after the original rootfs.gz file is written into the rootfsn directory, the rootfsn directory is entered, and the rootfs.gz is unpacked by using the command "(zcat rootfs.gz 2>/dev/null | | | lzma d rootfs.gz-so) | cpio-id" to obtain the unpacked file.
And the file deleting module 24 is configured to delete the original rootfs.gz file to obtain a rootfsn directory containing the unpacked file.
In this embodiment, after obtaining the unpacked file of the original rootfs.gz file, the original rootfs.gz file is deleted, and at this time, we obtain a rootfsn directory containing the unpacked file, and switch the root directory by using the command, and the root directory seen thereafter is the previous rootfsn directory. The ip address is retrieved by using the command udhcpc-I eth0 to make the mother set normally connect to the network.
And the software copying module 25 is used for copying and installing the software to be installed to the rootfsn directory.
In this embodiment, the software to be installed may be Locale-zh _ CN, Qt4, Qt-Locale-zh _ CN or Mysql-client. And copying the compiled software package of the software to be installed to a rootfsn directory, executing the recorded makeinstall output command, and clicking to install the corresponding software.
And the file packaging module 26 is used for exiting the rootfsn directory and packaging to form the target rootfs.
In this embodiment, the rootfsn directory is retired using the "exit" command, and the root directory of the following operation is the root directory of the parent machine. And packaging the unpacked file and the installed software package under the rootfsn directory to form a target rootfs.gz file, the target rootfs.gz file and the installed corresponding software program, obtaining the target rootfs.gz file in an upper layer directory of the rootfsn directory, and further regenerating the usable ISO mirror image file according to the target rootfs.gz file and the Linux kernel.
And the mirror image making unit 30 is used for making and issuing an ISO mirror image according to the target rootfs.
In this embodiment, the lightweight customized Linux system based on Slitaz can be obtained by packaging the obtained target rootfs. gz file and a Linux kernel (bzImage), establishing a bootable ISO mirror image using isolinux, and packaging the bootable ISO mirror image into a final ISO mirror image using an mkisofs command, and by adding software to be issued and a corresponding dependency package to the Slitaz release system and then repackaging the ISO mirror image file, the Linux release is not required to be installed, and software compatibility problems caused by the incompatibility of the Linux system are not required to be worried about, so that the work efficiency can be greatly improved, and the maintenance cost can be reduced.
In one embodiment, as shown in fig. 9, the mirroring production unit 30 includes a mirroring production module 31.
In the implementation, the Linux application program is conveniently released by a method for customizing the Linux system, the finally released ISO mirror image is generally within 100M, and the finally released ISO mirror image can be loaded and operated through a USB flash disk, so that the method is convenient and fast and has good compatibility.
According to the invention, the software to be installed, which needs to be issued, is added in the Slitaz release ISO mirror image and then packaged into the mirror image file again, so that the Linux release is not needed to be installed, and the compatibility problem of the software in the Linux system can be avoided, thereby greatly improving the working efficiency and reducing the maintenance cost.
It should be noted that, as can be clearly understood by those skilled in the art, for the specific implementation process of the foregoing lightweight Linux system customization apparatus based on Slitaz and each unit, reference may be made to the corresponding description in the foregoing method embodiment, and for convenience and brevity of description, no further description is provided here.
Referring to fig. 10, fig. 10 is a schematic block diagram of a computer device according to an embodiment of the present application. The computer device 500 may be a terminal or a server, where the terminal may be an electronic device with a communication function, such as a smart phone, a tablet computer, a notebook computer, a desktop computer, a personal digital assistant, and a wearable device. The server may be an independent server or a server cluster composed of a plurality of servers.
Referring to fig. 10, the computer device 500 includes a processor 502, memory, and a network interface 505 connected by a system bus 501, where the memory may include a non-volatile storage medium 503 and an internal memory 504.
The non-volatile storage medium 503 may store an operating system 5031 and a computer program 5032. The computer programs 5032 comprise program instructions that, when executed, cause the processor 502 to perform a Slitaz-based lightweight Linux system customization method.
The processor 502 is used to provide computing and control capabilities to support the operation of the overall computer device 500.
The internal memory 504 provides an environment for the execution of the computer program 5032 in the non-volatile storage medium 503, and when the computer program 5032 is executed by the processor 502, the processor 502 can be enabled to execute a lightweight Slitaz-based Linux system customization method.
The network interface 505 is used for network communication with other devices. Those skilled in the art will appreciate that the configuration shown in fig. 10 is a block diagram of only a portion of the configuration relevant to the present teachings and is not intended to limit the computing device 500 to which the present teachings may be applied, and that a particular computing device 500 may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
Wherein the processor 502 is adapted to run a computer program 5032 stored in the memory.
It should be understood that, in the embodiment of the present Application, the Processor 502 may be a Central Processing Unit (CPU), and the Processor 502 may also be other general-purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field-Programmable Gate arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components, and the like. Wherein a general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
It will be understood by those skilled in the art that all or part of the flow of the method implementing the above embodiments may be implemented by a computer program instructing associated hardware. The computer program includes program instructions, and the computer program may be stored in a storage medium, which is a computer-readable storage medium. The program instructions are executed by at least one processor in the computer system to implement the flow steps of the embodiments of the method described above.
Accordingly, the present invention also provides a storage medium. The storage medium may be a computer-readable storage medium.
The storage medium may be a usb disk, a removable hard disk, a Read-Only Memory (ROM), a magnetic disk, or an optical disk, which can store various computer readable storage media.
Those of ordinary skill in the art will appreciate that the elements and algorithm steps of the examples described in connection with the embodiments disclosed herein may be embodied in electronic hardware, computer software, or combinations of both, and that the components and steps of the examples have been described in a functional general in the foregoing description for the purpose of illustrating clearly the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative. For example, the division of each unit is only one logic function division, and there may be another division manner in actual implementation. For example, various elements or components may be combined or may be integrated into another system, or some features may be omitted, or not implemented.
The steps in the method of the embodiment of the invention can be sequentially adjusted, combined and deleted according to actual needs. The units in the device of the embodiment of the invention can be merged, divided and deleted according to actual needs. In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a storage medium. Based on such understanding, the technical solution of the present invention essentially or partially contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a terminal, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention.
While the invention has been described with reference to specific embodiments, the invention is not limited thereto, and various equivalent modifications and substitutions can be easily made by those skilled in the art within the technical scope of the invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.
Claims (10)
1. A lightweight Linux system customization method based on Slitaz is characterized by comprising the following steps:
building a development environment, and mounting an ISO mirror image of Slitaz in the development environment;
manufacturing a target rootfs.gz file according to software to be installed and an ISO mirror image;
and manufacturing and releasing an ISO mirror image according to the target rootfs.
2. The Slitaz-based lightweight Linux system customization method according to claim 1, wherein the step of building a development environment and mounting an ISO mirror of Slitaz in the development environment comprises:
installing a virtual machine, and mounting an ISO mirror image of Slitaz in the virtual machine to obtain a master machine with the ISO mirror image installed;
configuring a master machine network to enable the master machine to surf the internet normally;
and updating the parent machine software list and installing a compiling tool chain.
3. The Slitaz-based lightweight Linux system customization method according to claim 2, wherein the step of making a rootfs file system according to an ISO image comprises:
creating a rootfsn directory under a master machine;
copying an original rootfs.gz file in an ISO mirror image to a rootfsn directory;
unpacking the original rootfs.gz file to obtain an unpacked file;
deleting an original rootfs.gz file to obtain a rootfsn directory containing an unpacked file;
copying and installing software to be installed to a rootfsn directory;
and exiting the rootfsn directory and packaging to form a target rootfs.
4. The Slitaz-based lightweight Linux system customizing method according to claim 3, wherein the step of making the published ISO image according to the target rootfs.
And packaging the target rootfs.gz file and a Linux kernel to generate an ISO mirror image of the target Linux system.
5. The Slitaz-based lightweight Linux system customization method according to claim 1, wherein the building of the development environment comprises, before the step of mounting an ISO image of Slitaz in the development environment:
an ISO image of the Slitaz release was obtained from the official website.
6. A Slitaz-based lightweight Linux system customization device, comprising:
building a mounting unit for building a development environment and mounting an ISO mirror image of Slitaz in the development environment;
the file making unit is used for making a target rootfs.gz file according to the software to be installed and the ISO mirror image;
and the mirror image making unit is used for making and releasing an ISO mirror image according to the target rootfs.
7. The Slitaz-based lightweight Linux system customizing device according to claim 6, wherein the build mounting unit comprises an environment building module, a network configuration unit and a list updating module;
the environment building module is used for installing a virtual machine and mounting an ISO mirror image of Slitaz in the virtual machine to obtain a master machine with the ISO mirror image;
the network configuration module is used for configuring a network of the master machine so that the master machine can surf the internet normally;
and the list updating module is used for updating the parent machine software list and installing a compiling tool chain.
8. The Slitaz-based lightweight Linux system customization device according to claim 6, wherein the file creation unit comprises a directory creation module, a file replication module, a file unpacking module, a file deletion module, a software replication module and a file packaging module,
the directory creation module is used for creating a rootfsn directory under the master machine;
the file copying module is used for copying an original rootfs.gz file in the ISO mirror image to a rootfsn directory;
the file unpacking module is used for unpacking the original rootfs.gz file to obtain an unpacked file;
the file deleting module is used for deleting the original rootfs.gz file to obtain a rootfsn directory containing the unpacked file;
the software copying module is used for copying and installing software to be installed to the rootfsn directory;
and the file packaging module is used for exiting the rootfsn directory and packaging to form the target rootfs.
9. A computer device, characterized in that the computer device comprises a memory and a processor, the memory having stored thereon a computer program which, when executed by the processor, implements the Slitaz-based lightweight Linux system customization method of any one of claims 1-5.
10. A storage medium, characterized in that the storage medium stores a computer program which, when executed by a processor, can implement the Slitaz-based lightweight Linux system customization method according to any one of claims 1 to 5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911052351.6A CN110806876B (en) | 2019-10-31 | 2019-10-31 | Lightweight Linux system customization method based on slit, device computer equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911052351.6A CN110806876B (en) | 2019-10-31 | 2019-10-31 | Lightweight Linux system customization method based on slit, device computer equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110806876A true CN110806876A (en) | 2020-02-18 |
CN110806876B CN110806876B (en) | 2023-12-05 |
Family
ID=69489792
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201911052351.6A Active CN110806876B (en) | 2019-10-31 | 2019-10-31 | Lightweight Linux system customization method based on slit, device computer equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110806876B (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111857729A (en) * | 2020-07-23 | 2020-10-30 | 深圳忆联信息系统有限公司 | Network card drive compiling method and device, computer equipment and storage medium |
CN113885936A (en) * | 2021-08-16 | 2022-01-04 | 统信软件技术有限公司 | Solution method for software package dependence in customized mirror image |
CN113961234A (en) * | 2021-09-29 | 2022-01-21 | 展讯半导体(成都)有限公司 | Construction method and related device of Linux distribution version |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104375867A (en) * | 2014-11-25 | 2015-02-25 | 浪潮电子信息产业股份有限公司 | Method for manufacturing ISO mirror image by customizing Linux system |
WO2019153829A1 (en) * | 2018-02-12 | 2019-08-15 | 人和未来生物科技(长沙)有限公司 | Method and system for rapid generation of container dockerfile and container mirror image |
-
2019
- 2019-10-31 CN CN201911052351.6A patent/CN110806876B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104375867A (en) * | 2014-11-25 | 2015-02-25 | 浪潮电子信息产业股份有限公司 | Method for manufacturing ISO mirror image by customizing Linux system |
WO2019153829A1 (en) * | 2018-02-12 | 2019-08-15 | 人和未来生物科技(长沙)有限公司 | Method and system for rapid generation of container dockerfile and container mirror image |
Non-Patent Citations (2)
Title |
---|
WEIXIN_30293079: "Slitaz定制", pages 1 - 6 * |
茅胜荣等: "用SD卡定制嵌入式Linux系统的最小系统", 《单片机与嵌入式系统应用》, vol. 17, no. 10, pages 22 - 26 * |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111857729A (en) * | 2020-07-23 | 2020-10-30 | 深圳忆联信息系统有限公司 | Network card drive compiling method and device, computer equipment and storage medium |
CN113885936A (en) * | 2021-08-16 | 2022-01-04 | 统信软件技术有限公司 | Solution method for software package dependence in customized mirror image |
CN113961234A (en) * | 2021-09-29 | 2022-01-21 | 展讯半导体(成都)有限公司 | Construction method and related device of Linux distribution version |
Also Published As
Publication number | Publication date |
---|---|
CN110806876B (en) | 2023-12-05 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10642599B1 (en) | Preemptive deployment in software deployment pipelines | |
US12061896B2 (en) | System and method for upgrading kernels in cloud computing environments | |
CN110221860B (en) | Configuration file processing method, device, terminal and medium | |
CN105765534B (en) | Virtual computing system and method | |
US9471365B2 (en) | Techniques for performing virtual machine software upgrades using virtual disk swapping | |
US8489925B1 (en) | System and method for processing of system errors | |
EP4100829A1 (en) | Firmware update patch | |
CN106406960B (en) | A method for rapid software deployment in linux environment | |
CN103530162B (en) | The method and system that the on-line automatic software of a kind of virtual machine is installed | |
CN113986395B (en) | Packaging method for application-dependent self-contained technology under linux system | |
CN110806876A (en) | Slitaz-based lightweight Linux system customization method, device computer equipment and storage medium | |
CN112860251A (en) | Method and system for constructing website front end | |
CN104866324A (en) | Method for constructing portable operating system and portable memorizer | |
CN106569802A (en) | Manufacturing method and manufacturing device of ISO installation mirror images of firewalls | |
CN111273960A (en) | Method for realizing cloud native MIPS architecture container cloud | |
Qin et al. | Nuka: A generic engine with millisecond initialization for serverless computing | |
US10552135B1 (en) | Reducing a size of an application package | |
US20250060959A1 (en) | Software defined build infrastructure for hybrid, virtualized and native build environments | |
CN111857729A (en) | Network card drive compiling method and device, computer equipment and storage medium | |
CN118210518A (en) | Method, device, processor and computer readable storage medium for realizing application cross-center independent deployment control for low-code platform | |
CN111190693A (en) | Method and device for building cloud platform based on Roc platform | |
US12118379B1 (en) | Secure package installation into a target container | |
CN116382713A (en) | Method, system, device and storage medium for constructing application mirror image | |
CN114816475A (en) | An update method, device, device and medium for an embedded operating system | |
CN114880073A (en) | Cloud application engine deployment method, device, equipment and storage medium for shielding Web framework for user |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |