Detailed steps to install JDK and Tomcat in Linux environment

Detailed steps to install JDK and Tomcat in Linux environment

1. Install JDK

Note: Installing tomcat requires configuring jdk first

One is yum installation

One is manual installation (personally recommended manual installation)

Manual Installation

1. Go to Oracle's official website to download the jdk version you need to install. I use jdk-8u171-linux-x64.tar.gz here

2. Put the compressed package in the /usr/local/jdk directory. The jdk directory needs to be created manually. It can also be called java. You can give it any name (see the name to know the meaning), and then unzip the compressed package.

Enter the following command: tar zxvf jdk-8u172-linux-x64.tar.gz

After successful decompression

Go to the profile file under etc

Add the following information at the end of the file:

export JAVA_HOME=/usr/local/jdk/jdk1.8.0_172
export CLASSPATH=$:CLASSPATH:$JAVA_HOME/lib/
export PATH=$PATH:$JAVA_HOME/bin

To check whether JDK is installed successfully, enter the command java -version.

2. Tomcat

Install using yum

yum install tomcat

Check Tomcat status

systemctl status tomcat

Start Tomcat

systemctl start tomcat.service

Install the Tomcat page plugin

yum install tomcat-webapps tomcat-admin-webapps

Increase the port number

firewall-cmd --zone=public --add-port=8080/tcp --permanent

Firewall

systemctl restart firewalld

It would be nice if this interface came out

This is the end of this article about the detailed steps of installing JDK and Tomcat in Linux environment. For more relevant content about installing JDK and Tomcat in Linux, please search the previous articles of 123WORDPRESS.COM or continue to browse the related articles below. I hope you will support 123WORDPRESS.COM in the future!

<<:  Example of creating circular scrolling progress bar animation using CSS3

>>:  Essential for front-end development: 12 browser compatibility testing tools recommended

Recommend

What are the new CSS :where and :is pseudo-class functions?

What are :is and :where? :is() and :where() are p...

Using JavaScript in HTML

The <script> tag In HTML5, script has the f...

Detailed explanation of the difference between in and exists in MySQL

1. Prepare in Advance For your convenience, I cre...

Solution to changing the data storage location of the database in MySQL 5.7

As the data stored in the MySQL database graduall...

Detailed description of the function of new in JS

Table of contents 1. Example 2. Create 100 soldie...

How to use shell scripts in node

background During development, we may need some s...

VMware configuration VMnet8 network method steps

Table of contents 1. Introduction 2. Configuratio...

How to set up Windows Server 2019 (with pictures and text)

1. Windows Server 2019 Installation Install Windo...

Solution to the error problem of Vscode remotely connecting to Ubuntu

1. Background of the incident: Because of work ne...

Example analysis of mysql user rights management

This article describes the MySQL user rights mana...

HTML page jump and parameter transfer issues

HTML page jump: window.open(url, "", &q...

Solution to 1067 when Mysql starts in Windows

I just started working a few days ago and install...

Summary of several commonly used CentOS7 images based on Docker

Table of contents 1 Install Docker 2 Configuring ...

What are the advantages of using B+Tree as an index in MySQL?

Table of contents Why do databases need indexes? ...