Skip to content

Commit

Permalink
Update more pages to use Debian/Ubuntu template
Browse files Browse the repository at this point in the history
  • Loading branch information
iBug committed Apr 20, 2024
1 parent 62d5226 commit c7fe448
Show file tree
Hide file tree
Showing 7 changed files with 45 additions and 38 deletions.
6 changes: 3 additions & 3 deletions docs/debiancn.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ Debian 用户使用的补充软件。

## 收录版本

- buster
- bullseye
- bookworm
{% for release in debian_releases %}
- {{ release.codename }}

Check failure on line 22 in docs/debiancn.md

View workflow job for this annotation

GitHub Actions / build

Lists should be surrounded by blank lines

docs/debiancn.md:22 MD032/blanks-around-lists Lists should be surrounded by blank lines [Context: "- {{ release.codename }}"] https://github.com/DavidAnson/markdownlint/blob/v0.33.0/doc/md032.md
{% endfor %}

目前暂无专用于 testing 和 sid 的仓库。

Expand Down
2 changes: 1 addition & 1 deletion docs/docker-ce.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ sudo DOWNLOAD_URL=https://mirrors.ustc.edu.cn/docker-ce sh get-docker.sh

!!! tip

安装完 Docker CE 之后,替换掉官方的 Docker Registry 服务,可加快拉取 Docker 镜像的速度,请参考 `dockerhub`
安装完 Docker CE 之后,替换掉官方的 Docker Registry 服务,可加快拉取 Docker 镜像的速度,请参考 [dockerhub](dockerhub.md)

## 相关链接

Expand Down
4 changes: 2 additions & 2 deletions docs/influxdata.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
对于 Debian/Ubuntu 用户,使用以下命令导入 InfluxData 的 GPG 密钥,并更新配置:

wget -q https://repos.influxdata.com/influxdata-archive_compat.key
echo '393e8779c89ac8d958f81f942f9ad7fb82a25e133faddaf92e15b16e6ac9ce4c influxdata-archive_compat.key' | sha256sum -c && cat influxdata-archive_compat.key | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/influxdata-archive_compat.gpg > /dev/null
echo 'deb [signed-by=/etc/apt/trusted.gpg.d/influxdata-archive_compat.gpg] https://mirrors.ustc.edu.cn/influxdata/debian stable main' | sudo tee /etc/apt/sources.list.d/influxdata.list
echo '393e8779c89ac8d958f81f942f9ad7fb82a25e133faddaf92e15b16e6ac9ce4c influxdata-archive_compat.key' | sha256sum -c && cat influxdata-archive_compat.key | gpg --dearmor | sudo tee /etc/apt/keyrings/influxdata-archive_compat.gpg > /dev/null
echo 'deb [signed-by=/etc/apt/keyrings/influxdata-archive_compat.gpg] https://mirrors.ustc.edu.cn/influxdata/debian stable main' | sudo tee /etc/apt/sources.list.d/influxdata.list

`apt update` 之后即可安装 `influxdb2``telegraf` 等软件包。

Expand Down
15 changes: 5 additions & 10 deletions docs/proxmox.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,9 @@ Proxmox 软件源

### Debian,Proxmox

一般情况下,需要同时修改基础系统(Debian)的源文件
`/etc/apt/sources.list` 和 Proxmox
的源文件。
一般情况下,需要同时修改基础系统(Debian)的源文件 `/etc/apt/sources.list` 和 Proxmox 的源文件。

修改基础系统(Debian)的源文件,可以使用如下命令
修改基础系统(Debian)的源文件,可以参考 [Debian 帮助](debian.md) 或使用如下命令

sed -i 's|^deb http://ftp.debian.org|deb https://mirrors.ustc.edu.cn|g' /etc/apt/sources.list
sed -i 's|^deb http://security.debian.org|deb https://mirrors.ustc.edu.cn/debian-security|g' /etc/apt/sources.list
Expand All @@ -38,11 +36,9 @@ Proxmox 软件源
source /etc/os-release
echo "deb https://mirrors.ustc.edu.cn/proxmox/debian/pve $VERSION_CODENAME pve-no-subscription" > /etc/apt/sources.list.d/pve-no-subscription.list

对于 Proxmox Backup Server 和 Proxmox Mail Gateway,请将以上命令中的
`pve` 分别替换为 `pbs``pmg`
对于 Proxmox Backup Server 和 Proxmox Mail Gateway,请将以上命令中的 `pve` 分别替换为 `pbs``pmg`

PVE 8 之后默认安装 Ceph 仓库源文件
`/etc/apt/sources.list.d/ceph.list`,可以使用如下命令更换源:
PVE 8 之后默认安装 Ceph 仓库源文件 `/etc/apt/sources.list.d/ceph.list`,可以使用如下命令更换源:

```shell
if [ -f /etc/apt/sources.list.d/ceph.list ]; then
Expand All @@ -52,8 +48,7 @@ if [ -f /etc/apt/sources.list.d/ceph.list ]; then
fi
```

