CN106406960B - Method for rapidly deploying software in linux environment - Google Patents

Method for rapidly deploying software in linux environment Download PDF

Info

Publication number
CN106406960B
CN106406960B CN201610856965.XA CN201610856965A CN106406960B CN 106406960 B CN106406960 B CN 106406960B CN 201610856965 A CN201610856965 A CN 201610856965A CN 106406960 B CN106406960 B CN 106406960B
Authority
CN
China
Prior art keywords
files
target software
software
file
dependency
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
Application number
CN201610856965.XA
Other languages
Chinese (zh)
Other versions
CN106406960A (en
Inventor
朱红
刘羽
吕文静
金莲
倪琼琳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN201610856965.XA priority Critical patent/CN106406960B/en
Publication of CN106406960A publication Critical patent/CN106406960A/en
Application granted granted Critical
Publication of CN106406960B publication Critical patent/CN106406960B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The invention discloses a method for rapidly deploying software in a linux environment, which comprises the following steps: establishing a dependency resolver; running target software by using the dependency relationship solver, analyzing to obtain library files and dependency files required by the target software, and acquiring files called by the target software in running; placing the library file, the dependent file and the called file into a new folder according to a directory structure; and transplanting the new folder into a new operating system as a whole, and running the target software in the new operating environment to finish the rapid deployment of the target software. The method solves the problems of troublesome program deployment and difficult transplantation caused by the complex dependence of software in the linux operating system, and improves the deployment efficiency.

Description

Method for rapidly deploying software in linux environment
Technical Field
The invention relates to the technical field of linux systems, in particular to a method for rapidly deploying software in a linux environment.
Background
At present, the Linux operating system is widely applied to the fields of software development, computer clustering, high-performance computing and the like. The rapid deployment of software in the Linux operating system is a problem that Linux users and cluster administrators are concerned about and troublesome. The software deployment of Windows generally uses exe executable compressed packages for distribution, and then simple installation can be performed by using a graphic installation interface and clicking a mouse. However, in the Linux operating system, software is often distributed in the form of source code, which is limited by the version of the Linux operating system, and the software source code depends on other software libraries, so that the deployment of the software and its running environment in the Linux operating system is complicated. The traditional Linux software deployment generally takes the following steps: installing the dependent package- > specifying the dependent package path- > compiling the software- > installing the software and setting the running environment of the software. However, this method often wastes a lot of time for users in mass deployment, especially when the types and versions of Linux operating systems to be deployed are different. While more automated tools, such as autoconf, cmake, etc., may reduce the complexity of some of these operations, such an approach may be extremely inefficient when large volume deployments are required.
More troubling, in some cases, developers and testers want to test the compatibility and performance of software on different platforms, such as whether the same set of systems is compatible on Ubuntu and CentOS, the deployment difficulty and time are not just twice as long as that of one system, and because of the number of underlying libraries of the two systems, the versions are different, so that software that can be compiled and run successfully in one system may not be compiled in the other system, and there is a high possibility of conflicting dependency of the system version libraries. The solution to these problems often requires a relatively rich Linux use experience, and is very challenging for software deployment personnel.
On the other hand, while some container technologies, such as docker, are now relatively lightweight systems similar to virtual machines, with the container technology, software can be deployed in one of them, and then the entire docker container can be run in other operating systems that support docker. However, container technology similar to docker is relatively bulky, the container needs to be started before the application can be executed during the use process, and the docker and the system outside the docker are relatively closed, so that the sharing of files cannot be completely transparent. In addition, similar to a container system of docker, an installation package of the container system is often large, which is not beneficial to rapid distribution, and the technology of the virtual machine-like system makes the virtual machine occupy certain system resources during operation, so that the technology is too bloated and wastes computing resources for the fields of high-performance computing and the like with high demand on computing resources.
Therefore, the program deployment caused by the complex dependency relationship of the software in the linux operating system is troublesome, the migration is difficult, and the deployment efficiency is low.
Disclosure of Invention
The invention aims to provide a method for rapidly deploying software in a linux environment so as to improve deployment efficiency.
In order to solve the technical problem, the invention provides a method for rapidly deploying software in a linux environment, which comprises the following steps:
establishing a dependency resolver;
running target software by using the dependency relationship solver, analyzing to obtain library files and dependency files required by the target software, and acquiring files called by the target software in running;
placing the library file, the dependent file and the called file into a new folder according to a directory structure;
and transplanting the new folder into a new operating system as a whole, and running the target software in the new operating environment to finish the rapid deployment of the target software.
Preferably, the called files include explicitly called files and implicitly called files.
Preferably, after the library file and the dependent file required by the target software are obtained through analysis, the method further includes:
and analyzing the library file and the dependent file, acquiring the authority and the storage path of the library file, and acquiring the authority and the storage path of the dependent file.
Preferably, after the new folder is migrated to the new operating system as a whole, the method further includes:
modifying the dependent path of the target software.
Preferably, after modifying the dependency path of the target software, the method further includes:
and redirecting the storage paths of the library files and the dependent files which are required to be called by the target software.
Preferably, before the running the target software by using the dependency resolver, the method further includes:
and initializing the target software.
Preferably, a dependency resolver is established using a programming language.
The method for rapidly deploying the software in the linux environment, provided by the invention, comprises the steps of establishing a dependency relationship solver; running target software by using the dependency relationship solver, analyzing to obtain library files and dependency files required by the target software, and acquiring files called by the target software in running; placing the library file, the dependent file and the called file into a new folder according to a directory structure; and transplanting the new folder into a new operating system as a whole, and running the target software in the new operating environment to finish the rapid deployment of the target software. Therefore, the dependency relationship solver is designed, a library and a dependency file required by the software operation and a file called in the operation are analyzed by operating the target software, the files are placed into a new folder according to the directory structure of the files, the folder is transplanted into a new operating system as a whole, and the software is supported to operate in the new operating system, so that the purpose of rapid software deployment is achieved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
FIG. 1 is a flowchart of a method for rapidly deploying software in a linux environment provided by the present invention.
Detailed Description
The core of the invention is to provide a method for rapidly deploying software in a linux environment so as to improve deployment efficiency.
In order to make the technical solutions of the present invention better understood, 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 only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, fig. 1 is a flowchart of a method for rapidly deploying software in a linux environment, which is provided by the present invention, and the method includes:
s11: establishing a dependency resolver;
s12: running the target software by using the dependency relation solver, analyzing to obtain library files and dependency files required by the target software, and acquiring files called by the target software in running;
s13: placing the library file, the dependent file and the called file into a new folder according to a directory structure;
s14: and transplanting the new folder into a new operating system as a whole, and running the target software in a new operating environment to finish the rapid deployment of the target software.
Therefore, the dependency relationship solver is designed, a library and a dependency file required by the software operation and a file called in the operation are analyzed by operating the target software, the files are placed into a new folder according to the directory structure of the files, the folder is transplanted into a new operating system as a whole, and the software is supported to operate in the new operating system, so that the purpose of rapid software deployment is achieved.
Based on the above method, specifically, the called files include an explicitly called file and an implicitly called file. The new operating environment is a linux operating environment. The dependency resolver is herein referred to simply as a resolver.
Wherein, the steps S13 and S14 are performed by the dependency resolver. The library file, the dependent file and the called file are placed into a new folder according to a directory structure through a dependency relationship resolver; and transplanting the new folder into a new operating system as a whole through the dependency relation solver, and running the target software in a new operating environment to finish the rapid deployment of the target software.
Further, after the library file and the dependent file required by the target software are obtained through analysis, the method further includes: and analyzing the library file and the dependent file, acquiring the authority and the storage path of the library file, and acquiring the authority and the storage path of the dependent file.
Further, after the new folder is migrated to the new operating system as a whole, the method further includes: modifying the dependent path of the target software.
After the dependent path of the target software is modified, redirecting the storage paths of the library file and the dependent file which are required to be called by the target software.
Further, the target software is initialized before the target software is run by using the dependency resolver.
Wherein, a dependency resolver is established by adopting a programming language. All the steps are completed by the dependency resolver.
The dependency solution in the present invention has the following functions and characteristics:
(1) and operating the executable program and feeding back a correct operation result. For example, the resolver is called a resolver, the previous program execution command is/a.out 1.txt, and the program can run correctly if the command executed by the resolver is solver./a.out 1. txt.
(2) And acquiring the dependency called in the program execution process and the related corresponding file. Such as performing a solvent./a.out 1.txt, the resolver can know the following: system libraries called at run-time, such as libpng.so, libstdc + +. so, etc.; a.out the files called in operation, displaying the files such as called file 1.txt and implicitly called file 2. txt; the path of storing the files and the authority of each file. The concrete implementation that the solver can obtain the above contents is not limited, and one implementation manner that can be referred to is to use a ptrace mechanism in a Linux system.
(3) And (3) copying the file involved in the step (2) and copying the file to a certain target directory according to a corresponding path.
(4) Modifying the dependent path in the executable program, and redirecting the path of the library and the file which need to be called.
(5) The implementation of the resolver need not be dependent on a particular programming language.
The whole work flow of the method comprises the following steps: initializing; transplant and rerun. The workflow of the overall process is illustrated below.
1. Initialization
Py, an executable program setup of python is assumed. Py uses the parameter file setup.inc during execution, and additionally contains some files that setup.py implicitly calls during execution, which are placed in the reference folder. Py program, the code of the whole directory structure, is as follows:
Figure BDA0001122511640000061
py is typically executed in a python setup. inc, which uses the three data files 1.txt, 2.txt, 3.txt in the reference folder during execution.
The program is now executed using the resolver, the use command being resolver python setup. The program is normally executed, some system libraries called in the program execution and some files called in the different folders are analyzed, and then the files are copied to a new folder according to the dependency relationship of the directory. For example, the name of the folder is solution-root, and the code of the directory structure in the folder is as follows:
Figure BDA0001122511640000071
the code of the catalog structure of the solution-root shows only two layers of catalogs.
It can be seen that the directory structure of the socket-root is similar to the root directory structure of Linux, and the socket copies some library files and dependent files required for running the socket-root from the system directory of Linux to the current directory in the process of executing the setup. The executable file python2.7 of python is contained in the bin folder, and the directory structure code of the files in the bin folder in the solution-root directory is as follows:
Figure BDA0001122511640000072
the home folder contains the location where setup. The code for the home directory structure in the solution-root is as follows:
Figure BDA0001122511640000081
2. transplant and rerun
After the above operation, in the socket-root folder, setup can be executed by only calling the files and libraries in the socket-root folder. Specific implementations may be made by specifying additional parameters. Such as a solvent-x python setup. The-x parameter tells the solution that execution depends on libraries and files in the solution-root. For the migration, the whole solution-root folder is packaged and copied to the target operating system to be run. Such as performing an initialization operation on redhat and then packaging and copying the solver-root folder to the Ubuntu operating system. After being transplanted to Ubuntu, enter home/gust/tmp/show in the solution-root, and execute the solution-x python setup.
As above, it can be seen that after initialization, the solution-root folder becomes a microsystem that can be very conveniently migrated and re-run. So that the corresponding software and its running environment can be deployed quickly. In addition, it can also be seen that the method only extracts files required by software operation, so that the whole file package required to be deployed is relatively small and light.
The invention can rapidly deploy the software and the running environment thereof, and is convenient for large-scale and cross-platform deployment of the software under the Linux platform. Specifically, a dependency resolver is designed, a library and a dependency file required by software operation are analyzed by operating target software, and explicitly called and implicitly called files in the operation are placed into a new folder according to a directory structure of the file, and the folder can be transplanted into a new operating system as a whole and supports the software to operate in the new operating system, so that the purpose of rapid deployment of the software is achieved. And the method can not lead the program to occupy excessive system resources during running, thereby saving the system resources. The problems of troublesome program deployment and difficult transplantation caused by the complex dependence relationship of software in the Linux operating system are solved.
In summary, the method for rapidly deploying software in a linux environment provided by the invention establishes a dependency resolver; running the target software by using the dependency relation solver, analyzing to obtain library files and dependency files required by the target software, and acquiring files called by the target software in running; placing the library file, the dependent file and the called file into a new folder according to a directory structure; and transplanting the new folder into a new operating system as a whole, and running the target software in a new operating environment to finish the rapid deployment of the target software. Therefore, the dependency relationship solver is designed, a library and a dependency file required by the software operation and a file called in the operation are analyzed by operating the target software, the files are placed into a new folder according to the directory structure of the files, the folder is transplanted into a new operating system as a whole, and the software is supported to operate in the new operating system, so that the purpose of rapid software deployment is achieved.
The method for rapidly deploying the software in the linux environment provided by the invention is described in detail above. The principles and embodiments of the present invention are explained herein using specific examples, which are presented only to assist in understanding the method and its core concepts. It should be noted that, for those skilled in the art, it is possible to make various improvements and modifications to the present invention without departing from the principle of the present invention, and those improvements and modifications also fall within the scope of the claims of the present invention.

Claims (7)

1. A method for rapidly deploying software in a linux environment is characterized by comprising the following steps:
establishing a dependency resolver;
running target software by using the dependency relationship solver, analyzing to obtain library files and dependency files required by the running of the target software, and acquiring files called by the running of the target software; acquiring a dependency called in a program execution process;
placing the library file, the dependent file and the called file into a new folder according to a directory structure;
and transplanting the new folder into a new operating system as a whole, and running the target software in a new operating environment to finish the rapid deployment of the target software.
2. The method of claim 1, wherein the invoked files comprise explicitly invoked files and implicitly invoked files.
3. The method of claim 2, wherein after parsing to obtain library files and dependent files needed by the target software at runtime, further comprising:
and analyzing the library file and the dependent file, acquiring the authority and the storage path of the library file, and acquiring the authority and the storage path of the dependent file.
4. The method of claim 1, wherein after migrating the new folder as a whole to a new operating system, further comprising:
modifying the dependent path of the target software.
5. The method of claim 4, wherein after modifying the dependency path of the target software, further comprising:
and redirecting the storage paths of the library files and the dependent files which are required to be called by the target software.
6. The method of claim 1, wherein prior to running the target software using the dependency resolver, further comprising:
and initializing the target software.
7. The method of any one of claims 1 to 6, wherein a dependency resolver is established using a programming language.
CN201610856965.XA 2016-09-28 2016-09-28 Method for rapidly deploying software in linux environment Active CN106406960B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610856965.XA CN106406960B (en) 2016-09-28 2016-09-28 Method for rapidly deploying software in linux environment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610856965.XA CN106406960B (en) 2016-09-28 2016-09-28 Method for rapidly deploying software in linux environment

Publications (2)

Publication Number Publication Date
CN106406960A CN106406960A (en) 2017-02-15
CN106406960B true CN106406960B (en) 2020-09-15

Family

ID=57997813

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610856965.XA Active CN106406960B (en) 2016-09-28 2016-09-28 Method for rapidly deploying software in linux environment

Country Status (1)

Country Link
CN (1) CN106406960B (en)

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108920250B (en) * 2018-06-05 2021-11-19 麒麟合盛网络技术股份有限公司 Application program containerization method and device
CN109144526B (en) * 2018-06-28 2022-04-12 山东鲁软数字科技有限公司智慧能源分公司 Rapid deployment system and method for substation automation software
CN108984187A (en) * 2018-07-19 2018-12-11 郑州云海信息技术有限公司 A kind of server CUDA environment configurations method, apparatus, equipment and storage medium
CN109284112B (en) * 2018-09-28 2022-03-22 郑州云海信息技术有限公司 Method and device for running application program
CN111198694A (en) * 2018-11-20 2020-05-26 北京国双科技有限公司 Software installation method and device
CN110032376B (en) * 2018-12-13 2024-02-13 中国电子科技集团公司电子科学研究院 Docker-based automated software deployment method and device
CN110427226A (en) * 2019-08-09 2019-11-08 杭州安恒信息技术股份有限公司 A kind of method and apparatus that quick release program relies on
CN112286543B (en) * 2020-11-06 2021-11-02 广州锦行网络科技有限公司 Application service deployment method and device
CN112486512A (en) * 2020-11-25 2021-03-12 湖南麒麟信安科技股份有限公司 Linux general software adaptation method and system based on container and stacked file system
CN113504914B (en) * 2021-09-09 2021-12-07 北京鲸鲮信息系统技术有限公司 Operating system construction compiling method and device, electronic equipment and storage medium
CN116501335B (en) * 2023-06-28 2023-09-19 北京安锐卓越信息技术股份有限公司 Deployment method, device and medium of one-stop type station building system

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103440156A (en) * 2013-08-15 2013-12-11 国云科技股份有限公司 Linux software package manufacturing method capable of being used in various systems
CN106250160A (en) * 2016-08-03 2016-12-21 汉柏科技有限公司 A kind of Rapid transplant compiles the method for program of increasing income

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030014466A1 (en) * 2001-06-29 2003-01-16 Joubert Berger System and method for management of compartments in a trusted operating system

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103440156A (en) * 2013-08-15 2013-12-11 国云科技股份有限公司 Linux software package manufacturing method capable of being used in various systems
CN106250160A (en) * 2016-08-03 2016-12-21 汉柏科技有限公司 A kind of Rapid transplant compiles the method for program of increasing income

Also Published As

Publication number Publication date
CN106406960A (en) 2017-02-15

Similar Documents

Publication Publication Date Title
CN106406960B (en) Method for rapidly deploying software in linux environment
US11467854B2 (en) Method and apparatus for loading multiple differing versions of a native library into a native environment
US10095489B1 (en) GUI-based application template for containerized application software development
US11256523B2 (en) Modular co-versioning in a dynamically linked runtime environment
CN108415795B (en) A kind of container Dockerfile, container mirror image rapid generation and system
CN110912724B (en) Parameter-driven automatic service arrangement method and device
US9811360B2 (en) Dynamic determination of application server runtime classloading
US6178546B1 (en) System and method of making software product deliverables
US20170153930A1 (en) Application container runtime
Spillner et al. Java code analysis and transformation into AWS lambda functions
CN108897547B (en) Software automation deployment method and device
WO2015195418A1 (en) Software package management
EP3021216A1 (en) Incremental source code analysis
US20230125342A1 (en) Cross-platform application containerized execution
US6769126B1 (en) Apparatus and method for demand load analysis
Senington et al. Using docker for factory system software management: Experience report
US10698666B2 (en) Automatically building software projects
CN117931214A (en) Application deployment method and device in offline environment, electronic equipment and storage medium
US10552135B1 (en) Reducing a size of an application package
CN108304184B (en) Compiling method and device
Sethi et al. Rapid deployment of SOA solutions via automated image replication and reconfiguration
Lubin VM2Docker: automating the conversion from virtual machine to docker container
CN115454394A (en) Development environment manager with enhanced state switching and sharing
Šimec et al. Isolated environment tools for software development
US20240192974A1 (en) Simulation of one or more pipeline jobs in a software deployment pipeline

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right

Effective date of registration: 20200820

Address after: 215100 No. 1 Guanpu Road, Guoxiang Street, Wuzhong Economic Development Zone, Suzhou City, Jiangsu Province

Applicant after: SUZHOU LANGCHAO INTELLIGENT TECHNOLOGY Co.,Ltd.

Address before: 450018 Henan province Zheng Dong New District of Zhengzhou City Xinyi Road No. 278 16 floor room 1601

Applicant before: ZHENGZHOU YUNHAI INFORMATION TECHNOLOGY Co.,Ltd.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant