본문 바로가기

728x90

전체 글

우분투에서 Docker 컨테이너 내에서 systemd를 실행하는 방법 우분투에서 Docker 컨테이너 내에서 systemd를 실행하는 방법 Docker 컨테이너 내에서 systemd를 실행하는 것은 기본적으로 권장되지 않지만 가능합니다. systemd를 사용하려면 컨테이너가 호스트의 init 프로세스로 설정되어야 합니다. Dockerfile 작성 vim Dockerfile FROM ubuntu:22.04 # systemd를 사용할 수 있도록 환경 변수 설정 ENV container docker # 패키지 설치 및 설정 RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \ systemd \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* /tmp/* /va.. 더보기
NGINX 및 PHP-FPM에서 파일 업로드 크기를 늘리는 방법 NGINX 및 PHP-FPM에서 파일 업로드 크기를 늘리는 방법 NGINX 설정 변경 NGINX에서 클라이언트가 업로드하는 파일 크기를 제한하는 것은 client_max_body_size 디렉티브를 사용합니다. 원하는 파일 크기로 설정해야 합니다. 기본값은 1MB입니다. vim /etc/nginx/nginx.conf http { ... client_max_body_size 100M; ... } 이 설정은 NGINX의 설정 파일에 위치하며 업로드한 파일의 최대 크기를 100MB로 제한합니다. NGINX 재시작 변경된 NGINX 설정이 적용되려면 NGINX 서비스를 다시 시작해야 합니다. sudo systemctl restart nginx PHP-FPM 설정 변경 기본 설정(Default Value) max.. 더보기
우분투에서 IPv6를 비활성화하는 방법 우분투에서 IPv6를 비활성화하는 방법 임시로 비활성화하기 시스템을 다시 부팅하면 IPv6가 다시 활성화됩니다. IPv6를 임시로 비활성화 sudo sysctl -w net.ipv6.conf.all.disable_ipv6=1 sudo sysctl -w net.ipv6.conf.default.disable_ipv6=1 이렇게 하면 현재 세션에서만 IPv6가 비활성화됩니다. 영구적으로 비활성화하기 시스템을 다시 부팅해도 IPv6가 비활성화됩니다. /etc/sysctl.conf 파일을 편집 sudo vim /etc/sysctl.conf 파일의 맨 끝에 다음 라인을 추가합니다. net.ipv6.conf.all.disable_ipv6 = 1 net.ipv6.conf.default.disable_ipv6 = 1 변.. 더보기
우분투에서 cron 작업에 대한 로그를 별도의 파일로 분리하는 방법 우분투에서 cron 작업에 대한 로그를 별도의 파일로 분리하는 방법 1. rsyslog 설정 변경 cron 로그를 별도의 파일로 보내도록 rsyslog를 구성해야 합니다. sudo vim /etc/rsyslog.d/50-default.conf default rsyslog(50-default.conf) 더보기 --- cat /etc/rsyslog.d/50-default.conf # Default rules for rsyslog. # # For more information see rsyslog.conf(5) and /etc/rsyslog.conf # # First some standard log files. Log by facility. # auth,authpriv.* /var/log/auth.log *... 더보기
Jenkins와 Docker Hub을 연동하는 방법 Jenkins와 Docker Hub을 연동하는 방법 Docker Hub 설정 Access Tokens 생성 dockerhub > Account Settings > Security dockerhub > Account Settings > Security > New Access Tokens Jenkins 설정 젠킨스 플러그인 설치 Dashboard > Jenkins 관리 > Plugins Docker plugin Docker Pipeline Docker Hub 크리덴셜 생성 Dashboard > Jenkins 관리 > Credentials Dashboard > Jenkins 관리 > Credentials > System > Global credentials (unrestricted) Kind : Usernam.. 더보기
Jenkins와 GitHub을 연동하는 방법 Jenkins와 GitHub을 연동하는 방법 GitHub 설정 Personal access tokens (classic) 생성 GitHub 계정 설정 > Settings > Developer Settings > Tokens (classic) Select scopes repo admin:org admin:repo_hook Jenkins 설정 젠킨스 플러그인 설치 Dashboard > Jenkins 관리 > Plugins Global Slack Notifier Plugin Slack Notification Plugin 슬랙 크리덴셜 생성 Dashboard > Jenkins 관리 > Credentials Dashboard > Jenkins 관리 > Credentials > System > Global cred.. 더보기
Jenkins와 Slack을 연동하여 알림을 받는 방법 Jenkins와 Slack을 연동하여 알림을 받는 방법 Slack 설정 Slack 워크스페이스에서 채널을 생성합니다. Slack 앱 관리 페이지로 이동하여 "Jenkins CI" 앱을 검색하고 추가합니다. Jenkins 설정 젠킨스 플러그인 설치 Dashboard > Jenkins 관리 > Plugins Global Slack Notifier Plugin Slack Notification Plugin 슬랙 크리덴셜 생성 Dashboard > Jenkins 관리 > Credentials Dashboard > Jenkins 관리 > Credentials > System > Global credentials (unrestricted) Kind : Secret test Scope : Global (Jenkins.. 더보기
우분투에 Gradle을 설치하는 방법 우분투에 Gradle을 설치하는 방법 테스트 환경 운영체제 정보 $ cat /etc/os-release PRETTY_NAME="Debian GNU/Linux 12 (bookworm)" NAME="Debian GNU/Linux" VERSION_ID="12" VERSION="12 (bookworm)" VERSION_CODENAME=bookworm ID=debian HOME_URL="https://www.debian.org/" SUPPORT_URL="https://www.debian.org/support" BUG_REPORT_URL="https://bugs.debian.org/" JAVA 호환성(gradle compatibility) Gradle 8.5의 바이너리(zip 파일) 다운로드 sudo wget ht.. 더보기

728x90