Before installing Tomcat, install the JDK environment first You can read my previous articles about installing JDK and configuring the environment about the problems encountered in configuring the Java environment on Linux servers. Go to the Apache official website to download the Tomcat8.5 installation package, https://tomcat.apache.org/ You can also choose other versions of Tomcat Select Tomcat8 here, https://tomcat.apache.org/download-80.cgi wget command + copied download address wget https://mirrors.bfsu.edu.cn/apache/tomcat/tomcat-8/v8.5.60/bin/apache-tomcat-8.5.60.tar.gz Downloaded, unzip tar -zxvf apache-tomcat-8.5.60.tar.gz The Tomcat name is too long, you can change it. Here I change it to mv apache-tomcat-8.5.60 tomcat8.5.8010
vim server.xml Find the port number Note: The security group on the cloud server must open port firewall-cmd --zone=public --add-port=8010/tcp --permanent This successfully adds port firewall-cmd --reload Check all open ports in firewall-cmd --zone=public --list-ports
vim /etc/profile Open and add it at the end export JAVA_HOME=/usr/local/jdk1.8.0_271/ export CLASSPATH=%JAVA_HOME%/lib:%JAVA_HOME%/jre/lib export TOMCAT_HOME=/www/server/tomcat8.5.8010/ export PATH=$TOMCAT_HOME/bin:$JAVA_HOME/bin:$JAVA_HOME/jre/bin:$PATH Reload the configuration to take effect source /etc/profile Test the Java environment: Finally, test whether the configuration is successful, start or shut down Tomcat in other directories, such as: start Tomcat in the root directory startup.sh shutdown.sh Access: Cloud server public IP: 8010 It is not really necessary to add the Tomcat directory to the environment variables, because if you need to install several Tomcats on a server, it would be troublesome to configure the environment every time. Here we recommend another method, which is somewhat similar to the shortcut of the Windows environment. For details, please refer to the environment configuration of This is the end of this article about the detailed tutorial on installing Tomcat8.5 in the Centos8.2 cloud server environment. For more information about installing Tomcat8 in the Centos8.2 cloud server, please search for previous articles on 123WORDPRESS.COM or continue to browse the following related articles. I hope you will support 123WORDPRESS.COM in the future! You may also be interested in:
|
>>: XHTML Getting Started Tutorial: What is XHTML?
Introduction to Nginx dynamic and static separati...
<br />Table is a tag that has been used by e...
Golden Rules of Performance: Only 10% to 20% of e...
Preface Since I needed to install Zookeeper durin...
After reading some articles, I finally figured ou...
Causes and consequences 1. When using the ansible...
I encountered a very strange problem today. Look a...
CentOS 8 changed the software package installatio...
1. Shut down MySQL [root@localhost /]# service my...
There are two ways to export csv in win10. The fi...
Anti-shake: Prevent repeated clicks from triggeri...
This article shares the specific code of JavaScri...
Preparation 1. Start the virtual machine 2. git t...
This article describes how to export and import ....
download: Step 1: Open the website (enter the off...