Home >Operation and Maintenance >CentOS >centos7 system cannot access tomcat
1. Check whether the firewall is started
Enter the command "firewall-cmd --state". If the situation shown in the figure appears, it means it is running. If not Running, you need to execute the command "systemctl start firewalld" to start the firewall service
(Recommended tutorial: centos usage tutorial)
2. Check whether port 8080 is opened by the firewall
Enter the command " firewall-cmd --permanent --zone=public --list-ports " If the situation as shown in the figure appears, port 8080 is opened
If the situation shown in the picture does not occur, you need to execute the command "firewall-cmd --zone=public --add-port=8080/tcp --permanent" to open port 8080 and "success" appears. It means the addition is successful.
3. Restart the firewall
Enter the command "firewall-cmd --reload" to restart the firewall. If the word "success" appears, it means the restart is successful.
4. Verify whether the opened 8080 port is effective
Enter the command” firewall-cmd --zone=public --query-port=8080/tcp "Verify whether the 8080 port is valid. If the word "yes" appears, it means it is valid.
#At this point you can use an external browser to access tomcat in centos.
Related video tutorial sharing: linux video tutorial
The above is the detailed content of centos7 system cannot access tomcat. For more information, please follow other related articles on the PHP Chinese website!