[步骤] 软件源的设置 (SLES 版) (通过本地镜像版)

步骤一:加载本地镜像到系统光驱

(步骤略)

步骤二:挂载本地镜像

# mount /dev/cdrom /mnt

(补充:这里以挂载 /dev/sr1 到 /mnt 目录为例)

步骤三:添加本地镜里的软件源

3.1 添加本地镜里的软件源 (通过 zypper 命令)

# zypper ar file:/mnt/Module-Basesystem SLE15-Base
# zypper ar file:/mnt/Module-Legacy SLE15-Legacy
# zypper ar file:/mnt/Module-Development-Tools SLE15-Tools

或者:

# zypper ar -f /mnt/Module-Basesystem SLE15-Base
# zypper ar -f /mnt/Module-Legacy SLE15-Legacy
# zypper ar -f /mnt/Module-Development-Tools SLE15-Tools


补充:这里以将
1) /mnt/Module-Basesystem 添加到软件源并命名为 SLE15-Base
2) /mnt/Module-Legacy 添加到软件源并命名为 SLE15-Legacy
3) /mnt/Module-Development-Tools 添加到软件源并命名为 SLE15-Tools
为例

3.1 添加本地镜里的软件源 (通过创建配置文件)

# vim /etc/zypp/repos.d/SLE15-Base.repo

创建以下内容:

[SLE15-Base]
enabled=1
autorefresh=0
baseurl=file:/mnt/Module-Development-Tools
# vim /etc/zypp/repos.d/SLE15-Legacy.repo

创建以下内容:

[SLE15-Legacy]
enabled=1
autorefresh=0
baseurl=file:/mnt/Module-Legacy
# vim /etc/zypp/repos.d/SLE15-Tools.repo

创建以下内容:

[SLE15-Tools]
enabled=1
autorefresh=0
baseurl=file:/mnt/Module-Basesystem/


补充:这里以将
1) /mnt/Module-Basesystem 添加到软件源并命名为 SLE15-Base
2) /mnt/Module-Legacy 添加到软件源并命名为 SLE15-Legacy
3) /mnt/Module-Development-Tools 添加到软件源并命名为 SLE15-Tools
为例

[步骤] Linux 软件指定版本的升级 (openSUSE & SLES 版)

步骤一:解锁软件

# zypper removelocks docker

(补充:这里以解锁 docker 软件包为例)

步骤二:显示所有可用的软件版本

# zypper se -s docker

(补充:这里以显示 docker 软件包的所有可用的版本为例)

步骤三:升级指定版本的软件

# zypper install --oldpackage docker-<version>.<architecture>

(补充:这里以升级 docker 软件包的指定版本为例)

步骤四:重新锁定软件

# zypper addlock docker

(补充:这里以重新锁定 docker 软件包为例)

步骤五:重启系统

# reboot

[排错] 解决 openSUSE & SLES 升级系统时报错 “Can’t get available migrations from server: SUSE::Connect::ApiError: Multiple base products found:……”

报错代码

Can't get available migrations from server: SUSE::Connect::ApiError: Multiple base products found: ......

分析

当上一次升级失败或者升级回滚了以后可能会报此类错误

解决方法

方法一:通过 SUSEConnect 命令回滚

1.1 通过 SUSEConnect 命令回滚

# SUSEConnect –rollback

1.2 重新升级

(步骤略)

步骤二:取消注册再重新注册

2.1 取消注册再重新注册

(步骤略)

2.2 重新升级

(步骤略)

参考文献:

https://www.suse.com/support/kb/doc/?id=000019523

[内容] Linux 生命周期

Red Hat:

RHEL

English:

https://access.redhat.com/product-life-cycles

Or:

https://access.redhat.com/support/policy/updates/errata/#Extended_Life_Cycle_Phase

Chinese:

https://access.redhat.com/product-life-cycles?product=Red%20Hat%20Enterprise%20Linux

Or:

https://access.redhat.com/zh_CN/support/policy/updates/errata#Extended_Life_Cycle_Phase

Red Hat all products

https://access.redhat.com/product-life-cycles/update_policies

Red Hat software packages

https://access.redhat.com/support/policy/updates/rhel-app-streams-life-cycle?extIdCarryOver=true&sc_cid=701f2000001OH6fAAG

SUSE:

openSUSE

English:

https://en.opensuse.org/Lifetime

Chinese:

https://zh.opensuse.org/%E4%BD%BF%E7%94%A8%E6%9C%9F%E9%99%90

SLES

https://www.suse.com/lifecycle