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
Table of contents Achieve results Rolling load kn...
I recently took over a small program project, and...
question CSS fixed positioning position:fixed is ...
Why does CSS have a cascading mechanism? Because ...
About semantics Semantics is the study of the rel...
Table of contents 1. router-view 2. router-link 3...
Think big and small, then redirect. Sometimes Lin...
If a form field in a form is set to disabled, the ...
After solving the form auto-fill problem discussed...
Project requirements: When you click a product tr...
Table of contents 1. Basic theory 1.1 Transaction...
Table of contents 1. Is setState synchronous? asy...
Table of contents Function Introduction function ...
Table of contents Overview Form validation withou...
1. Find a suitable version of redis for docker Yo...