본문 바로가기

728x90

REDIS

레디스 설치 후 경고 메시지 처리 레디스 설치 후 경고 메시지 처리(redis warning)redis 로그$ tail -f /var/log/redis/redis.log...30912:M 06 Aug 2021 11:33:33.677 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.30912:M 06 Aug 2021 11:33:33.677 # Server initialized30912:M 06 Aug 2021 11:33:33.677 # WARNING overcommit_memory is set to 0! Background save may fail unde.. 더보기
CentOS 7에서 phpredis를 gitithub에서 직접 설치하는 방법 CentOS 7에서 phpredis를 gitithub에서 직접 설치하는 방법필수 패키지 설치sudo yum install -y epel-releasesudo yum install -y gcc make autoconfGitHub phpredisphpredis 5.3.4 : https://github.com/phpredis/phpredis/archive/refs/tags/5.3.4.tar.gzphpredis 다운로드GitHub에서 phpredis 소스를 다운로드합니다.wget https://github.com/phpredis/phpredis/archive/refs/tags/5.3.4.tar.gz -O phpredis-5.3.4.tar.gz압축 해제tar xfz phpredis-5.3.4.tar.gz디렉토리 .. 더보기
Docker를 사용하여 Redis 클러스터(predixy)를 설정하는 구성하는 방법 Docker를 사용하여 Redis 클러스터(predixy)를 설정하는 구성하는 방법 구성도 predixy, redis-cluster 컨테이너로 구성 git clone git clone https://github.com/anti1346/predixy-redis-cluster.git 레디스 네트워크 생성 docker network create --gateway 172.24.0.1 --subnet 172.24.0.0/16 redis-net docker-compose up cd predixy-redis-cluster docker-compose up -d 로그 출력 docker-compose logs -f 레디스 클러스터 정보 (predixy) redis info redis-cli -h localhost -c -.. 더보기
Redis 모니터링을 위한 Zabbix 템플릿을 설정하는 방법 Redis 모니터링을 위한 Zabbix 템플릿을 설정하는 방법(redis 템플릿 적용)userparameter 생성vim /etc/zabbix/zabbix_agentd.d/userparameter_redis.confUserParameter=redis.local[*], redis-cli -h 127.0.0.1 -p 6379 info | grep $1 | grep -v _human | cut -d : -f2UserParameter=redis.status[*], redis-cli -h $1 -p $2 info | grep $3 | grep -v _human | cut -d : -f2UserParameter=redis.proc, pidof redis-server | wc -l템플릿(Template App Red.. 더보기
CentOS 7에서 PHP Redis 확장 모듈을 설치하는 방법 CentOS 7에서 PHP Redis 확장(Extension) 모듈을 설치하는 방법phpredis는 PHP에서 Redis를 쉽게 사용할 수 있도록 해주는 확장 모듈입니다. 필요한 패키지 설치sudo yum install -y gcc make autoconf jemalloc tclRedis 패키지 설치sudo yum install -y redissudo systemctl --now enable redisredis-cli --versionredis-cli -h 127.0.0.1 -p 6379 pingPHP Redis Extension 모듈 설치phpredis 다운로드 및 압축 해제GitHub에서 phpredis 모듈을 다운로드하고 압축을 해제합니다.cd /usr/local/srcwget https://git.. 더보기
redis 모니터링 툴(redis-stat) 레디스 모니터링 툴 Docker 컨테이너에서 redis-stat을 설치하는 방법은 다음과 같습니다. 1. Docker 이미지 가져오기 docker pull redislabs/redis-stat 2. Redis 컨테이너 실행 docker run --rm -it --network= redislabs/redis-stat --servers : 은 Redis 서버가 실행 중인 Docker 네트워크 이름으로 대체되어야 합니다. 는 Redis 호스트 이름이나 IP 주소로 대체되어야 합니다. 는 Redis 서버가 수신 대기 중인 포트 번호로 대체되어야 합니다. 예를 들어, Redis 서버가 my-redis라는 Docker 네트워크에서 호스트 이름 redis-server와 포트 6379를 사용하는 경우 다음과 같이 실행.. 더보기
hiredis 설치(소스 컴파일)하는 방법 hiredis 설치(소스 컴파일)하는 방법 hiredis는 C 언어로 작성된 Redis 클라이언트 라이브러리입니다. hiredis의 소스 코드를 컴파일하여 설치하는 방법은 다음과 같습니다. 1. hiredis 소스 코드 다운로드 hiredis의 공식 GitHub 저장소(https://github.com/redis/hiredis)에서 원하는 버전의 소스 코드를 다운로드합니다. 여기에서는 v0.13.3을 사용한다고 가정하겠습니다. wget https://github.com/redis/hiredis/archive/v0.13.3.tar.gz 2. 압축 해제 다운로드한 tar.gz 파일을 압축 해제합니다. 이를 위해 압축 파일을 원하는 디렉터리로 이동하고 다음 명령을 실행합니다. tar xzf v0.13.3.ta.. 더보기

반응형