본문 바로가기
728x90
반응형

분류 전체보기355

[HTTPS] certbot 사용법 : chain 삭제 Letsencrypt 에서의 Chain이란 동일한 certification 을 사용하는 domains를 설정하는 단위. /etc/letsencrypt/live 에 Chain명의 directory가 존재함. 해당 directory 밑에 관련 certification, key등이 존재. Chain 삭제가 필요한 경우 Domain을 사용하지 않게 되거나 특정 domain을 다른 서버로 이전시키는 등의 일이 발생하는 경우, 해당 Chain을 삭제해야함. 단, nginx 등에서 사용하지 않는 것을 반드시 체크하고 지워야 함. Chain 삭제 명령어 certbot delete --cert-name 삭제 대상들의 위치. /etc/letsencrypt/live/ /etc/letsencrypt/archive/ /etc/.. 2023. 9. 10.
[Tip] 특정 문구가 있는 process들을 모두 kill kill -9 `ps -ef|grep gunicorn|awk '{print $2}'` gunicorn과 관련된 모든 process들을 종료시킴. 2023. 9. 8.
[Tip] 특정 port 사용 중인 프로세스 종료시키기 sudo lsof -t -i tcp:80 -s tcp:listen | sudo xargs kill 80 port에서 TCP소켓으로 listen 상태인 process의 Process ID를 반환 : sudo lsof -t -i tcp:80 -s tcp:listen xargs로 앞서 수행의 결과인 Process ID들을 kill의 인자로 넘겨줌. 2023.09.08 - [Linux] - [Command] lsof : 열린 파일 혹은 port 관련 정보 출력 [Command] lsof : 열린 파일 혹은 port 관련 정보 출력 lsof 는 list open files 의 약자로, 시스템에서 열린 파일 목록과 관련 정보를 알려줌. 해당 관련 정보는 다음과 같이 표시됨. COMMAND : 실행한 명령어 PID .. 2023. 9. 8.
[Command] lsof : 열린 파일 혹은 port 관련 정보 출력 lsof 는 list open files 의 약자로, 시스템에서 열린 파일 목록과 관련 정보를 알려줌. 해당 관련 정보는 다음과 같이 표시됨. COMMAND : 실행한 명령어 PID : process id USER : 실행한 사용자 FD : File Descriptor (cwd : current working directory, rtd : root directory, mem : memory-mapped file, txt: program text) TYPE : 파일종류 (DIR : directory, CHR : character special file, REG regular file, unix : unix socket) DEVICE : 장치번호 SIZE/OFF : 파일크기, 오프셋 NODE : node n.. 2023. 9. 8.
[Error] apt update 시 InRelease is not valid yet 에러 해결 apt update 시 다음의 에러 라인들이 보이는 경우가 WSL2에선 가끔 있다. E: Release file for http://archive.ubuntu.com/ubuntu/dists/jammy-updates/InRelease is not valid yet (invalid for another 15h 12min 3s). Updates for this repository will not be applied.이는 현재 시스템의 시간 설정이 실제 시간과 다를 경우 발생한다. 이 경우, 시스템의 time clock 관리툴인 hwclock을 이용하여 hardware의 clock으로 system의 clock을 설정하면 된다. 명령어는 다음과 같다. sudo hwclock --hctosys이같이 시간을 제대로 .. 2023. 9. 8.
[zsh] 사용자 Shell 확인 및 변경하기. 사실 linux를 따로 배운 적이 없이, 업무 중에 조금씩 익혀나간터라...권장되는 방법인지 자신이 없다. ==;;가장 쉬운 방법은 환경변수 SHELL을 확인하는 것임.echo ${SHELL}환경변수가 아닌 직접 설정 파일을 통해 사용자의 shell을 확인하고 변경하는 방법은/etc/passwd를 열어서 확인하고 수정하는 것이다 (당연히 sudo를 이용해야 한다). 내가 주로 사용하는 id인 dsaint31에 대한 라인은 현재 다음과 같다.dsaint31:x:1000:1000:,,,:/home/dsaint31:/home/linuxbrew/.linuxbrew/bin/zshzsh를 사용하고 있다. (brew를 통해 설치): colon이 separator이고 맨 마지막의 /home/dsaint31:/home/.. 2023. 9. 8.
728x90
반응형