这是本文档旧的修订版!


Redis 服务

Redis Docs 按照官方说明ubuntu系统下进行安装就好。

安装与访问

前台启动服务 redis-server 按 ctrl + c 即可终止服务。后台启动使用

systemctl start redis-server
systemctl status redis-server
systemctl stop redis-server
systemctl restart redis-server
// 或者
service redis-server restart

访问服务器 (mac也就是客户端 本地redis服务也需要启动)

redis-cli // 访问本地
redis-cli -h serverfin -p 6379

加密访问

设置密码:

  1. 方法1:修改 /etc/redis/redis.conf 文件, “requirepass <password>” 并重启服务
  2. 方法2:CONFIG set requirepass "<pw>"

客户端连接

download

redis-cli -h serverfin -p 6379
serverfin:6379> AUTH "138629"
serverfin:6379> subscribe maichannel // 认证后才允许订阅频道
it/server/redis.1660733633.txt.gz · 最后更改: 2022-08-17 10:53 由 goldentianya
回到顶部
CC Attribution-Share Alike 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0