본문 바로가기
서버/Redis

Redis 설치

by WYYOON 2019. 9. 23.
728x90
반응형
SMALL

OS : CentOS7

Redis Version : 4.0.11

 

#필수 라이브러리 설치

yum -y install tcl wget ruby ruby-devel ruby-irb rubygems

 

# Redis download

wget http://download.redis.io/releases/redis-4.0.11.tar.gz

 

#압축 해제

tar xvfz redis-4.0.11.tar.gz 

 

cd redis-4.0.11

 

# Redis 설치

cd deps && make hiredis lua jemalloc linenoise

cd .. && make

make test

cd src && make install

 

cd /usr/local/src/redis-4.0.11/utils

 

#install server.sh 파일 실행하여 포트 6379~6384 파일 생성

./install_server.sh

 

#redis 파일 설정

vi /etc/redis/6379.conf

bind 127.0.0.1 -> 0.0.0.0   # 모든 아이피에서 접근하도록 설정
cluster-enabled yes -> 주석 삭제
cluster-config-file nodes-6379.conf  -> 주석 삭제
cluster-node-timeout 15000 -> 주석 삭제
appendonly no -> appendonly yes

 

#프로세스 중지
pkill redis

#프로세스 재시작
/etc/init.d/redis_6379 start
/etc/init.d/redis_6380 start
/etc/init.d/redis_6381 start
/etc/init.d/redis_6382 start
/etc/init.d/redis_6383 start
/etc/init.d/redis_6384 start

 

#redis-trib.rb 실행 파일 등록

cp /usr/local/src/redis-4.0.11/src/redis-trib.rb /usr/local/bin/

728x90
반응형
SMALL

'서버 > Redis' 카테고리의 다른 글

Redis cluster 구성  (0) 2019.09.23