1 Centos
The port number is assumed that occupied 8080
The first step, first check which port is occupied by a process.
To get occupied process PID, enter the command:
netstat -lnp|grep 8080
The second step, use the command:
ps 28328 // 28328为占用进程PID
View a process which is occupied.
The third step, use the command
kill -9 28328 // 28328为占用进程PID
Kill the process.