1. 개요
Redis는 Remote Dictionary System의 약자이다. 네이버의 라인 서비스, 그리고 없는 질문이 없는 개발자 사이트인 stackoverflow.com 등에 적용되어 있다. 일단 깔아야 실체를 알테니 깔아본다.
2. 설치
예전에 Redis 2.8.3을 설치해 본 적이 있었는데 다시 redis.io에 가보니 2.8.6이 나왔다. 설치는 별 것이 없다. 적절한 디렉토리 위치에서 redis.io에 있는 설치 파일을 다운로드한다.
http://download.redis.io/releases/redis-2.8.6.tar.gz
# wget http://download.redis.io/releases/redis-2.8.6.tar.gz --2014-02-24 00:12:19-- http://download.redis.io/releases/redis-2.8.6.tar.gz Resolving download.redis.io... 109.74.203.151 Connecting to download.redis.io|109.74.203.151|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 1052017 (1.0M) [application/x-gzip] Saving to: `redis-2.8.6.tar.gz' 100%[================================================================================>] 1,052,017 316K/s in 3.3s 2014-02-24 00:12:24 (316 KB/s) - `redis-2.8.6.tar.gz' saved [1052017/1052017]
tar.gz 압축을 풀고 나서 생성되는 redis-2.8.6 디렉토리에 들어간 후,
# make (생략) Hint: To run 'make test' is a good idea ;) make[1]: Leaving directory `/redis/redis-2.8.6/src' # make test cd src && make test make[1]: Entering directory `/redis/redis-2.8.6/src' You need tcl 8.5 or newer in order to run the Redis test make[1]: *** [test] 오류 1 make[1]: Leaving directory `/redis/redis-2.8.6/src' make: *** [test] 오류 2
tcl 8.5 이상이 필요하다고 한다. 그러므로 tcl부터 해결을 하자.
해당 프로젝트의 사이트는 http://sourceforge.net/projects/tcl/ 이고, 컴파일 방법은 http://www.tcl.tk/doc/howto/compile.html 을 참고한다.
tcl이 완료되면 다시 redis 로 돌아온다.
# make test
(생략)
The End
Execution time of different units:
1 seconds - unit/printver
1 seconds - unit/quit
2 seconds - unit/auth
3 seconds - unit/multi
3 seconds - unit/scan
9 seconds - unit/protocol
11 seconds - unit/expire
7 seconds - integration/aof
4 seconds - integration/rdb
24 seconds - unit/type/list
2 seconds - unit/pubsub
4 seconds - integration/convert-zipmap-hash-on-load
2 seconds - unit/slowlog
29 seconds - unit/aofrw
1 seconds - unit/introspection
2 seconds - unit/limits
15 seconds - unit/scripting
46 seconds - unit/type/list-2
47 seconds - integration/replication-psync
18 seconds - unit/dump
62 seconds - integration/replication
65 seconds - unit/type/hash
72 seconds - unit/other
28 seconds - unit/bitops
50 seconds - unit/maxmemory
79 seconds - unit/type/zset
85 seconds - unit/type/set
86 seconds - integration/replication-2
97 seconds - unit/sort
100 seconds - unit/type/list-3
102 seconds - unit/basic
127 seconds - integration/replication-3
135 seconds - integration/replication-4
128 seconds - unit/obuf-limits
328 seconds - unit/memefficiency
\o/ All tests passed without errors!
# make install
cd src && make install
make[1]: Entering directory `/redis/redis-2.8.6/src'
Hint: To run 'make test' is a good idea ;)
INSTALL install
INSTALL install
INSTALL install
INSTALL install
INSTALL install
make[1]: Leaving directory `/redis/redis-2.8.6/src'
이렇게 다 되었다. 다음에는 본격적으로 redis를 실행하고 간단히 데이터를 넣고 빼는 것까지 해 볼 예정이다.
3. 제품간 비교
3-1. Redis와 Memcached
다음 페이지를 참고한다.
3-2. Redis와 Couchbase
- Redis는 Key-Value Store이며, Couchbase는 Document Store이다.
- 둘다 오픈 소스이다.
- 둘다 샤딩을 지원한다.