尝试使用Redis并做了一些笔记
环境:
-
- Ubuntu server 12.04.2 on VirtualBox で、メモリ512MBの1コア。
-
- OpenSSHをインストール時に選択。
-
- 2013/2/15現在で最新の以下のパッケージをインストール済。それ以外はまっさら。
zsh
make
gcc
vim
tcl
从 tar 玉的获取到失败为止。已进行部分加工。
$ wget http://redis.googlecode.com/files/redis-2.6.10.tar.gz
$ tar zxvf redis-2.6.10.tar.gz
$ cd redis-2.6.10/
$ make
cd src && make all
make[1]: Entering directory `redis-2.6.10/src'
CC adlist.o
In file included from adlist.c:34:0:
zmalloc.h:50:31: fatal error: jemalloc/jemalloc.h: No such file or directory
compilation terminated.
make[1]: *** [adlist.o] Error 1
make[1]: Leaving directory `redis-2.6.10/src'
make: *** [all] Error 2
我不知道为什么make失败了,但据说如果执行distclean操作,就能修复它,所以我将这样做。
$ make distclean
$ make
--- 省略 ---
Hint: To run 'make test' is a good idea ;)
make[1]: Leaving directory `redis-2.6.10/src'
花了一些时间,但好像顺利进行了。
然后,他告诉我去做测试,于是我就试了试。
$ make test
=== 省略 ===
!!! WARNING The following tests failed:
*** [err]: After CLIENT SETNAME, connection can still be closed in tests/unit/introspection.tcl
Expected '0' to equal or match '1'
Cleanup: may take some time... OK
make[1]: *** [test] Error 1
make[1]: Leaving directory `redis-2.6.10/src'
make: *** [test] Error 2
めちゃくちゃ時間かかった割りにテストこけてるしorz
これ調べてもぜんぜんヒットしないんで、環境的な何かですか?
嗯,调整一下心态,先确认一下是否能够动工。
$ cd src
$ ./redis-server
有一些 ASCII 艺术出现了。
打开一个新的终端窗口。
$ cd redis-2.6.10/src
$ ./redis-cli
> SET hoge:fuga "bazz"
"OK"
> GET hoge:fuga
"bazz"
嗯。虽然没有尝试其他选项(因为测试失败了),但感觉有点运行起来了。