新增 Service:Redis
@@ -0,0 +1,33 @@
|
||||
# 安裝相依套件
|
||||
|
||||
```bash
|
||||
apt update && apt install -y lsb-release curl gpg
|
||||
```
|
||||
|
||||
# 安裝 Redis 簽章
|
||||
|
||||
```bash
|
||||
curl -fsSL https://packages.redis.io/gpg | gpg --dearmor -o /usr/share/keyrings/redis-archive-keyring.gpg
|
||||
```
|
||||
|
||||
```bash
|
||||
chmod 644 /usr/share/keyrings/redis-archive-keyring.gpg
|
||||
```
|
||||
|
||||
# 加入 Redis 套件庫
|
||||
|
||||
```bash
|
||||
echo "deb [signed-by=/usr/share/keyrings/redis-archive-keyring.gpg] https://packages.redis.io/deb $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/redis.list
|
||||
```
|
||||
|
||||
# 安裝 Redis
|
||||
|
||||
```bash
|
||||
apt update && apt install -y redis
|
||||
```
|
||||
|
||||
# 啟動 Redis 伺服器
|
||||
|
||||
```bash
|
||||
systemctl enable redis-server && systemctl start redis-server && systemctl status redis-server
|
||||
```
|
||||
Reference in New Issue
Block a user