본문 바로가기

TroubleShooting/Redis

Redis 간편 설치 in Linux

728x90

Redis 간편 설치 in Linux(CentOS)


1. Redis 다운로드

: 2015년 7월 기준 Stable 버전 3.0.3

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


2. Redis 소스 컴파일, 테스트, 설치

# tar xvfz redis-3.0.3.tar.gz

# cd redis-3.0.3

# make

# cd src

# make test

==> 컴파일한 바이너리 자체 테스트

# cd ..

==> redis-3.0.3 디렉토리로 이동

# pwd

/root/redis-3.0.3

# make install

==> /usr/local/bin 에 바이너리(redis-server, redis-cli, ...) 복사


3. Redis 서비스 스크립트 설치

# cd utils

# pwd

/root/redis-3.0.3/utils

# ./install_server.sh

==> redis 서비스 스크립트에 필요한 정보들을 설정하기 위해 대화식으로 입력할 수 있는 항목들이 나온다.

Welcome to the redis service installer

This script will help you easily set up a running redis server


Please select the redis port for this instance: [6379]

Selecting default: 6379

Please select the redis config file name [/etc/redis/6379.conf]

Selected default - /etc/redis/6379.conf

Please select the redis log file name [/var/log/redis_6379.log]

Selected default - /var/log/redis_6379.log

Please select the data directory for this instance [/var/lib/redis/6379]

Selected default - /var/lib/redis/6379

Please select the redis executable path [/usr/local/bin/redis-server]

Selected config:

Port           : 6379

Config file    : /etc/redis/6379.conf

Log file       : /var/log/redis_6379.log

Data dir       : /var/lib/redis/6379

Executable     : /usr/local/bin/redis-server

Cli Executable : /usr/local/bin/redis-cli

Is this ok? Then press ENTER to go on or Ctrl-C to abort.

Copied /tmp/6379.conf => /etc/init.d/redis_6379

Installing service...

Successfully added to chkconfig!

Successfully added to runlevels 345!

Starting Redis server...

Installation successful!


4. Redis 서비스 시작/종료

# service redis_6379 start

# service redis_6379 stop


'TroubleShooting > Redis' 카테고리의 다른 글

Redis Cluster 구성  (0) 2015.11.11
redis 간단 명령어 정리  (0) 2015.08.18