Skip to content

Commit

Permalink
Update influxdata and proxmox
Browse files Browse the repository at this point in the history
  • Loading branch information
iBug committed Apr 20, 2024
1 parent 1e901f7 commit b6561f1
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 23 deletions.
28 changes: 16 additions & 12 deletions docs/influxdata.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,26 @@

对于 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/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
```shell
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/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` 等软件包。
在运行 `apt update` 之后即可安装 `influxdb``telegraf` 等软件包。

对于 CentOS/RHEL 用户,使用以下命令导入 InfluxData 的 GPG 密钥,并更新配置:

cat <<EOF | sudo tee /etc/yum.repos.d/influxdata.repo
[influxdata]
name = InfluxData Repository - Stable
baseurl = https://mirrors.ustc.edu.cn/influxdata/stable/\$basearch/main
enabled = 1
gpgcheck = 1
gpgkey = https://repos.influxdata.com/influxdata-archive_compat.key
EOF
```shell
cat <<EOF | sudo tee /etc/yum.repos.d/influxdata.repo
[influxdata]
name = InfluxData Repository - Stable
baseurl = https://mirrors.ustc.edu.cn/influxdata/stable/\$basearch/main
enabled = 1
gpgcheck = 1
gpgkey = https://repos.influxdata.com/influxdata-archive_compat.key
EOF
```

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

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

修改 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
{% for release in debian_releases %}
{% if release.proxmox_version %}
=== "Proxmox VE {{ release.proxmox_version }}"

```shell
echo "deb https://mirrors.ustc.edu.cn/proxmox/debian/pve {{ release.codename }} pve-no-subscription" > /etc/apt/sources.list.d/pve-no-subscription.list
```
{% endif %}
{% endfor %}

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

Expand All @@ -52,17 +59,12 @@ fi

### CT Templates

另外,如果你需要使用 Proxmox 网页端下载 CT Templates,可以替换 CT
Templates 的源为 `http://mirrors.ustc.edu.cn`
另外,如果你需要使用 Proxmox 网页端或 `pveam` 命令下载 CT Templates,可以替换 CT Templates 的源为 `http://mirrors.ustc.edu.cn`

具体方法:将 `/usr/share/perl5/PVE/APLInfo.pm`
文件中默认的源地址 `http://download.proxmox.com` 替换为
`https://mirrors.ustc.edu.cn/proxmox` 即可。
具体方法:将 `/usr/share/perl5/PVE/APLInfo.pm` 文件中默认的源地址 `http://download.proxmox.com` 替换为 `https://mirrors.ustc.edu.cn/proxmox` 即可。

可以使用如下命令:

cp /usr/share/perl5/PVE/APLInfo.pm /usr/share/perl5/PVE/APLInfo.pm_back
sed -i 's|http://download.proxmox.com|https://mirrors.ustc.edu.cn/proxmox|g' /usr/share/perl5/PVE/APLInfo.pm
sed -i.bak 's|http://download.proxmox.com|https://mirrors.ustc.edu.cn/proxmox|g' /usr/share/perl5/PVE/APLInfo.pm

针对 `/usr/share/perl5/PVE/APLInfo.pm`
文件的修改,执行 `systemctl restart pvedaemon` 后生效。
针对 `/usr/share/perl5/PVE/APLInfo.pm` 文件的修改,执行 `systemctl restart pvedaemon` 后生效。

0 comments on commit b6561f1

Please sign in to comment.