ubuntu20.04 安装redis-server
时间: 2023-07-21 07:06:15 浏览: 171
ubuntu安装redis和部署
在Ubuntu 20.04上安装redis-server非常简单,只需执行以下命令即可:
1. 打开终端并更新apt仓库:
```
sudo apt update
```
2. 安装redis-server:
```
sudo apt install redis-server
```
3. 安装完成后,可以使用以下命令检查redis-server是否正在运行:
```
sudo systemctl status redis-server
```
如果redis-server正在运行,您应该会看到如下输出:
```
● redis-server.service - Advanced key-value store
Loaded: loaded (/lib/systemd/system/redis-server.service; enabled; vendor preset: enabled)
Active: active (running) since Thu 2021-07-29 15:32:26 CST; 1h 47min ago
Docs: http://redis.io/documentation,
man:redis-server(1)
Main PID: 903 (redis-server)
Tasks: 4 (limit: 19035)
Memory: 4.3M
CGroup: /system.slice/redis-server.service
└─903 /usr/bin/redis-server 127.0.0.1:6379
```
现在,您已经在Ubuntu 20.04上成功安装并运行了redis-server。
阅读全文