In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article will explain in detail how to install Tomcat9 in CentOS7, the content of the article is of high quality, so the editor will share it for you as a reference. I hope you will have some understanding of the relevant knowledge after reading this article.
CentOS7 install Tomcat9
1. download
Https://tomcat.apache.org/download-90.cgi
9.0.26
Binary Distributions
Core:
Tar.gz
two。 Extract and rename the directory to tomcat9
# tar zxvf apache-tomcat-9.0.26.tar.gz
# mv / opt/apache-tomcat-9.0.26 / opt/tomcat9
3. Start Tomcat
Cd / usr/local/tomcat/bin
. / startup.sh
Close Tomcat
. / shutdown.sh
4. Browser access: http://ip address: 8080 /
5. Configure as a service, start automatically
Cd / usr/lib/systemd/system
Vim tomcat.service
[Unit] Description=TomcatAfter=syslog.target network.target remote-fs.target nss-lookup.target [Service] Type=oneshotExecStart=/opt/tomcat9/bin/startup.shExecStop=/op/tomcat9/bin/shutdown.shExecReload=/bin/kill-s HUP $MAINPIDRemainAfterExit=yes [Install] WantedBy=multi-user.target
Systemctl enable tomcat.service starts with boot
Systemctl start tomcat.service start
Systemctl stop tomcat.service shuts down
Systemctl status tomcat.service View
Systemctl restart tomcat.service restart
6. Modify port 8080 to 80
Modify / opt/tomcat/conf/server.xml file
7. Add port number 8080 to the firewall whitelist
Firewall-cmd-zone=public-add-port=8080/tcp-permanent
[description]:
-zone scope
-add-port=8080/tcp add port, format: Port / communication protocol
-permanent # is in effect forever. Without this parameter, it will expire after restart.
Refresh the firewall
Firewall-cmd-reload
Or
/ sbin/iptables-I INPUT-p tcp-- dport 8080-j ACCEPT
/ etc/rc.d/init.d/iptables save
On how to install Tomcat9 in CentOS7 to share here, I hope the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.
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.