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?
In MySQL, you can use the SQL statement rename ta...
Unlike other types of design, web design has been ...
When installing in MySQL 8.0.16, some errors may ...
Analyze the production steps: 1. Prepare resource...
My machine environment: Windows 2008 R2 MySQL 5.6...
Use the following command to check whether MySQL ...
I'm building Nginx recently, but I can't ...
I have been relearning HTML recently, which can be...
Table of contents Initialization of echart app-ba...
Table of contents 1. Browser local storage techno...
Preview address: https://ovsexia.gitee.io/leftfix...
x-ua-compatible is used to specify the model for ...
Table of contents Single thread asynchronous Sing...
Table of contents Preface Basic Usage grammar Err...
Table of contents 1. The principle of index push-...