Pagoda New Java Project Deployment Tutorial

Image

------ body content display, start to learn new knowledge ------

The functions are as follows:
Support one-click start Spring boot project. tomcat built-in project tomcat standalone project

I. Introduction

The Spring boot project only needs a JDK environment to deploy successfully.
Tomcat built-in projects require Tomcat to be installed in order to deploy successfully.
Tomcat standalone projects require Tomcat to be installed in order to deploy successfully. One project with one Tomcat running independently of each other will not affect other tomcat projects.


Deploying the Springboot projectThe JDK needs to be present on the system.]

The test here is to use jenkins from the jenkins official website to download the 2.344 version of the war package

https://ftp.belnet.be/mirror/jenkins/war/2.344/jenkins.war
The file is placed under /www/jar.

图片[1]-宝塔 新版Java 项目部署教程-互悦科技源码-软件定制开发


After the selection is complete. It will automatically populate the startup command for you. If you need to change the startup commands you can do so at will
图片[2]-宝塔 新版Java 项目部署教程-互悦科技源码-软件定制开发

The default startup command is as follows: [Note that jenkins does not support server.port listening on ports].
/usr/local/btjdk/jdk8/bin/java -jar -Xmx1024M -Xms256M /www/jar/jenkins.war -server.port=6192Copy CodeStartup Commands Explained
Path to /usr/java/jdk1.8.0_281/bin/java JDK

-Xmx1024M -Xms256M Limit maximum memory to 1024M Minimum memory 256M

-server.port=6192 Started port


You can change the startup commands and parameters as you like. For example, I changed it to start as follows
/usr/local/btjdk/jdk8/bin/java -jar -Xmx1024M -Xms256M /www/jar/jenkins.war -httpPort=6312Copy Code
After the submission is complete, you will see a page to see if the project was launched successfully.
图片[3]-宝塔 新版Java 项目部署教程-互悦科技源码-软件定制开发

Ports will not be displayed when they are first started. You need to wait for the project to start up completely before you can display the started ports.
图片[4]-宝塔 新版Java 项目部署教程-互悦科技源码-软件定制开发


Access items ip:port
图片[5]-宝塔 新版Java 项目部署教程-互悦科技源码-软件定制开发

If you need 80 access. You need to add a domain name and enable external mapping as follows:
图片[6]-宝塔 新版Java 项目部署教程-互悦科技源码-软件定制开发

图片[7]-宝塔 新版Java 项目部署教程-互悦科技源码-软件定制开发

When it's turned on successfully, visit and test it.

图片[8]-宝塔 新版Java 项目部署教程-互悦科技源码-软件定制开发




Deploying Tomcat built-in projects


2.1 Built-in Project Introduction
The built-in project allows you to set up multiple projects. The disadvantage is that multiple projects may cause conflicts between them. Support for Tomcat7 tomcat8 tomcat9  

Ubuntu and Debian do not support Tomcat7 only Tomcat8 Tomcat9
Centos7 Centos8 support tomcat7 tomcat8 tomcat9  


Install Tomcat as follows:
图片[9]-宝塔 新版Java 项目部署教程-互悦科技源码-软件定制开发

Just click to install
图片[10]-宝塔 新版Java 项目部署教程-互悦科技源码-软件定制开发

After the installation is complete, you can see the startup status and port information of Tomcat.
图片[11]-宝塔 新版Java 项目部署教程-互悦科技源码-软件定制开发



2.2 New built-in project

图片[12]-宝塔 新版Java 项目部署教程-互悦科技源码-软件定制开发

Submit to start the project
After the startup is complete, you can see the specific occupancy information of the project
图片[13]-宝塔 新版Java 项目部署教程-互悦科技源码-软件定制开发

2.3 Uploading a war or uploading a web archive



Here's a test with two cases.
2.3.1 Testing index.jsp
图片[14]-宝塔 新版Java 项目部署教程-互悦科技源码-软件定制开发


Test access to test.com
图片[15]-宝塔 新版Java 项目部署教程-互悦科技源码-软件定制开发

Test jenkins.war on tomcat.
https://ftp.belnet.be/mirror/jenkins/war/2.312/jenkins.war

After downloading. Put it in the root directory of my website. Then unzip it.
图片[16]-宝塔 新版Java 项目部署教程-互悦科技源码-软件定制开发


图片[17]-宝塔 新版Java 项目部署教程-互悦科技源码-软件定制开发


After decompression is complete. Delete the current war package. Or move it to another directory.

