Redis is an open source, advanced key-value store. It is often referred to as a data structure server since keys can containstrings, hashes, lists, sets and sorted sets.
-- from http://redis.io/
1 wget make 安装
wget http://download.redis.io/redis-stable.tar.gz
tar xvzf redis-stable.tar.gz
cd redis-stable
make
注: 这里记录一下我安装过程中出现的问题:
make: Warning: File `Makefile' has modification time 5.4e+06 s in the future
cd src && make all
make[1]: Entering directory `/redis/redis-2.4.7/src'
make[1]: Warning: File `Makefile' has modification time 5.4e+06 s in the future
MAKE hiredis
make[2]: Entering directory `/redis/redis-2.4.7/deps/hiredis'
make[2]: Warning: File `Makefile' has modification time 5.4e+06 s in the future
cc -c -std=c99 -pedantic -O3 -fPIC -Wall -W -Wstrict-prototypes -Wwrite-strings -g -ggdb net.c
make[2]: cc: Command not found
make[2]: *** [net.o] Error 127
make[2]: Leaving directory `/redis/redis-2.4.7/deps/hiredis'
make[1]: *** [dependencies] Error 2
make[1]: Leaving directory `/redis/redis-2.4.7/src'
make: *** [all] Error 2
第一个问题
make: Warning: File `Makefile' has modification time 5.4e+06 s in the future
系统时间调整错了,调过来就好了
第二个问题:
make[2]: Entering directory `/redis/redis-2.4.7/deps/hiredis'
cc -c -std=c99 -pedantic -O3 -fPIC -Wall -W -Wstrict-prototypes -Wwrite-strings -g -ggdb net.c
make[2]: cc: Command not found
没安装gcc,
yum install gcc-c++
第三个问题:
make的时候显示
make[1]: Entering directory `/redis/redis-2.4.7/src'
which: no tclsh8.5 in (/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin)
You need 'tclsh8.5' in order to run the Redis test
没安装tcl
按照官网http://www.linuxfromscratch.org/blfs/view/cvs/general/tcl.html 上的安装
1 使用secureRt打开一个会话,redis-server,让其作为服务器运行
[19282] 19 Feb 23:52:57 - 1 clients connected (0 slaves), 726248 bytes in use
[19282] 19 Feb 23:53:02 - DB 0: 1 keys (0 volatile) in 4 slots HT.
[19282] 19 Feb 23:53:02 - 1 clients connected (0 slaves), 726248 bytes in use
[19282] 19 Feb 23:53:07 - DB 0: 1 keys (0 volatile) in 4 slots HT.
[19282] 19 Feb 23:53:07 - 1 clients connected (0 slaves), 726248 bytes in use
2 打开另一个会话:
ast login: Tue Feb 19 22:49:49 2013 from 192.168.1.103