분류 전체보기 썸네일형 리스트형 Ansible playbook에서 현재 날짜 및 시간을 얻는 방법(ansible-playbook) Ansible playbook에서 현재 날짜 및 시간을 얻는 방법(ansible-playbook) ansible_date_time fact vim current_date_time1.yml --- - name: 사용자 정의 변수에 현재 날짜 및 시간 저장 hosts: all gather_facts: true tasks: # ansible_date_time 표시 - name: Debug ansible_date_time debug: var: ansible_date_time # 변수에 ansible_date_time 사용 - name: 사용자 정의 변수에 현재 날짜 및 시간 저장 set_fact: current_date_time: "{{ ansible_date_time.date }}_{{ ansible_date.. 더보기 Nginx에서 로그 파일을 생성하는 방법 Nginx에서 로그 파일을 생성하는 방법 Nnginx 로그 파일을 생성하려면 log_format 지시자를 사용하여 로그 파일의 형식을 지정하고 access_log 또는 error_log 지시자를 사용하여 로그 파일의 경로와 이름을 지정합니다. 1. nginx 로그 파일을 생성하는 방법 server { listen 80; server_name example.com www.example.com m.example.com; access_log /var/log/nginx/www.example.com-access.log; error_log /var/log/nginx/www.example.com-error.log; # ... 다른 설정 ... } 2. nginx host 지시자를 사용하여 로그 파일을 생성하는 방법 .. 더보기 nload 사용법 nload 사용법 nload는 터미널에서 네트워크 트래픽을 실시간으로 모니터링하는 도구입니다. 1. nload 설치 Ubuntu 시스템 sudo apt-get install nload CentOS 시스템 sudo yum install nload 2. nload 명령어의 기본 사용 구문 및 옵션 nload [options] $ nload -h nload version 0.7.4 Copyright (C) 2001 - 2012 by Roland Riegel nload comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it under certain conditions. For more detai.. 더보기 bmon 사용법 bmon 사용법 bmon은 터미널에서 네트워크 밴드위스 사용량을 그래픽으로 표시하는 간단한 도구입니다. 1. bmon 설치 Ubuntu 시스템 sudo apt-get install bmon CentOS 시스템 sudo yum install bmon bmon version bmon -V $ bmon -V bmon 4.0 Copyright (C) 2001-2015 by Thomas Graf Copyright (C) 2013 Red Hat, Inc. bmon comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it under certain conditions. See the source code.. 더보기 리눅스에서 메모리 사용률이 높은 프로세스를 찾는 방법 리눅스에서 메모리 사용률이 높은 프로세스를 찾는 방법 1. top 명령어 top 명령어는 시스템 상태를 실시간으로 모니터링하는 도구로 메모리 사용률이 높은 프로세스를 확인할 수 있습니다. top을 실행한 후에는 메모리 사용량이 큰 프로세스들이 상단에 나타납니다. top 2. htop 명령어 htop은 top과 유사하지만 더 사용하기 편리하며 색상으로 시각화된 인터페이스를 제공합니다. sudo apt-get install htop 더보기 --- $ sudo apt install htop Reading package lists... Done Building dependency tree... Done Reading state information... Done The following additional pa.. 더보기 PHP 8.1에서 MongoDB 확장 모듈을 업그레이드하는 방법 PHP 8.1에서 MongoDB 확장 모듈을 업그레이드하는 방법 테스트 환경 운영체제 버전 정보 확인 $ cat /etc/redhat-release CentOS Linux release 7.9.2009 (Core) PHP 버전 정보 확인 $ php --version PHP 8.1.23 (cli) (built: Aug 30 2023 08:23:26) (NTS gcc x86_64) Copyright (c) The PHP Group Zend Engine v4.1.23, Copyright (c) Zend Technologies with Zend OPcache v8.1.23, Copyright (c), by Zend Technologies MongoDB 확장 모듈 버전 정보 확인 php -i | egrep "Mo.. 더보기 macOS에서 OpenJDK를 사용하여 JDK 17을 설치하는 방법 macOS에서 OpenJDK를 사용하여 JDK 17을 설치하는 방법 1. Homebrew 설치 터미널을 열고 다음 명령어를 사용하여 Homebrew를 설치합니다. /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" 2. OpenJDK 17 설치 Homebrew를 사용하여 OpenJDK 17을 설치합니다. brew install openjdk@17 $ brew install openjdk@17 Running `brew update --auto-update`... ==> Downloading https://ghcr.io/v2/homebrew/portable-ruby/portable-ruby.. 더보기 스크립트로 크론 작업을 추가하는 방법 스크립트로 크론 작업을 추가하는 방법 Crontab 작업 등록 환경 변수 CRON_JOB에 크론 작업을 정의 CRON_JOB="* * * * * php /apps/artisan schedule:run >> /dev/null 2>&1" www-data 사용자의 크론 테이블에 추가 echo "$CRON_JOB" | sudo crontab -u www-data - www-data 사용자의 크론 테이블 조회 crontab -u www-data -l 스크립트로 크론 작업을 추가 vim scripts.sh #!/bin/bash CRON_JOB="* * * * * php /apps/artisan schedule:run >> /dev/null 2>&1" CRON_FILE="/etc/cron.d/my_cron_job" .. 더보기 이전 1 ··· 38 39 40 41 42 43 44 ··· 175 다음