-
RHEL에서 port에 실행 중인 프로세스 확인하기인프라/linux 2024. 4. 12. 16:09
80포트에 도커 컨테이너를 띄우려고 하는데 자꾸 이미 80 포트에 프로세스가 있다고 이야기합니다.
아무리 생각해도 80에 띄워놓것이 없는데 이상하여 한번 찾아봅니다.
$ lsof -i :80
맥에서는 기본으로 설치되어있어서 별 생각없이 사용했는데 RHEL에서는 yum으로 별도의 설치가 필요한 패키지인 것 같습니다.
그렇다면 다른 명령어로 확인해봅니다.
$ sudo ss -tulpn | grep :80
며칠 전에 테스트를 위해 띄워놓은 nginx가 문제였습니다.
PID 1049번에서 Nginx가 실행 중이니 해당 프로세스를 제거해보겠습니다.
$ sudo kill 1048
제거 되지 않고 다른 프로세스에서 다시 살아납니다?
Nginx 를 종료하는 명령어로 정지시켜봅니다.
$ sudo nginx -s stop
해당 프로세스가 정리 되는 것을 확인할 수 있습니다.
'인프라 > linux' 카테고리의 다른 글
Swapfile은 무엇이길래 메모리 부족을 해결해주는가? (0) 2024.04.18 자주 사용하는 리눅스 명령어 정리 (0) 2024.04.18 scp - secured copy protocol (0) 2024.03.22 Linux에서 사용자에 따른 환경변수 설정 (0) 2024.03.17 EC2 RHEL 9.3에서 htop 설치하기 (0) 2024.02.15