전체 글 썸네일형 리스트형 Amazon EC2 인스턴스에 Elasticsearch를 설치하는 방법 Amazon EC2 인스턴스(Amazon Linux 2)에 Elasticsearch를 설치하는 방법Elasticsearch 설치하기elasticsearch download : https://www.elastic.co/kr/downloads/past-releases/elasticsearch-8-6-1Elasticsearch 저장소 추가Elastic의 Yum 리포지토리 패키지 다운로드wget -q https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-8.6.1-x86_64.rpmwget -q https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-8.6.1-x86_64.rpm.s.. 더보기 CentOS 7에서 HAProxy를 Source Compile 방식으로 설치하는 방법 CentOS 7에서 HAProxy를 Source Compile 방식으로 설치하는 방법(source compile)테스트 환경운영체제 정보$ cat /etc/redhat-release CentOS Linux release 7.9.2009 (Core)1. 의존성 패키지 설치HAProxy 컴파일에 필요한 필수 패키지를 설치합니다.yum install -y make gcc perl pcre-devel zlib-devel openssl-devel lua-devel systemd-develLua 버전을 확인합니다.lua -vLua 5.1.4 Copyright (C) 1994-2008 Lua.org, PUC-Rio2. Lua 5.3 업그레이드HAProxy Lua 기능 사용을 위해 Lua 5.3으로 업그레이드합니다... 더보기 [리눅스] consul-template 파일 생성 consul-template 파일 생성 데이터 추가(키 등록) consul kv put web/server/config/webserv1-hostname webserv1 consul kv put web/server/config/webserv1-ip 1.1.1.1 webconfig.json.tmpl 파일 생성 vim webconfig.json.tmpl server_hostname: {{ key "web/server/config/webserv1-hostname" }} server_ip: {{ key "web/server/config/webserv1-ip" }} consul-template 명령 실행 consul-template -template "webconfig.json.tmpl:webconfig.json".. 더보기 HashiCorp Consul KV 사용하는 방법 HashiCorp Consul KV 사용하는 방법(CLI · REST API · consul-template)Consul은 단순 Key-Value 저장소 이상의 기능을 제공하지만 그중 가장 기본이자 많이 사용되는 기능이 바로 KV(Key-Value) Store입니다. consul 사용법consul kv더보기---Usage: consul kv [options] [args] This command has subcommands for interacting with Consul's key-value store. Here are some simple examples, and more detailed examples are available in the subcommands or the documentati.. 더보기 [리눅스] 리눅스에서 CPU 사용률을 계산하고, 소수점 2자리까지 출력하는 쉘 스크립트 예제 - by ChatGPT 리눅스에서 CPU 사용률을 계산하고, 소수점 2자리까지 출력하는 쉘 스크립트 예제 vim cpu-usage.sh #!/bin/bash # Get the CPU statistics from /proc/stat file cpu_stats=(`cat /proc/stat | grep '^cpu '`) # Calculate the total CPU time. total_cpu_time=0 for stat in "${cpu_stats[@]:1}"; do total_cpu_time=$((total_cpu_time + stat)) done # Calculate the CPU idle time. cpu_idle_time=${cpu_stats[4]} # Calculate the CPU usage percentage. cp.. 더보기 consul 서비스 등록 - 2 consul 서비스 등록consul nodescurl -s localhost:8500/v1/catalog/nodes | jqconsul nodes leadercurl -s localhost:8500/v1/status/leaderconsul members address listcurl -s http://127.0.0.1:8500/v1/agent/members | jq -r '.[].Addr'consul domain 확인(ptr 레코드 질의)dig @127.0.0.1 -p 8600 -x {Consul Member IP}dig @127.0.0.1 -p 8600 -x {Consul Member IP}CONSUL CLIENT ADDRESS(local ip)export CONSUL_CLIENT_ADDRESS=`ip.. 더보기 java(jdk) 설치 및 java 환경 설정 java(jdk) 설치 및 java 환경 설정테스트 환경운영체제 버전 정보$ cat /etc/redhat-release CentOS Linux release 7.8.2003 (Core)$ getconf LONG_BIT64 java downloads(java archive)- Java SE 17 Archive Downloadsjava(jdk) 설치java 파일 다운로드wget https://download.oracle.com/java/17/archive/jdk-17.0.6_linux-x64_bin.tar.gz -O /tmp/jdk-17.0.6_linux-x64_bin.tar.gzjava 압축 풀기tar xfz /tmp/jdk-17.0.6_linux-x64_bin.tar.gz -C /usr/local/jav.. 더보기 Pacemaker와 Corosync를 사용하여 NGINX의 고가용성 설정을 구성하는 방법 Pacemaker와 Corosync를 사용하여 NGINX의 고가용성(HA) 설정을 구성하는 방법테스트 환경호스트 이름서버 아이피도메인운영체제비고VIP192.168.0.60vip.cluster.local control1192.168.0.51control1.cluster.localUbuntu 22.04 LTS node3192.168.0.63node3.cluster.localUbuntu 22.04 LTS NGINX 설치curl -fsSL https://nginx.org/keys/nginx_signing.key | gpg --dearmor \ | sudo tee /usr/share/keyrings/nginx-archive-keyring.gpg >/dev/nullecho "deb [signed-by=/us.. 더보기 이전 1 ··· 129 130 131 132 133 134 135 ··· 316 다음