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

Implementation steps for Docker deployment of SpringBoot applications

Table of contents Preface Dockerfile What is a Do...

HTML simple shopping quantity applet

This article shares a simple HTML shopping quanti...

Use viewport in meta tag to define screen css

<meta name="viewport" content="w...

Connector configuration in Tomcat

JBoss uses Tomcat as the Web container, so the co...

How to build a complete samba server in Linux (centos version)

Preface smb is the name of a protocol that can be...

Detailed tutorial on installing mysql 8.0.13 (rpm) on Centos7

yum or rpm? The yum installation method is very c...

MySQL uses SQL statements to modify table names

In MySQL, you can use the SQL statement rename ta...

Graphical tutorial on installing JDK1.8 under CentOS7.4

Linux installation JDK1.8 steps 1. Check whether ...

How to reduce memory usage and CPU usage of web pages

Some web pages may not look large but may be very...

Detailed explanation of Nginx access restriction configuration

What is Nginx access restriction configuration Ng...

Detailed analysis of when tomcat writes back the response datagram

The question arises This question arose when I wa...

Graphic tutorial on installing Ubuntu 18.04 on VMware 15 virtual machine

In the past few years, I have been moving back an...

Summary of horizontal scrolling website design

Horizontal scrolling isn’t appropriate in all situ...

The benefits of div+css and web standard pages

The div element is used to provide structure and b...

Reasons why MySQL kill cannot kill threads

Table of contents background Problem Description ...