본문 바로가기

반응형

리눅스

HAProxy Statistics Page(Statistics Dashboard) HAProxy Statistics Page(Statistics Dashboard)대시보드 활성화vim /etc/haproxy/haproxy.cfglisten stats bind *:8404 mode http stats enable stats uri / stats hide-version stats realm Haproxy\ Statistics stats refresh 10s stats show-node stats auth admin:admin stats admin if TRUEhttp://{Server IP}:8404부하 테스트단일 슬롯redis-benchmark -h 192.168.0.111 -p 6379 -a mypassword \ -t set,ge.. 더보기
일반 사용자 계정으로 root 소유의 파일을 직접 쓰는 방법 일반 사용자 계정으로 root 소유의 파일을 직접 쓰는 방법리눅스에서 일반 사용자가 root 소유 파일을 직접 쓸 수는 없지만, sudo를 이용해 tee, cp, mv, editor 등의 일부 명령만 root 권한으로 실행하는 방식으로 "root 파일 쓰기" 작업을 수행할 수 있다.scp /etc/haproxy/haproxy.cfg ubuntu@192.168.0.112:/etc/haproxy/haproxy.cfgscp: dest open "/etc/haproxy/haproxy.cfg": Permission deniedscp: failed to upload file /etc/haproxy/haproxy.cfg to /etc/haproxy/haproxy.cfgscp 자체는 성공적으로 서버에 접속하지만, 파일.. 더보기
Apache에 커스텀 헤더 추가하기 Apache에 커스텀 헤더 추가하기Apache에서 커스텀 HTTP 응답 헤더를 추가하는 가장 일반적인 방법은 mod_headers 모듈을 사용합니다.mod_headers 모듈 활성화 확인vim /usr/local/apache2/conf/httpd.confLoadModule headers_module modules/mod_headers.so또는(로드된 모듈)/usr/local/apache2/bin/apachectl -M | grep headers_module headers_module (shared)Apache 설정 파일에 추가vim /usr/local/apache2/conf/httpd.conf더보기--- # # Avoid passing HTTP_PROXY environment to CGI's .. 더보기
HAProxy의 Stats 페이지에서 백엔드 서버의 상태를 제어할 때 사용하는 관리 명령 HAProxy의 "Stats 페이지" 또는 CLI(admin socket)에서 백엔드 서버(Backend Server)의 상태를 제어할 때 사용하는 관리 명령HAProxy 서버 상태 제어 옵션 상세 설명항목설명운영 시 사용 예시Set state to READY서버를 정상 동작 상태(READY) 로 설정합니다. 새로운 요청을 받을 수 있게 됩니다.점검이 끝난 서버를 다시 트래픽 풀에 복귀시킬 때Set state to DRAIN서버를 드레인 모드(DRAIN) 로 설정합니다. 기존 연결은 유지하지만, 새로운 연결은 받지 않습니다.서버 점검 전, 트래픽을 안전하게 다른 서버로 이동시키고 싶을 때Set state to MAINT서버를 점검 모드(MAINTENANCE) 로 전환합니다. HAProxy는 해당 서버를 .. 더보기
HPE DL360 Gen9 서버에서 Smart Array Controller에 진입하여 RAID 설정하는 방법 HPE ProLiant DL360 Gen9 서버에서 Smart Array Controller에 진입하여 RAID 설정하는 방법Software installed with Intelligent provisioningIntelligent Provisioning 사용(권장)전원을 켜면 "F10 Intelligent Provisioning" 메시지가 뜹니다.F10 키를 눌러 진입합니다.메뉴에서→ Set Preferences - "The EULA must be accepted to continue"→ "Perform Maintenance"→ "HP Smart Storage Administrator (SSA)"→ "Smart Array P440ar"여기서 RAID 생성, 드라이브 초기화, 논리 드라이브 생성 등을 수.. 더보기
HP DL360p Gen8 서버 오래된 BIOS 펌웨어 버그로 인한 시스템 재부팅 현상 HP DL360p Gen8 서버 오래된 BIOS 펌웨어 버그로 인한 시스템 재부팅 현상테스트 환경하드웨어 정보dmidecode -t system | egrep "Manufacturer|Product Name" Manufacturer: HP Product Name: ProLiant DL360p Gen8BIOS 펌웨어 정보dmidecode -t bios | egrep "Vendor|Version|Release Date|Address|ROM Size" Vendor: HP Version: P71 Release Date: 08/02/2014 Address: 0xF0000 ROM Size: 8192 kBCPU 정보cat /proc/cpuinfo | egrep "model name" | uniqmodel name :.. 더보기
우분투 24.04에서 APT 저장소 변경 및 패키지 설치/삭제 방법 우분투 24.04에서 APT 저장소 변경 및 패키지 설치/삭제 방법테스트 환경운영체제 버전$ lsb_release -dDescription: Ubuntu 24.04.2 LTS1. APT 저장소 변경기존 저장소 백업sudo cp /etc/apt/sources.list.d/ubuntu.sources /etc/apt/ubuntu.sources_$(date '+%Y%m%d-%H%M%S')현재 저장소 확인cat /etc/apt/sources.list.d/ubuntu.sourcesKakao 미러 서버로 변경sudo sed -i.bak 's|http://kr.archive.ubuntu.com|https://mirror.kakao.com|g' /etc/apt/sources.list.d/ubuntu.sourcess.. 더보기
우분투 24.04에서 Redis 클러스터를 구성하고 HAProxy + Keepalived로 고가용성을 확보하는 방법 우분투 24.04에서 Redis 클러스터를 구성하고 HAProxy + Keepalived로 고가용성을 확보하는 방법서버 구성 개요서버IP 주소Redis 인스턴스역할VIP192.168.0.100-클라이언트 접속용node1192.168.0.1016381, 6382Redis + HAProxy + Keepalivednode2192.168.0.1026381, 6382Redis + HAProxy + Keepalivednode3192.168.0.1036381, 6382Redis + HAProxy + Keepalived필요 패키지 설치sudo apt updatesudo apt install -y curl gnupg lsb-release커널 튜닝(Redis 성능 최적화)Swap 비활성화sudo swapoff -a(또는).. 더보기

728x90
반응형