查看端口 被哪个进程占用了
lsof -i:6565
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
Google 365 didi 187u IPv4 0x9de5a29dff036b09 0t0 TCP localhost:60284->localhost:6565 (ESTABLISHED)
___spruce 37278 didi 22u IPv6 0x9de5a29dfebb3751 0t0 TCP *:6565 (LISTEN)
___spruce 37278 didi 26u IPv6 0x9de5a29dfebb41d1 0t0 TCP localhost:6565->localhost:60284 (ESTABLISHED)
杀死进程
kill -9 37278
bogon:~ didi$ lsof -i tcp:8009
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
___ionia 8950 didi 7u IPv6 0xbfa0c49a1b8dc905 0t0 TCP *:8009 (LISTEN)
___ionia 8950 didi 8u IPv6 0xbfa0c49a1b8dce45 0t0 TCP bogon:8009->bogon:62419 (ESTABLISHED)
___ionia 8950 didi 9u IPv6 0xbfa0c49a1b8dc3c5 0t0 TCP bogon:8009->bogon:62420 (ESTABLISHED)
kill -9 8950