-
ubuntu 에서 redis 설치데이터베이스/redis 2024. 1. 16. 14:58
1. Redis PPA 추가:
sudo add-apt-repository ppa:redislabs/redis
2. 패키지 업데이트:
sudo apt update
3. Redis 설치:
sudo apt install redis-server
4. 시작 및 활성화:
sudo systemctl start redis-server
sudo systemctl enable redis-server5. 상태 확인:
sudo systemctl status redis-server
6. 로그 확인:
/var/log/redis#more redis-server.log;
WARNING Memory overcommit must be enabled! Without it,
a background save or replication may fail under low memory condition.
Being disabled , it can also cause failures without low memory condition,
see https://github.com/jemalloc/jemalloc/issues/1328.
To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then
reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
이 경고는 시스템의 메모리 오버커밋 설정이 활성화되어 있지 않을 때 발생합니다.
메모리 오버커밋은 시스템이 물리적으로 보유한 실제 메모리 양보다 더 많은 가상 메모리를 할당하는 방식입니다.
이를 통해 시스템은 메모리를 효율적으로 활용할 수 있습니다.
sudo vi /etc/sysctl.conf 파일 끝에
vm.overcommit_memory=1
추가 후 저장
sudo sysctl -p; 확인
sudo systemctl restart redis-server
'데이터베이스 > redis' 카테고리의 다른 글
redis maxmemory 값 설정에 대한 몇 가지 고려해야 할 사항 (0) 2024.01.16 redis 설정 파일 확인 및 편집 (0) 2024.01.16 Redis 설치 후, vm.overcommit_memory = 1; (0) 2023.09.20