1.查找被占用的端口

//查看端口应用状况netstat -tln//只查看端口8080的应用状况netstat -tln | grep 8080

2.查看端口被哪个过程占用

lsof -i :8080

3.杀掉占用端口的过程

kill -9 过程id