728x90
ubuntu 22.04에 redis를 설치하는 방법
테스트 환경
$ lsb_release -d
Description: Ubuntu 22.04 LTS
redis 설치
redis repository 추가
curl -fsSL https://packages.redis.io/gpg | sudo gpg --dearmor -o /usr/share/keyrings/redis-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/redis-archive-keyring.gpg] https://packages.redis.io/deb $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/redis.list
로컬 apt 패키지 캐시 업데이트
sudo apt-get update
redis 설치
sudo apt-get install -y redis
redis 버전 정보 확인
redis-server --version
$ redis-server --version
Redis server v=7.0.7 sha=00000000:0 malloc=jemalloc-5.2.1 bits=64 build=2260280010e18db8
systemctl --now enable redis-server
728x90
redis 구성
redis.conf(/etc/redis/redis.conf) 편집
- bind 아이피 변경
redis 연결 확인
redis-cli ping
$ redis-cli ping
PONG
key-value 설정 테스트
redis-cli set foo bar
$ redis-cli set foo bar
OK
redis-cli get foo
$ redis-cli get foo
"bar"
참고URL
- Install Redis on Linux : https://redis.io/docs/getting-started/installation/install-redis-on-linux/
- 최신 버전의 레디스(redis) 설치하기 : https://scbyun.com/1079
728x90
'리눅스' 카테고리의 다른 글
Ubuntu에서 Supervisor를 설치하는 방법 (0) | 2023.01.11 |
---|---|
웹 서버에서 HSTS(HTTP Strict Transport Security)를 설정하는 방법 (0) | 2023.01.10 |
Ubuntu에 Node.js와 npm을 설치하는 방법 (0) | 2023.01.10 |
apt(dpkg) error (0) | 2023.01.09 |
Ubunut에서 MySQL 8을 바이너리 파일로 설치하는 방법 (0) | 2023.01.09 |