[中间件]redis笔记
1 redis的部署和使用
操作系统是ubuntu
可以通过包管理器 apt 安装 Redis
sudo apt update
sudo apt install redis-server
启动和管理 Redis 服务
sudo systemctl xxx redis-server
连接到 Redis 服务器
Redis 提供了一个命令行工具 redis-cli,可以用来直接与 Redis 服务器交互。
连接到 Redis 服务器
打开终端,运行以下命令连接到 Redis 服务器:
redis-cli
常用 Redis 命令
SET mykey "Hello, Redis!"
GET mykey

浙公网安备 33010602011771号