1. Command lsof -i tcp:port (replace port with port number, such as redis port 6379) to check what program is occupying the port and display the PID, which is convenient for KILL
2. Use kill -9 pid to delete the port occupation
1. Command lsof -i tcp:port (replace port with port number, such as redis port 6379) to check what program is occupying the port and display the PID, which is convenient for KILL
2. Use kill -9 pid to delete the port occupation