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?
MySQL 4.x and above provide full-text search supp...
1. Download the MySQL installation package (there...
1. Mycat application scenarios Mycat has been dev...
1. Virtual Machine Preparation 1. Create a new vi...
1. Create a test table CREATE TABLE `testsign` ( ...
Use scenarios: The jump path needs to be dynamica...
I have recently studied the hollowing effect. bac...
As shown in the figure: There are many files conne...
Table of contents 1. Teleport usage 2. Complete t...
Table of contents 1. Connect to Tencent Cloud Ser...
Table of contents Introduction Architecture Advan...
Placing a search box in the top menu bar is a com...
The layui table has multiple rows of data. Throug...
Adding/removing classes to elements is a very com...
Problem Peeping In the server, assuming that the ...