日期:2014-05-16  浏览次数:20596 次

redis第一步:安装与测试

安装redis,到redis.io下载最新稳定版redis安装文件,这里的安装环境是ubuntu server 11.10 64位。

?

进入解压的目录,执行make PREFIX=/home/software/redis-2.4.6 install

?

安装最后:

?

mkdir -p /home/software/redis-2.4.6/bin

cd src

cp -p redis-server /home/software/redis-2.4.6/bin

cp -p redis-benchmark /home/software/redis-2.4.6/bin

cp -p redis-cli /home/software/redis-2.4.6/bin

cp -p redis-check-dump /home/software/redis-2.4.6/bin

cp -p redis-check-aof /home/software/redis-2.4.6/bin

mkdir -p /home/software/redis-2.4.6/conf

cd ..

cp ?redis.conf /home/software/redis-2.4.6/conf

?

将以上文件复制到redis-2.4.6安装目录下。

?

在安装文件解压目录测试runtest提示没有安装tcl8.5,再安装即可apt-get install tcl8.5,然后执行runtest查看测试即可。

?

测试结果:

Execution time of different units:
  1 seconds - unit/printver
  1 seconds - unit/quit
  1 seconds - unit/auth
  2 seconds - unit/cas
  1 seconds - unit/pubsub
  1 seconds - unit/slowlog
  4 seconds - unit/type/hash
  4 seconds - integration/aof
  1 seconds - unit/introspection
  10 seconds - unit/expire
  12 seconds - unit/protocol
  26 seconds - unit/type/list
  33 seconds - unit/type/set
  45 seconds - unit/other
  49 seconds - integration/replication-3
  51 seconds - unit/type/list-2
  47 seconds - unit/maxmemory
  61 seconds - unit/sort
  64 seconds - integration/replication-2
  65 seconds - unit/type/zset
  67 seconds - unit/basic
  67 seconds - integration/replication
  69 seconds - unit/type/list-3

!!! WARNING The following tests failed:

*** [err]: Connect multiple slaves at the same time (issue #141) in tests/integration/replication.tcl
Expected condition '$digest eq $digest0' to be true (b026d376cbb8ea1bc11ca9835b7b45663db82ac1 eq 7de5c30a5409745ad8a9e06d8242ab319c9b8368)
Cleanup: may take some time... OK

?开发测试现阶段不需slave,先忽略。

?

测试下redis能不能用,到bin目录./redis-server,./redis-cli,运行几个简单的命令测试下能用即表示安装成功。