728x90
반응형
1. Redis install
https://github.com/microsoftarchive/redis/releases/tag/win-3.2.100
Release 3.2.100 · microsoftarchive/redis
This is the first release of Redis on Windows 3.2. This release is based on antirez/redis/3.2.1 plus some Windows specific fixes. It has passed all the standard tests but it hasn't been tested in a...
github.com
2. Ruby 설치
https://www.ruby-lang.org/ko/documentation/installation/
Ruby 설치하기
Ruby를 설치하고 관리할 수 있는 다양한 패키지 관리 시스템들과 서드파티 도구들이 있습니다. 컴퓨터에 이미 Ruby가 설치되어 있을 수도 있습니다. 이를 확인하려면 터미널을 열고 다음 명령어를
www.ruby-lang.org
3. Redis Ruby lib 설치
gem install redis
## 에러날 경우 아래로 실행
gem sources --remove https://rubygems.org/
gem sources -a http://rubygems.org/
y
gem install redis
4. Redis node > replicas 1 = 6노드 필요, replicas 2 = 9노드 필요
#redis.6380.conf
appendonly yes
appendfilename "appendonly.6380.aof"
cluster-enabled yes
cluster-config-file nodes-6380.conf
cluster-node-timeout 15000
cluster-slave-validity-factor 10
cluster-migration-barrier 1
cluster-require=full-coverage yes
masterauth password123
5. Windows 서비스 등록
redis-server.exe --service-install redis.6379.conf --service-name 6379
redis-server.exe --service-start --service-name 6379
redis-server.exe --service-install redis.6380.conf --service-name 6380
redis-server.exe --service-start --service-name 6380
redis-server.exe --service-install redis.6381.conf --service-name 6381
redis-server.exe --service-start --service-name 6381
redis-server.exe --service-install redis.6382.conf --service-name 6382
redis-server.exe --service-start --service-name 6382
redis-server.exe --service-install redis.6383.conf --service-name 6383
redis-server.exe --service-start --service-name 6383
redis-server.exe --service-install redis.6384.conf --service-name 6384
redis-server.exe --service-start --service-name 6384
.
.
.
.
.
#서비스 종료
redis-server --service-stop --service-name 6379
redis-server --service-uninstall --service-name 6379
6. redis-trib.rb 를 통한 클러스터 생성
ruby redis-trib.rb create --replicas 1 127.0.0.1:6379 127.0.0.1:6380 127.0.0.1:6381 127.0.0.:6382 127.0.0.1:6383
728x90
반응형
'DB' 카테고리의 다른 글
데이터베이스 클러스터링/레플리케이션/샤딩 차이점 (0) | 2022.11.07 |
---|---|
MongoDB 명령어 정리 (createUser, DB, drop ..) (0) | 2021.02.18 |