更改完 `sources.list` 文件后请运行
`apt update` 更新索引以生效。
更改完 `sources.list` 文件后请运行 `apt update` 更新索引以生效。

### CT Templates

Expand Down
22 changes: 11 additions & 11 deletions docs/raspberrypi.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,22 +47,22 @@ sudo sed \
/etc/apt/sources.list.d/raspi.list
```

当然也可以直接编辑
`/etc/apt/sources.list.d/raspi.list`
文件(需要使用 sudo)。以下是 bookworm 的参考配置内容:
当然也可以直接编辑 `raspi.list` 文件(需要使用 sudo)。以下是 bookworm 的参考配置内容:

```shell
deb http://mirrors.ustc.edu.cn/raspberrypi/debian/ bookworm main
#deb-src http://mirrors.ustc.edu.cn/raspberrypi/debian/ bookworm main
```
{% for release in debian_releases %}
=== "Raspbian {{ release.codename }}"

```shell title="/etc/apt/sources.list.d/raspi.list"
deb http://mirrors.ustc.edu.cn/raspberrypi/debian/ {{ release.codename }} main
#deb-src http://mirrors.ustc.edu.cn/raspberrypi/debian/ {{ release.codename }} main
```
{% endfor %}

更改完 `raspi.list` 文件后请运行
`sudo apt-get update` 更新索引以生效。
更改完 `raspi.list` 文件后请运行 `sudo apt-get update` 更新索引以生效。

!!! tip

使用 HTTPS 可以有效避免国内运营商的缓存劫持,但 Stretch
及老版本系统需要事先安装 `apt-transport-https`。
使用 HTTPS 可以有效避免国内运营商的缓存劫持,但 stretch 及老版本系统需要事先安装 `apt-transport-https`。

## 相关链接

Expand Down
31 changes: 20 additions & 11 deletions docs/raspbian.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,20 +45,29 @@ sudo)。删除原文件所有内容,用以下内容取代(以 Bullseye 示
deb http://mirrors.ustc.edu.cn/raspbian/raspbian/ bullseye main contrib non-free rpi
# deb-src http://mirrors.ustc.edu.cn/raspbian/raspbian/ bullseye main contrib non-free rpi

Arm64 架构的 Raspberry Pi OS 仍处于 beta
状态,本镜像上游亦不含此架构。对于 arm64 的 Raspberry Pi
OS,可以直接使用 arm64 Debian 的源(以 Bullseye 示例):

deb https://mirrors.ustc.edu.cn/debian/ bullseye main contrib non-free
# deb-src http://mirrors.ustc.edu.cn/debian bullseye main contrib non-free
deb https://mirrors.ustc.edu.cn/debian/ bullseye-updates main contrib non-free
# deb-src http://mirrors.ustc.edu.cn/debian bullseye-updates main contrib non-free
deb https://mirrors.ustc.edu.cn/debian-security bullseye-security main contrib non-free
# deb-src http://mirrors.ustc.edu.cn/debian-security/ bullseye-security main non-free contrib
Arm64 架构的 Raspberry Pi OS 仍处于 beta 状态,本镜像上游亦不含此架构。对于 arm64 的 Raspberry Pi OS,可以直接使用 arm64 Debian 的源:

{% for release in debian_releases %}

{% set debian_security = release.codename + "-security" %}
{% if release.version < 11 %}
{% set debian_security = release.codename + "/updates" %}
{% endif %}
=== "Raspbian {{ release.codename }}"

```shell title="/etc/apt/sources.list"
deb https://mirrors.ustc.edu.cn/debian/ {{ release.codename }} main contrib non-free
# deb-src http://mirrors.ustc.edu.cn/debian {{ release.codename }} main contrib non-free
deb https://mirrors.ustc.edu.cn/debian/ {{ release.codename }}-updates main contrib non-free
# deb-src http://mirrors.ustc.edu.cn/debian {{ release.codename }}-updates main contrib non-free
deb https://mirrors.ustc.edu.cn/debian-security {{ debian_security }} main contrib non-free
# deb-src http://mirrors.ustc.edu.cn/debian-security/ {{ debian_security }}-security main non-free contrib
```
{% endfor %}

编辑此文件后,请使用 `sudo apt-get update` 命令,更新软件索引。

同时也可能需要更改 archive.raspberrypi.org 源,请参考 `raspberrypi`
同时也可能需要更改 archive.raspberrypi.org 源,请参考 [raspberrypi](raspberrypi.md)

## 相关链接

Expand Down
3 changes: 3 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,13 @@ extra:
debian_releases:
- version: 12
codename: bookworm
proxmox_version: 8
- version: 11
codename: bullseye
proxmox_version: 7
- version: 10
codename: buster
proxmox_version: 6
ubuntu_releases:
- name: 22.04
codename: jammy
Expand Down

0 comments on commit c7fe448

Please sign in to comment.