-----------------------以下是Windows系统安装使用的------------------------
官网下载–解压文件–Shift+右键–点击(在此处打开命令窗口) –
输入命令::redis-server.exe redis.windows.conf
此时会显示一个图形。
_._
_.-``__ ''-._
_.-`` `. `_. ''-._ Redis 3.2.100 (00000000/0) 64 bit
.-`` .-```. ```\/ _.,_ ''-._
( ' , .-` | `, ) Running in standalone mode
|`-._`-...-` __...-.``-._|'` _.-'| Port: 6379
| `-._ `._ / _.-' | PID: 10352
`-._ `-._ `-./ _.-' _.-'
|`-._`-._ `-.__.-' _.-'_.-'|
| `-._`-._ _.-'_.-' | http://redis.io
`-._ `-._`-.__.-'_.-' _.-'
|`-._`-._ `-.__.-' _.-'_.-'|
| `-._`-._ _.-'_.-' |
`-._ `-._`-.__.-'_.-' _.-'
`-._ `-.__.-' _.-'
`-._ _.-'
`-.__.-'
第二步:–不要关闭第一个CMD命令,否则无法访问服务器了。
然后 解压文件–Shift+右键–点击(在此处打开命令窗口) –
输入命令: redis-cli.exe -h 127.0.0.1 -p 6379
设置键值对 set myKey hubotao
取出键值对 get myKey
输出结果为:"hubotao"
-----------------------以下是Linux系统安装使用的------------------------------
第一步:wget http://download.redis.io/releases/redis-2.8.17.tar.gz
第二步:tar xzf redis-2.8.17.tar.gz
第三步:cd redis-2.8.17
第四步:make
第五步:cd src
第六步:./redis-server
第七步:./redis-server ../redis.conf
第八步:./redis-cli
第九步:set key '
hubotao'
双引号
第十步:get key
输出:hubotao
(理论上这样的,但是实践的时候在set的时候不知道是卡住还是我的操作有误。所以没有get到。)