[步骤] 系统升级 (从 openSUSE Leap 15.6 升级到 openSUSE Leap 16.0)

步骤一:显示现在的系统版本

# cat /etc/*release*
NAME="openSUSE Leap"
VERSION="15.6"
ID="opensuse-leap"
ID_LIKE="suse opensuse"
VERSION_ID="15.6"
PRETTY_NAME="openSUSE Leap 15.6"
ANSI_COLOR="0;32"
CPE_NAME="cpe:/o:opensuse:leap:15.6"
BUG_REPORT_URL="https://bugs.opensuse.org"
HOME_URL="https://www.opensuse.org/"
DOCUMENTATION_URL="https://en.opensuse.org/Portal:Leap"
LOGO="distributor-logo-Leap"

(注意:确保显示的系统版本是 openSUSE Leap 15.6)

步骤二:准备升级

2.1 确认已使用的软件库

# zypper ls -d
# | Alias       | Name        | Enabled | GPG Check | Refresh | Priority | Type   | URI
--+-------------+-------------+---------+-----------+---------+----------+--------+-------------------------------------------------------------------------
1 | Debug-OSS   | Debug-OSS   | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://download.opensuse.org/debug/distribution/leap/15.6/repo/oss/
2 | Non-OSS     | Non-OSS     | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://download.opensuse.org/distribution/leap/15.6/repo/non-oss/
3 | OSS         | OSS         | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://download.opensuse.org/distribution/leap/15.6/repo/oss/
4 | Src-Non-OSS | Src-Non-OSS | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://download.opensuse.org/source/distribution/leap/15.6/repo/non-oss/
5 | Src-OSS     | Src-OSS     | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://download.opensuse.org/source/distribution/leap/15.6/repo/oss/


补充:
1) 确保以上软件库已处于 Enabled 状态
2) 手动启动这些软件库的命令如下

# zypper ar -f http://download.opensuse.org/distribution/leap/\$releasever/repo/oss/ OSS
# zypper ar -f http://download.opensuse.org/distribution/leap/\$releasever/repo/non-oss/ Non-OSS
# zypper ar -f http://download.opensuse.org/source/distribution/leap/\$releasever/repo/oss/ Src-OSS
# zypper ar -f http://download.opensuse.org/source/distribution/leap/\$releasever/repo/non-oss/ Src-Non-OSS
# zypper ar -f http://download.opensuse.org/debug/distribution/leap/\$releasever/repo/oss/ Debug-OSS

2.2 刷新已使用的软件库

# zypper ref

(注意:确保刷新成功,否则请检查网络)

2.3 将所有 openSUSE Leap 15.6 软件包更新到最新版本

# zypper -n update

2.4 用 releasever 变量替换所有版本号

# sed -i 's/15.6/${releasever}/g' /etc/zypp/repos.d/*.repo

步骤三:升级系统

3.1 升级系统

# sudo zypper --releasever 16.0 dup

3.2 重启系统

# reboot