Skip to content

Commit 4e203a4

Browse files
authored
Merge pull request #325 from qyzhg/patch-1
docs: 新增通过 apt 安装 r-nacos 的方式 (Debian/Ubuntu)
2 parents 34ba5a7 + 2e1e58c commit 4e203a4

1 file changed

Lines changed: 38 additions & 0 deletions

File tree

README.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,45 @@ k8s支持使用 [helm](https://github.com/nacos-group/r-nacos/tree/master/deploy
161161
helm repo add rnacos https://r-nacos.github.io/helm
162162
helm install r-nacos rnacos/rnacos
163163
```
164+
#### 方式8: 通过 apt 安装 (Debian/Ubuntu)
164165

166+
由社区维护的 apt 源,每日自动跟进上游最新 release 并打包、签名分发,支持 `amd64``arm64`
167+
168+
默认源走 GitHub Pages,国内用户若访问不畅可改用下方的[国内镜像源](#国内镜像源)
169+
170+
```shell
171+
# 1. 导入 GPG 公钥
172+
sudo mkdir -p /etc/apt/keyrings
173+
curl -fsSL https://r-nacos.github.io/r-nacos-apt/KEY.gpg | sudo gpg --dearmor -o /etc/apt/keyrings/rnacos.gpg
174+
175+
# 2. 添加 apt 源
176+
echo "deb [signed-by=/etc/apt/keyrings/rnacos.gpg] https://r-nacos.github.io/r-nacos-apt stable main" | sudo tee /etc/apt/sources.list.d/rnacos.list
177+
178+
# 3. 安装并运行
179+
sudo apt update
180+
sudo apt install rnacos
181+
```
182+
183+
##### 国内镜像源
184+
185+
如果 GitHub Pages 访问不畅,可将上面的域名替换为国内镜像 `https://rnacos-img.qyzhg.cc`(同样会同步签名公钥与最新包):
186+
187+
```shell
188+
# 1. 下载并导入 GPG 公钥(走镜像,国内可达)
189+
sudo mkdir -p /etc/apt/keyrings
190+
curl -fsSL https://rnacos-img.qyzhg.cc/KEY.gpg | sudo gpg --dearmor -o /etc/apt/keyrings/rnacos.gpg
191+
192+
# 2. 添加 apt 源(域名换成镜像)
193+
echo "deb [signed-by=/etc/apt/keyrings/rnacos.gpg] https://rnacos-img.qyzhg.cc stable main" | sudo tee /etc/apt/sources.list.d/rnacos.list
194+
195+
# 3. 更新并安装 rnacos
196+
sudo apt update
197+
sudo apt install rnacos
198+
```
199+
200+
> 注意:两种源只需任选其一,不要同时配置,否则 `apt update` 会出现重复条目。
201+
202+
项目地址:[r-nacos/r-nacos-apt](https://github.com/r-nacos/r-nacos-apt)
165203

166204
测试、试用推荐使用第1、第2、第3种方式,直接下载运行就可以使用。
167205

0 commit comments

Comments
 (0)