In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)05/31 Report--
This article introduces the relevant knowledge of "how to install and configure Tomcat under Centos". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
Step 1: download the tomcat8 package
Enter
Download the tar.gz package
Step 2: upload the compressed package to / home/data/ with ftp tool
Step 3: decompress and create a new directory
[root@localhost ~] # ls / home/data/apache-tomcat-8.5.16.tar.gz server-jre-8u131-linux-x64.tar.gz [root@localhost ~] # cd / home/data/ [root@localhost data] # tar-zxvf apache-tomcat-8.5.16.tar.gz [root@localhost data] # lsapache-tomcat-8.5.16 server-jre-8u131-linux-x64.tar.gzapache-tomcat-8.5.16.tar.gz
Let's create a new / home/tomcat/ directory and cut the tomcat in.
[root@localhost data] # cd [root@localhost ~] # mkdir / home/tomcat/ [root@localhost ~] # ls / home/data java tomcat [root@localhost ~] # mv / home/data/apache-tomcat-8.5.16/ / home/tomcat/ [root@localhost ~] # ls / home/tomcat/apache-tomcat-8.5.16
Step 4: configure tomcat server.xml
Server.xml can configure ports, codes, configure items, and so on. We will configure a port here, changing the default value of 8080 to 80.
Vi / home/tomcat/apache-tomcat-8.5.16/conf/server.xml
Here we change port 8080 to 80, and then save and exit.
Step 5: configure the firewall and open port 80
Firewall-cmd-zone=public-add-port=80/tcp-permanentfirewall-cmd-reload
Step 6: start tomcat
[root@localhost ~] # / home/tomcat/apache-tomcat-8.5.16/bin/startup.shusing catalina_base: / home/tomcat/apache-tomcat-8.5.16using catalina_home: / home/tomcat/apache-tomcat-8.5.16using catalina_tmpdir: / home/tomcat/apache-tomcat-8.5.16/tempusing jre_home: / home/java/jdk1.8.0_131using classpath: / home/tomcat/apache-tomcat-8.5. 16/bin/bootstrap.jar:/home/tomcat/apache-tomcat-8.5.16/bin/tomcat-juli.jartomcat started.
It indicates that the startup was successful.
Step 7: browser testing
Address bar input:
Describes the configuration of ok.
This is the end of the content of "how to install and configure Tomcat under Centos". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.