Database

[Redis] 레디스 설치 및 기본 기능

HSRyuuu 2023. 11. 7. 09:15

Redis 설치

https://redis.io/docs/install/install-redis/install-redis-on-linux/

 

Install Redis on Linux

How to install Redis on Linux

redis.io

위의 Redis 공식 사이트에서 설치할 수 있다.

Window의 경우 ubuntu 리눅스 서버 설치 후에 사용하는 것을 추천한다.

 


Redis 실행

redis 실행 명령어

~$ redis-server

위와 같이 6379 port로 redis가 실행된다.

 


Redis client

redis client 실행 명령어

~$ redis-cli

 


 

기본 명령어

SET (key) (value)

hello - world의 key value 쌍을 생성한다,

 

GET (key)

hello라는 key를 가진 데이터의 value를 반환한다.

 

DEL (key)

hello란 key를 가진 데이터를 삭제한다.

 

keys *

모든 키를 조회한다.

 

반응형