목록분류 전체보기 (1395)
변군이글루(Mirror)

OpenSSL을 사용하여 자체 서명된 SSL/TLS 인증서를 생성하는 방법 자체 서명된(셀프 서명된) SSL/TLS 인증서를 생성하려면 OpenSSL을 사용할 수 있습니다. 1. CSR 및 키 생성 openssl req -newkey rsa:4096 \ -x509 \ -sha256 \ -days 3650 \ -nodes \ -out _wildcard_example_com.crt \ -keyout _wildcard_example_com.key \ -subj "/C=KR/ST=Seoul/L=Jongno-gu/O=SangChul Co., Ltd./OU=Infrastructure Team/CN=*.example.com" req : CSR (Certificate Signing Request)을 생성하는 OpenS..

SSL 인증서를 PFX에서 JKS로 변환하는 방법 SSL 인증서를 PFX 파일에서 JKS(Java KeyStore) 파일로 변환하려면 keytool을 사용할 수 있습니다. keytool -importkeystore -srckeystore example.pfx -srcstoretype PKCS12 -destkeystore example.jks -deststoretype JKS example.pfx : 변환할 PFX 파일의 경로와 파일명입니다. example.jks : 생성될 JKS 파일의 경로와 파일명입니다. 명령어의 각 부분에 대한 설명 -importkeystore : 키 저장소를 가져오는 옵션입니다. -srckeystore example.pfx : 원본 키 저장소 파일의 경로와 파일명입니다. -srcs..

fio 도구를 사용하여 디스크 I/O 성능을 측정하는 방법 fio 도구는 Linux 및 Windows에서 사용할 수 있는 무료 오픈 소스 디스크 I/O 도구입니다. 다양한 유형의 I/O 작업을 시뮬레이션하여 디스크의 성능을 측정할 수 있습니다. fio 설치 Ubuntu 기반 시스템 sudo apt-get update sudo apt-get install fio CentOS 기반 시스템 sudo yum install fio fio 기본적인 문법 fio [options] [job options] fio 매개변수 ioengine : I/O 작업을 수행하는 엔진을 지정합니다. 일반적으로 libaio 엔진을 사용합니다. rw : I/O 작업의 유형을 지정합니다. 순차 읽기, 순차 쓰기, 임의 읽기, 임의 쓰기를 ..

SSH 호스트 키가 변경되었을 때 발생하는 경고 메시지를 해결하는 방법SSH 호스트 키가 변경되었을 때 발생하는 경고 메시지$ ssh-copy-id vagrant@172.17.0.3/usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/home/vagrant/.ssh/id_rsa.pub"/usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed/usr/bin/ssh-copy-id: ERROR: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ER..

Ansible에서 사용자 정의 팩트를 정의하고 사용하는 방법 사용자 정의 팩트를 정의하면 플레이북이나 템플릿에서 해당 변수를 사용하여 조건을 설정하거나 동적으로 값을 할당할 수 있습니다. 그룹 변수, 호스트 변수, /etc/ansible/facts.d 디렉토리 등이 있습니다. node Server Control node control1 Managed nodes centos7 Managed nodes ubuntu22 관리형 노드에서 facts.d 디렉토리 생성 sudo mkdir -p /etc/ansible/facts.d facts 파일 생성 cat [was_server] > was_name=php-fpm > was_version=8.1.27 > EOF [web_server] web_name=nginx w..

Ansible Facts Facts는 Ansible이 목표 호스트에서 수집하는 정보입니다. 플레이북 편집 vim gather_facts_playbook.yml --- - name: Gather Facts hosts: all gather_facts: true # 기본값이지만 명확성을 위해 여기에 지정합니다. tasks: - name: Display gathered facts debug: var: ansible_facts 이 플레이북은 모든 호스트에서 Facts를 수집하고, 수집된 Facts를 출력하는 역할을 합니다. ansible_facts 변수에는 각 호스트에서 수집된 모든 Facts가 포함되어 있습니다. Facts는 기본적으로 Ansible에 의해 수집되므로 별도로 설정하지 않아도 됩니다. gather..

ICMP Ping 테스트를 수행하는 Python 스크립트 주어진 서브넷의 호스트에 대해 ICMP Ping 테스트를 수행하는 Python 스크립트입니다. 스크립트 편집 vim check_icmp_ping.py import sys import subprocess import ipaddress def ping(host): """ 주어진 호스트에 대한 ping을 수행하고 결과를 반환합니다. """ try: # 플랫폼에 따라 ping 명령어의 형식이 다를 수 있습니다. subprocess.run(["ping", "-c", "1", "-W", "1", host], stdout=subprocess.PIPE, stderr=subprocess.PIPE, check=True) return 0 # 성공 except subp..

CentOS 7에서 nginx-module-vts 모듈을 추가하는 방법 1. 필요한 패키지 설치 sudo yum install -y epel-release sudo yum install -y gcc-c++ make rpm-build zlib-devel pcre-devel openssl-devel 2. 작업 디렉토리 생성 mkdir -p /usr/local/src/nginx-build cd /usr/local/src/nginx-build 3. nginx-module-vts 모듈 소스 다운로드 git clone https://github.com/vozlt/nginx-module-vts.git 4. Nginx 소스 다운로드 wget https://nginx.org/download/nginx-1.24.0.tar..