下载地址
http://download.redis.io/releases/
下载编译
$ wget http://download.redis.io/releases/redis-5.0.7.tar.gz
$ tar xzf redis-5.0.7.tar.gz
$ cd redis-5.0.7
$ make
$ cd src
使用命令
- 启动
[root@izm5e11cqeaucml4d3vumbz src]# ./redis-server ./../redis.conf
18613:C 29 Feb 2020 20:07:48.465 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
18613:C 29 Feb 2020 20:07:48.465 # Redis version=5.0.4, bits=64, commit=00000000, modified=0, pid=18613, just started
18613:C 29 Feb 2020 20:07:48.465 # Configuration loaded
--- 查看是否启动成功
[root@izm5e11cqeaucml4d3vumbz src]# ps -ef|grep redis
root 18614 1 0 20:07 ? 00:00:00 ./redis-server *:6379
root 18619 18398 0 20:08 pts/1 00:00:00 grep --color=auto redis
或
./redis-server
- 关闭
[root@izm5e11cqeaucml4d3vumbz src]# ./redis-cli shutdown
(error) NOAUTH Authentication required.
-- 如果设置了密码,没有密码,报以上错误,输入以下代码
[root@izm5e11cqeaucml4d3vumbz src]# ./redis-cli
127.0.0.1:6379> auth password
OK
127.0.0.1:6379> shutdown NOSAVE
not connected>
-- 查看redis是否成功关闭
[root@izm5e11cqeaucml4d3vumbz src]# ps -ef|grep redis
root 18612 18398 0 20:05 pts/1 00:00:00 grep --color=auto redis
参考资料:
https://www.cnblogs.com/jtfr/p/10503803.html
https://redis.io/download
可视化远程连接工具
Redis Desktop Manager
http://www.downza.cn/soft/210734.html
https://blog.csdn.net/weter_drop/article/details/91356184
书籍推荐
Redis深度历险:核心原理和应用实践
查看redis版本
- 服务端
[root]$ ./redis-server -v
Redis server v=5.0.4 sha=00000000:0 malloc=jemalloc-5.1.0 bits=64 build=afe85cb91d612b1e
- 客户端
[root@]$ ./redis-cli -v
redis-cli 5.0.4
windows版本
https://github.com/microsoftarchive/redis/releases
在3.0版本以后已经没有维护。
网友评论