[Microservice Deployment] 2. Detailed explanation of the steps for one-click packaging and deployment of SpringBoot applications in Jenkins

  This article introduces the use of Jenkins to package and upload SpringBoot applications to the production environment server with one click. Here we use the method of running FagJar directly on the server. First, ensure that the server environment is configured and the necessary JDK runtime environment, running directory, and logs are installed. Storage directory, etc.

1. Server environment configuration

  Regarding the choice of JDK, since the 1.8 version is charged, most of us choose openjdk as the runtime environment of the production environment. Like most software installation packages, on the CentOS server, we can choose the yum method or download the compressed package for installation. . In most cases, using yum is simpler and more convenient. There are also special circumstances. Some units or systems with high security requirements are only allowed to run within the local area network. In this case, you need to choose the compressed package method for installation.

1. Install openjdk using yum method
  • To query the openjdk version that can be installed on the current CentOS system, we only need the runtime environment, so java-11-openjdk.x86_64 is the package we need to install, which is actually equivalent to the jre runtime; there is also a package java-11-openjdk- devel.x86_64, this package is the traditional jdk that contains development and packaging tools. In the production environment, we don’t need to install it if it is not needed.
yum search java | grep -i --color openjdk
[root@localhost ~]# yum search java | grep -i --color openjdk
openjdk-asmtools-javadoc.noarch : Javadoc for openjdk-asmtools
icedtea-web.x86_64 : Additional Java components for OpenJDK - Java browser
java-1.6.0-openjdk.x86_64 : OpenJDK Runtime Environment
java-1.6.0-openjdk-demo.x86_64 : OpenJDK Demos
java-1.6.0-openjdk-devel.x86_64 : OpenJDK Development Environment
java-1.6.0-openjdk-javadoc.x86_64 : OpenJDK API Documentation
java-1.6.0-openjdk-src.x86_64 : OpenJDK Source Bundle
java-1.7.0-openjdk.x86_64 : OpenJDK Runtime Environment
java-1.7.0-openjdk-accessibility.x86_64 : OpenJDK accessibility connector
java-1.7.0-openjdk-demo.x86_64 : OpenJDK Demos
java-1.7.0-openjdk-devel.x86_64 : OpenJDK Development Environment
java-1.7.0-openjdk-headless.x86_64 : The OpenJDK runtime environment without
java-1.7.0-openjdk-javadoc.noarch : OpenJDK API Documentation
java-1.7.0-openjdk-src.x86_64 : OpenJDK Source Bundle
java-1.8.0-openjdk.i686 : OpenJDK Runtime Environment 8
java-1.8.0-openjdk.x86_64 : OpenJDK 8 Runtime Environment
java-1.8.0-openjdk-accessibility.i686 : OpenJDK accessibility connector
java-1.8.0-openjdk-accessibility.x86_64 : OpenJDK accessibility connector
java-1.8.0-openjdk-demo.i686 : OpenJDK Demos 8
java-1.8.0-openjdk-demo.x86_64 : OpenJDK 8 Demos
java-1.8.0-openjdk-devel.i686 : OpenJDK Development Environment 8
java-1.8.0-openjdk-devel.x86_64 : OpenJDK 8 Development Environment
java-1.8.0-openjdk-headless.i686 : OpenJDK Headless Runtime Environment 8
java-1.8.0-openjdk-headless.x86_64 : OpenJDK 8 Headless Runtime Environment
java-1.8.0-openjdk-javadoc.noarch : OpenJDK 8 API documentation
java-1.8.0-openjdk-javadoc-zip.noarch : OpenJDK 8 API documentation compressed
java-1.8.0-openjdk-src.i686 : OpenJDK Source Bundle 8
java-1.8.0-openjdk-src.x86_64 : OpenJDK 8 Source Bundle
java-11-openjdk.i686 : OpenJDK Runtime Environment 11
java-11-openjdk.x86_64 : OpenJDK 11 Runtime Environment
java-11-openjdk-demo.i686 : OpenJDK Demos 11
java-11-open

Guess you like

Origin blog.csdn.net/wmz1932/article/details/132575691
Recommended