When your port 8080 is occupied by other applications, especially a reverse proxy like nginx, even if you delete all files about nginx, you still cannot change the port 8080 occupied by nginx, other software can only modify the default port 8080
The tomcat modification port defaults to the downloaded tomcat packageconfUnder contents
located in the conf directoryserver.xmlModify in the file
Modify at the location shown in the figure:
Finally, restart the tomca server; switch to the corresponding toncat directory in the terminal, and use sh startup.sh to complete the restart