Home > Operation and Maintenance > CentOS > About deploying tomcat on centos and solving remote access ban

About deploying tomcat on centos and solving remote access ban

藏色散人
Release: 2020-12-02 15:14:53
forward
2370 people have browsed it

The following column centos basic tutorial will introduce to you how to deploy tomcat in centos and solve the remote access ban. I hope it will be helpful to friends in need!

About deploying tomcat on centos and solving remote access ban

Deploy tomcat

1. Use the scp command to upload the tomcat compressed package downloaded from the website to the server, and then decompress it to the /usr/local directory. About scp is used as follows:

  • Transfer client data to the server

scp ./filename username@IP:/home/bio321/Desktop

  • The server-side data is transferred to the client

scp username@IP:/home/bio321/Desktop/filename ./data

2. After deployment, access the tomcat connection and access localhost:8080 locally. Successfully, the remote ping 172.28.162.62:8080 prompts that the host cannot be found and remote access is denied. The solution is as follows:

1. View tomcat process information:
ps -ef |grep tomcat
2. View the port number occupied by the process number:
netstat -apn | grep 9119
It is found that there is no problem with the port number, so the problem should be checked elsewhere;
3. Check whether the Linux firewall opens the tomcat port:
If it is not set, the Tomcat port number is disabled by default, because Linux ports will only open port 22 by default
You need to set up a firewall and open port access permissions (it is not recommended to turn off the firewall directly)
Set open port command:
firewall-cmd --zone=public --add-port=8080/tcp permanent
4. Restart the firewall
firewall-cmd --reload

The above is the detailed content of About deploying tomcat on centos and solving remote access ban. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:segmentfault.com
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template