First download JDK. Here we use jdk-8u181-linux-x64.tar.gz Download Tomcat. Here we use apache-tomcat-8.5.35.tar.gz Create a Directory $ cd / $ mkdir soft $ cd soft Put the installation package in soft You can use the yum command to upload Install yum install -y lrzsz rz Enter to select the file Install JDK $ cd /usr $ mkdir java $ tar -zxvf jdk-8u181-linux-x64.tar.gz -C /usr/java After the installation is complete, add the environment variables $ vim /etc/profile Add the environment variables at the end export JAVA_HOME=/usr/java/jdk1.8.0_181 export CLASSPATH=.:${JAVA_HOME}/jre/lib/rt.jar:${JAVA_HOME}/lib/dt.jar:${JAVA_HOME}/lib/tools.jar export PATH=$PATH:${JAVA_HOME}/bin Save and exit $wq Then execute the command to make the environment variable take effect $ source /etc/profile Check whether the configuration is successful $ java -version Install tomcat $ cd /usr $ mkdir tomcat $ tar -zxvf apache-tomcat-8.5.35.tar.gz -C /usr/tomcat After successful decompression, configure the firewall policy and open the firewall port 8080 $ vim /etc/sysconfig/iptables If there is no iptables file but iptables-config Execute the following command $ iptables -P OUTPUT ACCEPT $ service iptables save $ vim /etc/sysconfig/iptables Add at the end # Open port 8080 -A INPUT -m state --state NEW -m tcp -p tcp --dport 8080 -j ACCEPT Save and exit $wq Modify the tomcat configuration and change the local localhost to your own domain name or server IP. Here we use IP $ vim /usr/tomcat/apache-tomcat-8.5.35/conf/server.xml Save and exit after modification Start tomcat $ sh /usr/tomcat/apache-tomcat-8.5.35/bin/startup.sh After successful startup Enter the server IP in the browser: 8080 Jump to the tomcat page and the configuration is successful. END. Summarize The above is the full content of this article. I hope that the content of this article will have certain reference learning value for your study or work. Thank you for your support of 123WORDPRESS.COM. If you want to learn more about this, please check out the following links You may also be interested in:
|
<<: Two ways to use react in React html
>>: How to install MySQL using yum on Centos7 and achieve remote connection
This article mainly introduces the implementation...
By default, the table title is horizontally cente...
Preface Since vue3.0 was officially launched, man...
The mysql 5.7.18 zip version of MySQL is not like...
Method 1: SET GLOBAL general_log = 'OFF';...
1. Introduction Git is a free, open source distri...
This article uses an example to illustrate the me...
I received a task from the company today, and the...
Table of contents Using slots in Vue: slot Scoped...
Last time we talked about some SQL query optimiza...
So after registering a domain name and purchasing...
This article uses an example to describe how to u...
Preface In the Linux kernel, netfilter is a subsy...
Setting up remote access in mysql5.7 is not like ...
Nginx's shared memory is one of the main reas...