新增适配 Gentoo 操作系统

This commit is contained in:
SuperManito
2024-07-31 21:30:10 +08:00
parent 91e9262f67
commit 74cb06dc3f
10 changed files with 303 additions and 153 deletions

View File

@@ -1,4 +1,3 @@
## 关于报错 Command not found
!!! quote ""
@@ -16,13 +15,11 @@
=== "RedHat 系 / OpenCloudOS / openEuler"
``` sh
yum install -y curl || dnf install -y curl
dnf install -y curl || yum install -y curl
```
> `Red Hat Enterprise Linux`   `CentOS`   `Rocky Linux`   `AlmaLinux`   `Fedora`   `OpenCloudOS`   `openEuler`
新装系统需要先执行一遍更新 `yum makecache`
=== "openSUSE"
``` sh
@@ -41,6 +38,12 @@
apk --no-cache add -f curl bash
```
=== "Gentoo"
``` sh
emerge --ask curl
```
## 关于开启 SSH 远程登录的方法
!!! quote ""
@@ -70,6 +73,8 @@
ps -ef | grep -q ssh ; [ $? -eq 0 ] && systemctl restart sshd || systemctl enable --now sshd
```
> 命令仅供参考,只适配了部分常见发行版
## 还原已备份的软件源
!!! quote ""
@@ -77,7 +82,7 @@
=== "Debian 系"
``` sh
cp -rvf /etc/apt/sources.list.bak /etc/apt/sources.list
cp -rf /etc/apt/sources.list.bak /etc/apt/sources.list
apt-get update
```
@@ -86,7 +91,7 @@
=== "RedHat 系 / OpenCloudOS / openEuler"
``` sh
cp -rvf /etc/yum.repos.d.bak /etc/yum.repos.d
cp -rf /etc/yum.repos.d.bak /etc/yum.repos.d
yum makecache
```
@@ -95,24 +100,32 @@
=== "openSUSE"
``` sh
cp -rvf /etc/zypp/repos.d.bak /etc/zypp/repos.d
cp -rf /etc/zypp/repos.d.bak /etc/zypp/repos.d
zypper ref
```
=== "Arch Linux"
``` sh
cp -rvf /etc/pacman.d/mirrorlist.bak /etc/pacman.d/mirrorlist
cp -rf /etc/pacman.d/mirrorlist.bak /etc/pacman.d/mirrorlist
pacman -Sy
```
=== "Alpine Linux"
``` sh
cp -rvf /etc/apk/repositories.bak /etc/apk/repositories
cp -rf /etc/apk/repositories.bak /etc/apk/repositories
apk update -f
```
=== "Gentoo"
``` sh
cp -rf /etc/portage/make.conf.bak /etc/portage/make.conf
[ -d /etc/portage/repos.conf ] && cp -rf /etc/portage/repos.conf/gentoo.conf.bak /etc/portage/repos.conf/gentoo.conf
emerge --sync --quiet
```
## 其它
!!! quote ""