Install Tomcat under CentOS 7

Source: Internet
Author: User
website Download

1. Direct download. tar.gz installation package, Address: http://tomcat.apache.org/download-70.cgi

2. Use the wget command to download (recommended).

Wget-c http://mirrors.hust.edu.cn/apache/tomcat/tomcat-7/v7.0.70/bin/apache-tomcat-7.0.70.tar.gz

Decompression

remain the direct command:

TAR-ZXVF apache-tomcat-7.0.70.tar.gz

Start

Enter the unpacked apache-tomcat-7.0.70-bin directory and execute the command:

./startup.sh

After startup, open the browser, enter your CentOS address + port 8080 (the default port), you can see this page, you have installed and started to complete.

If you are using Xshell connection CentOS, this time may you although the installation succeeds, you enter the address and did not see above the picture, said cannot visit this website what, this time, please check CentOS Firewall is closed, also can add open 8080 ports in the iptables. This is no longer a concrete operation.

Firewall-cmd--zone=public--add-port=80/tcp--permanent
Success indicates added success

Command meaning:--zone #作用域
--ADD-PORT=80/TCP #添加端口, Format: Port/Communication protocol
--permanent #永久生效, failure after reboot without this parameter
Reboot firewall
Systemctl Restart Firewalld.service
Stop

Enter the directory and execute the command.

Here, all operations to install, start, and stop Tomcat under the CentOS system are complete.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.