Alibaba Cloud centos7.3 Installation Tomcat8

Source: Internet
Author: User
Tags iptables tomcat
installation Downloadwget http://mirrors.cnnic.cn/apache/tomcat/tomcat-8/v8.0.22/bin/apache-tomcat-8.0.22.tar.gz UnzipTar Xvfz apache-tomcat-8.0.22.tar.gz MovingMV Apache-tomcat-8.0.22/usr/local Start/usr/local/apache-tomcat-8.0.22/bin/startup.sh ValidationThe Tomcat default management interface appears in the browser open http://ip:8080, indicating that the installation started successfully.

problemIf you cannot open the Tomcat default management interface, make sure that the firewall is open for Tomcat access port and it's important that there is a security group in Alibaba cloud that needs to add 8080 ports (it's been in the pit for a long time)
method one firewall (recommended):
Centos7 default is to use firewall as the firewall firewall-cmd--permanent--zone=public--add-port=8080/tcp so that the appropriate ports are opened. Firewall-cmd--reload makes the latest firewall settings rules effective.
method Two iptables:Centos7 default is firewall as a firewall, this is changed to iptables firewall step 1. Close firewall:Systemctl Stop firewalld.service #停止firewall systemctl disable Firewalld.service #禁止firewall开机启动 firewall-cmd--state # View default firewall status (show notrunning after turn off, show running after turn on) yum install iptables-services #安装iptables-services 2. Iptables firewall Vi/etc/sysconfig/iptables #编辑防火墙配置文件 Firewall iptables document Configuration Reference # Firewall configuration written by System-config-firewall & nbsp   # Manual Customization of this file are not recommended.     *filter    : INPUT accept [0:0]    : FORWARD accept [0:0]    : OUTPUT Accept [ 0:0]    -a input-m state--state established,related-j Accept    -A input-p icmp-j ACCEPT    -a input-i lo-j accept    -a input-m state--state new-m tcp-p TCP--dport 22-j accept   &NB Sp -A input-m State--state new-m tcp-p TCP--dport 8080-j ACCEPT    -A input-m State--state new-m tcp-p t CP--dport 8686-j Accept    -A input-m State--state new-m tcp-p TCP--dport 3306-j accept    - A input-m state--state new-m tcp-p TCP--dport 80-j ACCEPT    -A input-j REJECT--reject-with icmp-host-p rohibited    -A forward-j REJECT--reject-with icmp-host-prohibiteD     COMMIT My last step configuration completed after 8080 port has been unable to access troubleshooting for half a day do not know why later use the IPTABLES-F command to clear the default rules, then you can ...

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.