Home  >  Article  >  Operation and Maintenance  >  centos system cannot access tomcat

centos system cannot access tomcat

王林
王林Original
2020-03-19 14:23:132264browse

centos system cannot access tomcat

1. Start tomcat

Enter the bin folder of the directory where tomcat is located and execute the "sh startup.sh" command to start tomcat. If the following situation occurs, tomcat starts successfully.

centos system cannot access tomcat

(Recommended tutorial: centos usage tutorial)

2. Verify whether tomcat starts successfully

Enter" ps -ef|grep tomcat " command to verify whether tomcat starts successfully. If the following situation occurs, it means the startup is successful.

centos system cannot access tomcat

3. Check whether the firewall is started.

Enter the command " firewall-cmd --state " If the following message appears: This situation indicates that it is running. If it is not running, you need to execute the command "systemctl start firewalld" to start the firewall service

centos system cannot access tomcat

4. Check whether port 8080 is opened by the firewall

Enter the command " firewall-cmd --permanent --zone=public --list-ports " If the situation shown in the figure appears, port 8080 is opened

centos system cannot access tomcat

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, If "success" appears, it means the addition is successful.

5. Restart the firewall

Enter the command "firewall-cmd --reload" to restart the firewall. If the word "success" appears, it means the restart is successful.

centos system cannot access tomcat

6. 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.

centos system cannot access tomcat

Related video tutorial recommendations: linux video tutorial

The above is the detailed content of centos system cannot access tomcat. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn