nosql
window redis 다운로드 github
roynus
2016. 4. 11. 09:03
버전업 되고 있는 사이트 : https://github.com/MSOpenTech/redis vs가 필요함...ㅠㅠ
아래는 대용량처리를 위한 Redis를 windows에 설치할때의 절차를 간단히 정리한 문서이다.
1. Redis 윈도우즈용 소스 다운로드
– https://github.com/MSOpenTech/redis (현재 2.8버전)
2. Visual Studio에서 컴파일
– \redis-2.8\msvs\RedisServer.sln 을 VS로 연다.
– 플랫폼을 x64로 맟추고 컴파일
– x64의 Release폴더에서 아래 실행파일을 특정폴더에 복사한다.(예:c:\Service\Redis)
redis-benchmark.exe
redis-check-aof.exe
redis-check-dump.exe
redis-cli.exe
redis-server.exe
3. 환경설정파일 복사
– \redis-2.8\msvs\setups\documentation의 redis.windows.conf을
위에서 복사한 폴더에 redis.conf파일로 복사
– redis.conf파일을 열어 몇가지 수정사항을 본인의 환경에 맞게 고친다.
| bind 127.0.0.1 port 6379 logfile "C:\Temp\Redis.log" |
4. 서비스 모드로 실행
– 서비스 등록
| C:\Service\Redis>redis-server.exe --service-install redis.conf --loglevel verbose |
– 서비스 시작
| C:\Service\Redis>redis-server.exe --service-start [1464] 15 Apr 15:14:50.298 # Redis service successfully started. |
5. 클라이언트 접속 테스트
| C:\Service\Redis>redis-cli.exe -h 127.0.0.1 -p 6379 127.0.0.1:6379> set id moramcnt OK 127.0.0.1:6379> get id "moramcnt" 127.0.0.1:6379> |
6. 서비스 중지 및 제거
– 서지스 중지
| C:\Service\Redis>redis-server.exe --service-stop [5080] 15 Apr 15:18:34.921 # Redis service successfully stopped. |
– 서비스 제거
| C:\Service\Redis>redis-server.exe --service-uninstall [4120] 15 Apr 15:18:53.580 # Redis service successfully uninstalled. |
버전업이 안되는것 같음 : https://github.com/dmajkic/redis/downloads
- DownLoad URL
| https://github.com/dmajkic/redis/downloads |
- 디렉토리 생성
- 소스위치
- 로그위치
- DataBase 위치
- 설정파일 위치
- 설정파일 생성
- 설정파일 생성(소스파일 폴더에
redis.conf
파일이 존재함)
| c:\devToos\redis\conf\redis.conf |
- BIND 수정(접속할 때 사용할 IP)
- LOGFILE 위치 설정
| c:\devTools\redis\log\redis.log |
- DIR 위치 설정(DataBase가 생성되는 위치)
- 윈도우 서비스 실행 등록
- 실행파일 다운로드
| https://github.com/kcherenkov/redis-windows-service/downloads |
- 서비스 등록
| sc create "REDIS-ST" binpath= "c:\devTools\redis\RedisService_1.1.exe c:\devTools\redis\conf\redis.conf" start= "auto" DisplayName= "REDIS" |
- 서비스 삭제
CLIENT 접속
| c:\devTools\redis\redis-cli.exe -h ${redis-ip} -p ${redis-port} |
Cluster
- redis 설정파일 생성
- redis-master.conf
- redis-slave.conf
- redis-master.conf 편집
- PORT 변경
- BIND 변경
- LOGFILE 이름 변경
| logfile /service/redis/log/redis_master.log |
- DIR 변경(DataBase가 생성되는 위치)
- DBFILENAME 이름 변경
| dbfilename /service/redis/db/dump_master.rdb |
- SECURITY 섹션에서
requirepass
주석을 풀어주고 비밀번호를 설정
| # requirepass ${password} |
- redis-slave.conf 편집
- 윈도우 서비스 실행 등록
- 마스터 서비스 등록
| sc create "REDIS-MT" binpath= "c:\devTools\redis\RedisService_1.1.exe c:\devTools\redis\conf\redis.conf" start= "auto" DisplayName= "REDIS-MASTER" |
- 마스터 서비스 삭제
- 슬레이브 서비스 등록
| sc create "REDIS-SL" binpath= "c:\devTools\redis\RedisService_1.1.exe c:\devTools\redis\conf\redis.conf" start= "auto" DisplayName= "REDIS-SLAVE" |
- 슬레이브 서비스 삭제