You need to restart Tomcat before you can access the project.
图片[18]-宝塔 新版Java 项目部署教程-互悦科技源码-软件定制开发

Visit the website afterward.
图片[19]-宝塔 新版Java 项目部署教程-互悦科技源码-软件定制开发



Deploying Tomcat standalone project

3.1 Introduction
Standalone project You can start a Tomcat in a separate project.  

Pros: Separate resource. Does not affect other projects
Cons: Takes up more resources than the built-in program

Ubuntu and Debian do not support Tomcat7 only Tomcat8 Tomcat9
Centos7 Centos8 support tomcat7 tomcat8 tomcat9  

Install Tomcat as follows:


Just click to install


After the installation is complete, you can see the startup status and port information of Tomcat.



3.2 Creating stand-alone projects
图片[20]-宝塔 新版Java 项目部署教程-互悦科技源码-软件定制开发

After creation, you can see the CPU and memory information of the current project.
图片[21]-宝塔 新版Java 项目部署教程-互悦科技源码-软件定制开发


2.3 Uploading a war or uploading a web archive

Here's a test with two cases.
2.3.1 Testing index.jsp
图片[22]-宝塔 新版Java 项目部署教程-互悦科技源码-软件定制开发

A single index.jsp project does not require a project restart.
Direct access is available

The access was successful as follows:
图片[23]-宝塔 新版Java 项目部署教程-互悦科技源码-软件定制开发

2.3.2 Testing jenkins.war


First you need to upload the WAR package to the website with the directory. Then unzip it

图片[24]-宝塔 新版Java 项目部署教程-互悦科技源码-软件定制开发

图片[25]-宝塔 新版Java 项目部署教程-互悦科技源码-软件定制开发


Remember to restart the current project after the decompression is complete as follows:
图片[26]-宝塔 新版Java 项目部署教程-互悦科技源码-软件定制开发


Visit the site after the reboot is complete
图片[27]-宝塔 新版Java 项目部署教程-互悦科技源码-软件定制开发




IV. Summary of issues



4.1 Issue 1: If you don't have a domain name and only want to use IP+Port for project deployment

You can decompress the war package by placing it in the tomcat webaps directory. The following is an example of how to do this:

The tomcat installation directory and port are as follows:
tomcat7 installation directory in /usr/local/bttomcat/tomcat7 port number 8231
tomcat8 installation directory /usr/local/bttomcat/tomcat8 port number 8232

tomcat9 installation directory /usr/local/bttomcat/tomcat9 port number 8233  


4.1.1 Deploying jenkins without a domain name on Tomcat8 [I

First you need to go to /usr/local/bttomcat/tomcat8/webapps

Then create a new directory. Then upload your war package.


图片[28]-宝塔 新版Java 项目部署教程-互悦科技源码-软件定制开发

Remember to delete that WAR package after unzipping.

After decompression, restart tomcat to access the project.
图片[29]-宝塔 新版Java 项目部署教程-互悦科技源码-软件定制开发


Then access Ip:8232/the directory you created

Example. My IP is 192.168.1.72 My new directory is test Then the URL is as follows:

http://192.168.1.72:8232/test

图片[30]-宝塔 新版Java 项目部署教程-互悦科技源码-软件定制开发


4.1.2 Deploying jenkins without a domain name on Tomcat8 [II


Deploying a project using Tomcat manager


Tomcat has a built-in manager for project management. Here's how it works


图片[31]-宝塔 新版Java 项目部署教程-互悦科技源码-软件定制开发

Opened DetailstutorialsBelow:
https://blog.csdn.net/feinifi/article/details/80704564







4.1 Issue 2: Why did the project start-up fail?


Please read more about the error message


图片[32]-宝塔 新版Java 项目部署教程-互悦科技源码-软件定制开发






4.3 Question 3: How is SSL supported?


The new version of the Java project supports one-click SSL certificate application.


图片[33]-宝塔 新版Java 项目部署教程-互悦科技源码-软件定制开发


4.3 Question 4: Why is it suddenly 502?


There are a variety of problems with the 502. Most of them are back-end issues. It could be that the port of your project is incorrectly filled in. It is also possible that the Java back-end service hangs. There are many aspects of the problem.

微信截图_20210915112305.png

QQ截图20210915112749.png

QQ截图20210915113003.png

微信图片_20210930093054.png

© copyright statement
THE END
Image
kudos10 share (joys, benefits, privileges etc) with others
commentaries sofa-buying

请登录后发表评论

    No comments