Skip to content
GwiyeomGo Tech Blog
About GwiyeomGo

redis 사용 경험

REDIS, 20231 min read

Redis 설치 (MacOS)

https://redis.io/docs/getting-started/installation/install-redis-on-mac-os/

  1. HomeBrew 설치

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

  1. Redis 설치

brew install redis

  1. Redis 실행

brew services start redis

3-1 실제로 레디스 서버에 어떤 명령어를 전달하기 위해서는 레디스 cli 라는 프로그램을 이용

redis-cli

  • 명령어는 대문자로 key,value 는 소문자 3-2 ping 명령어 전달시 pong 리턴 => redis 실행중이고 redis-cli 가 정상적으로 Redis 에 명령어 전달

PING

3-3 값 저장 ,조회

SET gwiyeom data GET gwiyeom

3-4 삭제

DEL gwiyeom

  1. Redis 종료

brew services stop redis

  1. 조회

전체 데이터 수 dbsize

전체 조회 Keys *

sta로 시작하는 key 값 조회 Keys sta*

© 2024 by GwiyeomGo Tech Blog. All rights reserved.