Software installation and deployment method and device for Linux system
By adopting standardized packaging and deployment methods under Linux systems, the high cost problems caused by different installation and deployment methods of different users are solved, and fast and efficient software installation and deployment are achieved.
Patent Information
- Application Number
- CN202411729125.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-28
- Publication Date
- 2025-03-21
AI Technical Summary
Under Linux systems, the installation and deployment methods of self-developed software executable programs are different, resulting in high deployment time cost.
The software is packaged using a standardized packaging process, and the software installation package is deployed in different target machines of the Linux system according to the same standardized deployment method.
Through standardized packaging and deployment methods, the installation and deployment of software installation packages can be quickly realized, which improves installation and deployment efficiency and saves labor costs.
Smart Images

Figure CN119668632A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of software standardization deployment, and in particular to a software installation and deployment method and device for a Linux system. Background Art
[0002] As Linux systems are increasingly used, the amount of software development work under Linux systems has also increased. Currently, when self-developed software executable programs are installed and deployed on target machines under Linux systems, different users have different installation and deployment methods, resulting in high deployment time costs. Summary of the invention
[0003] The present invention provides a method and device for software installation and deployment in a Linux system. The technical solution is as follows:
[0004] On the one hand, a software installation and deployment method for a Linux system is provided, the method comprising:
[0005] Package according to the standardized packaging process to obtain the software installation package;
[0006] In different target machines of the Linux system, in response to the installation deployment instruction, the software installation package is deployed in the different target machines according to the same standardized deployment method.
[0007] On the other hand, a software installation and deployment device for a Linux system is provided, the device comprising:
[0008] A packaging unit, used to package according to a standardized packaging process to obtain a software installation package;
[0009] The deployment unit is used to deploy the software installation package in different target machines of the Linux system in response to the installation deployment instruction and according to the same standardized deployment method.
[0010] On the other hand, a computer device is provided, which includes a memory and a processor, wherein the memory is used to store computer programs, and the processor is used to execute the computer programs stored in the memory to implement the steps of the above-mentioned software installation and deployment method for Linux systems.
[0011] On the other hand, a computer-readable storage medium is provided, wherein a computer program is stored in the storage medium, and when the computer program is executed by a processor, the steps of the software installation and deployment method for the Linux system are implemented.
[0012] On the other hand, a computer program product is provided, including a computer program, which implements the steps of the above-mentioned software installation and deployment method for Linux system when executed by a processor.
[0013] The technical solution provided by the present invention can at least bring the following beneficial effects:
[0014] By packaging according to a standardized packaging process, the software installation package can be quickly packaged, and because it is a standardized packaging process, it is convenient for subsequent installation and deployment to be performed in the same standardized deployment method. In different target machines of the Linux system, the same standardized deployment method can be used to quickly implement the installation and deployment of the software installation package, thereby improving the installation and deployment efficiency, and the automated installation and deployment method can save labor costs. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] In order to more clearly illustrate the embodiments of the present invention 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 some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0016] Figure 1 This is a flow chart of a software installation and deployment method for a Linux system provided by an embodiment of the present invention;
[0017] Figure 2 This is a structural diagram of a software installation and deployment device for a Linux system provided by an embodiment of the present invention;
[0018] Figure 3 It is a hardware architecture diagram of a computer device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0019] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0020] Please refer to Figure 1 , an embodiment of the present invention provides a software installation and deployment method for a Linux system, the method comprising:
[0021] Step 100, packaging according to a standardized packaging process to obtain a software installation package;
[0022] Step 102: In different target machines of the Linux system, in response to the installation and deployment instructions, the software installation package is deployed in different target machines according to the same standardized deployment method.
[0023] In the embodiment of the present invention, by packaging according to a standardized packaging process, the software installation package can be quickly packaged, and because it is a standardized packaging process, it is convenient for subsequent installation and deployment to be performed according to the same standardized deployment method. In different target machines of the Linux system, the same standardized deployment method can be used to quickly implement the installation and deployment of the software installation package, thereby improving the installation and deployment efficiency, and the automated installation and deployment method can save labor costs.
[0024] Described below Figure 1 How the various steps are performed.
[0025] First, with respect to step 100, packaging is performed according to a standardized packaging process to obtain a software installation package.
[0026] In one embodiment of the present invention, the packaging according to the standardized packaging process specifically includes:
[0027] A1: Get the input application name;
[0028] You can use the project name as the application name, or you can customize the application name. This name will be used as the executable program's corresponding desktop shortcut, start menu shortcut, installation directory folder name, and installation file name.
[0029] A2: Get the input application version;
[0030] In the embodiment of the present invention, the version of the current executable program needs to be specified, and the version information will be written into the attribute information of the executable software and will be consistent with the actual version of the software. The version information will also be used as one of the information fields to synthesize the installation file name.
[0031] A3: Get the input application publisher;
[0032] Specifies the publisher of the current software, usually the name of the company, team, or designer. This information will be written into the property information of the executable software and will be consistent with the actual publisher of the software.
[0033] A4: Determine the binary file of the selected executable program;
[0034] In the embodiment of the present invention, it is necessary to select an executable program file that has been compiled and tested and will serve as the execution entry of the software after installation.
[0035] A5: Identify other files and directories required for the application to run;
[0036] In the embodiment of the present invention, other files or entire file directories required for the application to run can be selected. Common ones include configuration files, data files, authorization files, etc. And specify the topological structure of these files or file directories under the installation directory or the specified location of the target machine file system, which depends on the design of the developer. This process is particularly important for the correct operation of the software. It is necessary to ensure that all necessary files or file directories are selected, and at the same time, unnecessary files or file directories should be avoided as much as possible to make the installation package simple and small.
[0037] A6: Query the dependent library files of the executable program;
[0038] In one implementation, the script ldd command is used to query the dependent library files of the executable program. By querying the dependent library files required for the executable program to run, all dependent libraries are found and copied to the directory where the executable program is located, so that the environment variables can be set when the executable program runs. Be sure to select all necessary dependent library files, and even query the library files corresponding to the secondary dependencies of the dependent library.
[0039] A7: The information obtained above is formed into a script file, and the script file is packaged with the binary file of the executable program, the executable program's dependent library files, and other files required for the application program to run, to obtain a software installation package.
[0040] In one implementation, the suffix of the software installation package is .run.
[0041] In an embodiment of the present invention, by packaging the software according to the above-mentioned standardized packaging process, it can be ensured that all dependent library files required for the execution of the executable program are collected, so that the executable program can be directly run in a target machine that does not have a related development environment installed; in addition, it can also be ensured that all other supporting files or file directories required for the execution of the executable program, such as configuration files, data files, authorization files, etc., are collected, so that the executable program can run correctly on the target machine.
[0042] Then, for step 102, in different target machines of the Linux system, in response to the installation deployment instruction, the software installation package is deployed in different target machines according to the same standardized deployment method.
[0043] In one embodiment of the present invention, deploying the software installation package in different target machines according to the same standardized deployment method may specifically include:
[0044] The software installation and deployment methods in each target machine are:
[0045] B1: In response to the software installation package selection instruction, determine the software installation package to be installed and deployed in the Linux system;
[0046] The software installation package is packaged according to the above-mentioned standardized packaging process.
[0047] B2: In response to the installation directory selection instruction, determining the installation directory of the software installation package in the Linux system;
[0048] In the embodiment of the present invention, the user can choose whether to customize the software installation directory. If the user chooses to customize the installation directory, the corresponding installation directory is input or selected; if the user does not customize the software installation directory, the software is installed to the path / home / ${USER} by default.
[0049] B3: In response to the installation start instruction, start the binary file of the executable program in the installation directory;
[0050] In the embodiment of the present invention, an execution script can be designed for the executable program to realize a general program entry. The startup script can involve cd to a specified directory and start the binary file of the executable program in the current directory. If the functions involved are property setting, path change, resource call, and software watchdog, they can all be implemented in the startup script.
[0051] B4: Responding to the software permission setting instruction, obtaining the setting result of the installed software permission, creating a corresponding desktop shortcut, and adding the installed software to the startup items.
[0052] In the embodiment of the present invention, the user can specify the permissions required for software execution. Usually, the software can be executed normally under non-root user permissions, but in some special cases, such as underlying hardware interface calls, root (super user) permissions are required for correct execution. If the user specifies root permissions, the root user login process is added to the executable program startup script.
[0053] In the embodiment of the present invention, a desktop shortcut can be created for the software so that the user can correctly start the software by double-clicking the shortcut. In the Linux system, the desktop shortcut is a script file with a .desktop suffix, which sets the software's icon, version, publisher and other information, and specifies an executable program startup script as a startup link.
[0054] In the embodiment of the present invention, for some special application scenarios, such as embedded systems, it is usually required that the software is automatically loaded and run after the hardware is powered on. For the Linux system, the created software shortcut can be added to the system's startup items. This process is not necessary and can be selected by the launcher.
[0055] In the embodiment of the present invention, the software installation package is installed and deployed through the above-mentioned standardized deployment method, which can simplify the installation and deployment process and facilitate the "one-click" operation of software delivery personnel; and the software can be correctly started after the installation is completed, and user permissions are fully considered.
[0056] Please refer to Figure 2 The embodiment of the present invention provides a software installation and deployment device for a Linux system, the device comprising:
[0057] The packaging unit 200 is used to package the software according to the standardized packaging process to obtain a software installation package;
[0058] The deployment unit 202 is used to deploy the software installation package in different target machines of the Linux system in response to the installation deployment instruction and according to the same standardized deployment method.
[0059] In one embodiment of the present invention, the packaging unit is specifically used to: obtain an input application name; obtain an input application version; obtain an input application publisher; determine the binary file of the selected executable program; determine other files and directories required for the application to run; query the dependent library files of the executable program; form the above-obtained information into a script file, and package the script file with the binary file of the executable program, the executable program dependent library files, and other files required for the application to run, to obtain a software installation package.
[0060] In one embodiment of the present invention, the dependent library files of the executable program are queried through the script ldd instruction.
[0061] In one embodiment of the present invention, the deployment unit is specifically used to: the software installation and deployment method in each target machine is: in response to a software installation package selection instruction, determine the software installation package that needs to be installed and deployed in the Linux system; in response to an installation directory selection instruction, determine the installation directory of the software installation package in the Linux system; in response to an installation start instruction, start the binary file of the executable program in the installation directory; in response to a software permission setting instruction, obtain the setting result of the installed software permissions, create a corresponding desktop shortcut, and add the installed software to the startup items.
[0062] It should be noted that: the software installation and deployment device for Linux system provided in the above embodiment is only illustrated by the division of the above functional modules. In actual application, the above functional distribution can be completed by different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the software installation and deployment device for Linux system provided in the above embodiment and the software installation and deployment method embodiment for Linux system belong to the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.
[0063] The embodiment of the present application also provides a computer device, please refer to Figure 3 The computer device includes a processor and a memory, in which at least one instruction, at least one program, code set or instruction set is stored, and the at least one instruction, at least one program, code set or instruction set is loaded and executed by the processor to implement the software installation and deployment method for the Linux system provided by the above-mentioned method embodiments.
[0064] An embodiment of the present application also provides a computer-readable storage medium, on which is stored at least one instruction, at least one program, code set or instruction set, and the at least one instruction, at least one program, code set or instruction set is loaded and executed by a processor to implement the software installation and deployment method for a Linux system provided by the above-mentioned method embodiments.
[0065] An embodiment of the present application also provides a computer program product, which includes a computer program. A processor of a computer device reads the computer program from a computer-readable storage medium, and the processor executes the computer program, so that the computer device executes the software installation and deployment method for a Linux system described in any of the above embodiments.
[0066] For the convenience of description, the above system or device is described by dividing it into various modules or units according to its functions. Of course, when implementing the present application, the functions of each unit can be implemented in the same or multiple software and / or hardware.
[0067] It can be known from the description of the above implementation methods that those skilled in the art can clearly understand that the present application can be implemented by means of software plus a necessary general hardware platform. Based on such an understanding, the technical solution of the present application can be essentially or partly contributed to the prior art in the form of a software product, which can be stored in a storage medium such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in the various embodiments of the present application or certain parts of the embodiments.
[0068] Finally, it should be noted that, in this article, relational terms such as first, second, third and fourth are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0069] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A software installation and deployment method for Linux system, characterized in that: The method comprises: Package according to the standardized packaging process to obtain the software installation package; In different target machines of the Linux system, in response to the installation deployment instruction, the software installation package is deployed in the different target machines according to the same standardized deployment method.
2. The method according to claim 1, characterized in that The packaging is performed according to the standardized packaging process, including: Get the input application name; Get the input application version; Get the input application publisher; Determine the binary file of the selected executable program; Identify other files and directories required for the application to run; Query the dependent library files of the executable program; The information obtained above is formed into a script file, and the script file is packaged with the binary file of the executable program, the executable Chengdu dependent library file, and other files required for the application program to run to obtain a software installation package.
3. The method according to claim 2, characterized in that Use the ldd script command to query the dependent library files of the executable program.
4. The method according to claim 2, characterized in that: Deploying the software installation package in different target machines according to the same standardized deployment method includes: The software installation and deployment methods in each target machine are: In response to the software installation package selection instruction, determine the software installation package that needs to be installed and deployed in the Linux system; In response to the installation directory selection instruction, determining the installation directory of the software installation package in the Linux system; In response to the installation start instruction, start the binary file of the executable program in the installation directory; In response to the software permission setting instruction, the setting result of the installed software permission is obtained, and a corresponding desktop shortcut is created and the installed software is added to the startup items.
5. A software installation and deployment device for Linux system, characterized in that: The device comprises: A packaging unit, used to package according to a standardized packaging process to obtain a software installation package; The deployment unit is used to deploy the software installation package in different target machines of the Linux system in response to the installation deployment instruction and according to the same standardized deployment method.
6. The method according to claim 5, characterized in that The packaging unit is specifically used to: obtain the input application name; obtain the input application version; obtain the input application publisher; determine the binary file of the selected executable program; Identify other files and directories required for the application to run; Query the dependent library files of the executable program; form the above-obtained information into a script file, and package the script file with the binary file of the executable program, the executable Chengdu dependent library files, and other files required for the application program to run to obtain a software installation package.
7. The method according to claim 6, characterized in that Use the ldd script command to query the dependent library files of the executable program.
8. The method according to claim 6, characterized in that The deployment unit is specifically used to: the software installation and deployment mode in each target machine is: in response to the software installation package selection instruction, determine the software installation package to be installed and deployed in the Linux system; in response to the installation directory selection instruction, determine the installation directory of the software installation package in the Linux system; in response to the installation start instruction, start the binary file of the executable program in the installation directory; In response to the software permission setting instruction, the setting result of the installed software permission is obtained, and a corresponding desktop shortcut is created and the installed software is added to the startup items.
9. A computer device, characterized in that: The computer device includes a memory and a processor, the memory is used to store a computer program, and the processor is used to execute the computer program stored in the memory to implement the steps of any one of the methods described in claims 1-4.
10. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method described in any one of claims 1 to 4 are implemented.