Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Diagram of deployment and installation process in Java+Tomcat environment

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

The following installation of Java+Tomcat in Centos7, many articles on the Internet, I have some problems in the deployment, the following is my own summary of an installation process!

Install the Java environment

First of all, let's go to the Java website to download JDK. Here I download the jdk1.8 version.

Https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

Click Accept License Agreement to choose a good version to download, you need to register an Oracle account to log in and download!

Copy the downloaded jdk package to the Centos7 root directory. It is recommended to use WinSCP.

Create a java installation directory

Mkdir-p / usr/local/java

Extract the jdk package to the java installation directory

Tar-zxvf jdk-8u211-linux-x64.tar.gz-C / usr/local/java/

Configure environment variables

Vim / etc/profile.d/java.sh

Export JAVA_HOME=/usr/local/java/jdk1.8.0_211export CLASS_PATH= "$JAVA_HOME/lib:$JAVA_HOME/jre/lib" export PATH=$PATH:$JAVA_HOME/bin

Make the configuration effective immediately

Source / etc/profile

Verify that the Java environment is configured successfully

Install the Tomcat environment

Download the installation package on the official website: https://tomcat.apache.org/

Here I choose Tomcat8 Archives to view the historical version.

I choose v8.5.5 here. Remember not to enter src to download the installation package. You will encounter the problem of not finding bootstarp.jar in the bin directory. Go to the bin directory and download the code package.

Extract it to the installation directory

Tar-zxvf apache-tomcat-8.5.5.tar.gz-C / usr/local/

Create a soft link

Cd / usr/local/ln-sv apache-tomcat-8.5.5 tomcat

Configure environment variables

Vim / etc/profile.d/tomcat.sh

CATALINA_BASE=/usr/local/tomcatPATH=$CATALINA_BASE/bin:$PATHexport PATH CATALINA_BASE

Let the configuration take effect

Source / etc/profile.d/tomcat.sh

View tomcat version status

Go to the bin directory of tomcat

Cd / usr/local/tomcat/bin/

Give authority

Chmod 755 *

View configuration information

. / catalina.sh version

Start the Tomcat service

. / startup.sh

If the above content appears, it means it is successful. Now visit ip:8080 to have a look.

Summary

The above is the diagram of the deployment and installation process of the Java+Tomcat environment introduced by the editor. I hope it will be helpful to you. If you have any questions, please leave me a message and the editor will reply to you in time. Thank you very much for your support to the website!

If you think this article is helpful to you, you are welcome to reprint it, please indicate the source, thank you!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report