1.首先查看占用的端口号:#netstat -antp | grep 服务名或端口号
如:
#netstat -antp | grep httpd
#netstat -antp | grep 80
结果如下:
tcp 0 0 :::port :::* LISTEN 30547/xxx
tcp 120 0 ::ffff:ip:port ::ffff:182.150.22.215:49642 CLOSE_WAIT 30547/xxx
tcp 120 0 ::ffff:ip:port ::ffff:182.150.22.215:49654 CLOSE_WAIT -
2.可以看出此端口的进程号是:30547
3.kill -9 30547
4.over
linux查看占用端口并杀掉
猜你喜欢
转载自Jokerpan.iteye.com/blog/2158079
今日推荐
周排行