IT博客汇
  • 首页
  • 精华
  • 技术
  • 设计
  • 资讯
  • 扯淡
  • 权利声明
  • 登录 注册

    CentOS8 升级 Stream

    Teacher Du发表于 2024-11-01 03:51:26
    love 0

    红帽和 CentOS 最近宣布 CentOS 将以 CentOS Stream 的形式转换为滚动发行版本。本教程中,杜老师将展示如何将 CentOS8 安装更新到 CentOS Stream。

    安装新系统源

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    [root@localhost ~]# dnf -y install centos-release-stream
    CentOS Linux 8 - AppStream 6.4 kB/s | 4.3 kB 00:00
    CentOS Linux 8 - BaseOS 7.1 kB/s | 3.9 kB 00:00
    CentOS Linux 8 - Extras 2.6 kB/s | 1.5 kB 00:00
    依赖关系解决。
    ================================================================================
    软件包 架构 版本 仓库 大小
    ================================================================================
    安装:
    centos-release-stream x86_64 8.1-1.1911.0.7.el8 extras 11 k

    事务概要
    ================================================================================
    安装 1 软件包

    总下载:11 k
    安装大小:6.6 k
    下载软件包:
    centos-release-stream-8.1-1.1911.0.7.el8.x86_64 101 kB/s | 11 kB 00:00
    --------------------------------------------------------------------------------
    总计 25 kB/s | 11 kB 00:00
    运行事务检查
    事务检查成功。
    运行事务测试
    事务测试成功。
    运行事务
    准备中 : 1/1
    安装 : centos-release-stream-8.1-1.1911.0.7.el8.x86_64 1/1
    验证 : centos-release-stream-8.1-1.1911.0.7.el8.x86_64 1/1
    Installed products updated.

    已安装:
    centos-release-stream-8.1-1.1911.0.7.el8.x86_64

    完毕!

    注意:运行命令 dnf -y install centos-release-stream 安装软件包,这包含所有需要的仓库文件。

    更新系统文件

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
    214
    215
    216
    217
    218
    219
    [root@localhost ~]# dnf -y distro-sync
    CentOS-Stream - AppStream 384 kB/s | 6.5 MB 00:17
    CentOS-Stream - Base 904 kB/s | 2.3 MB 00:02
    CentOS-Stream - Extras 7.4 kB/s | 7.0 kB 00:00
    依赖关系解决。
    ================================================================================
    软件包 架构 版本 仓库 大小
    ================================================================================
    安装:
    centos-stream-release noarch 8.4-1.el8 Stream-BaseOS 21 k
    替换 centos-linux-release.noarch 8.3-1.2011.el8
    替换 centos-release-stream.x86_64 8.1-1.1911.0.7.el8
    kernel x86_64 4.18.0-269.el8 Stream-BaseOS 5.2 M
    kernel-core x86_64 4.18.0-269.el8 Stream-BaseOS 35 M
    kernel-modules x86_64 4.18.0-269.el8 Stream-BaseOS 27 M
    升级:
    NetworkManager x86_64 1:1.30.0-0.5.el8 Stream-BaseOS 2.5 M
    NetworkManager-adsl x86_64 1:1.30.0-0.5.el8 Stream-BaseOS 139 k
    NetworkManager-bluetooth x86_64 1:1.30.0-0.5.el8 Stream-BaseOS 164 k
    NetworkManager-config-server noarch 1:1.30.0-0.5.el8 Stream-BaseOS 126 k
    NetworkManager-libnm x86_64 1:1.30.0-0.5.el8 Stream-BaseOS 1.8 M
    ...
    xorg-x11-server-Xorg x86_64 1.20.10-1.el8 Stream-AppStream 1.5 M
    xorg-x11-server-Xwayland x86_64 1.20.10-1.el8 Stream-AppStream 978 k
    xorg-x11-server-common x86_64 1.20.10-1.el8 Stream-AppStream 42 k
    yum noarch 4.4.2-3.el8 Stream-BaseOS 200 k
    zlib x86_64 1.2.11-17.el8 Stream-BaseOS 102 k
    安装依赖关系:
    fuse3 x86_64 3.2.1-12.el8 baseos 50 k
    lmdb-libs x86_64 0.9.24-1.el8 appstream 58 k
    python3-ptyprocess noarch 0.5.2-4.el8 appstream 31 k
    安装弱的依赖:
    python3-pexpect noarch 4.3.1-3.el8 appstream 138 k

    事务概要
    ================================================================================
    安装 8 软件包
    升级 492 软件包

    总下载:568 M
    下载软件包:
    189% [=====================================-] 1.6 kB/s | 1.2 189% [=====================================-] 1.6 kB/s | 1.2 288% [======================================================(1/500): python3-ptyprocess-0.5.2-4.el8.noarch. 214 kB/s | 31 kB 00:00
    (2/500): lmdb-libs-0.9.24-1.el8.x86_64.rpm 322 kB/s | 58 kB 00:00
    (3/500): python3-pexpect-4.3.1-3.el8.noarch.rpm 635 kB/s | 138 kB 00:00
    (4/500): fuse3-3.2.1-12.el8.x86_64.rpm 378 kB/s | 50 kB 00:00
    (5/500): centos-stream-release-8.4-1.el8.noarch 134 kB/s | 21 kB 00:00
    (6/500): kernel-4.18.0-269.el8.x86_64.rpm 8.4 MB/s | 5.2 MB 00:00
    ...
    (496/500): util-linux-2.32.1-26.el8.x86_64.rpm 9.1 MB/s | 2.5 MB 00:00
    (497/500): yum-4.4.2-3.el8.noarch.rpm 2.9 MB/s | 200 kB 00:00
    (498/500): wpa_supplicant-2.9-3.el8.x86_64.rpm 9.0 MB/s | 1.9 MB 00:00
    (499/500): xfsprogs-5.0.0-8.el8.x86_64.rpm 5.9 MB/s | 1.1 MB 00:00
    (500/500): zlib-1.2.11-17.el8.x86_64.rpm 2.3 MB/s | 102 kB 00:00
    --------------------------------------------------------------------------------
    总计 10 MB/s | 568 MB 00:54
    运行事务检查
    事务检查成功。
    运行事务测试
    事务测试成功。
    运行事务
    运行脚本: filesystem-3.8-4.el8.x86_64 1/1
    运行脚本: kmod-kvdo-6.2.4.26-76.el8.x86_64 1/1
    准备中 : 1/1
    运行脚本: libgcc-8.4.1-1.el8.x86_64 1/1
    升级 : libgcc-8.4.1-1.el8.x86_64 1/994
    运行脚本: libgcc-8.4.1-1.el8.x86_64 1/994
    升级 : filesystem-3.8-4.el8.x86_64 2/994
    升级 : libselinux-2.9-5.el8.x86_64 3/994
    运行脚本: libselinux-2.9-5.el8.x86_64 3/994
    升级 : glibc-langpack-en-2.28-145.el8.x86_64 4/994
    升级 : glibc-langpack-zh-2.28-145.el8.x86_64 5/994
    升级 : glibc-common-2.28-145.el8.x86_64 6/994
    运行脚本: glibc-2.28-145.el8.x86_64 7/994
    升级 : glibc-2.28-145.el8.x86_64 7/994
    运行脚本: glibc-2.28-145.el8.x86_64 7/994
    升级 : bash-4.4.19-14.el8.x86_64 8/994
    ...
    运行脚本: irqbalance-2:1.4.0-5.el8.x86_64 486/994
    升级 : rsync-3.1.3-12.el8.x86_64 487/994
    升级 : soundtouch-2.0.0-3.el8.x86_64 488/994
    运行脚本: soundtouch-2.0.0-3.el8.x86_64 488/994
    /sbin/ldconfig: /lib64/libsmbldap.so.2 不是符号链接


    升级 : libvncserver-0.9.11-17.el8.x86_64 489/994
    运行脚本: libvncserver-0.9.11-17.el8.x86_64 489/994
    /sbin/ldconfig: /lib64/libsmbldap.so.2 不是符号链接


    升级 : crontabs-1.11-17.20190603git.el8.noarch 490/994
    升级 : libgomp-8.4.1-1.el8.x86_64 491/994
    运行脚本: libgomp-8.4.1-1.el8.x86_64 491/994
    /sbin/ldconfig: /lib64/libsmbldap.so.2 不是符号链接


    升级 : unzip-6.0-44.el8.x86_64 492/994
    升级 : gpm-libs-1.20.7-17.el8.x86_64 493/994
    运行脚本: gpm-libs-1.20.7-17.el8.x86_64 493/994
    /sbin/ldconfig: /lib64/libsmbldap.so.2 不是符号链接


    升级 : libmpc-1.1.0-9.1.el8.x86_64 494/994
    升级 : lsscsi-0.32-2.el8.x86_64 495/994
    升级 : net-snmp-libs-1:5.8-19.el8.x86_64 496/994
    升级 : libertas-usb8388-firmware-2:20201118-101.git7455a360.el8. 497/994
    升级 : NetworkManager-config-server-1:1.30.0-0.5.el8.noarch 498/994
    升级 : abattis-cantarell-fonts-0.0.25-6.el8.noarch 499/994
    安装 : centos-stream-release-8.4-1.el8.noarch 500/994
    运行脚本: tuned-2.14.0-3.el8_3.1.noarch 501/994
    清理 : tuned-2.14.0-3.el8_3.1.noarch 501/994
    运行脚本: tuned-2.14.0-3.el8_3.1.noarch 501/994
    运行脚本: firewalld-0.8.2-2.el8.noarch 502/994
    清理 : firewalld-0.8.2-2.el8.noarch 502/994
    运行脚本: firewalld-0.8.2-2.el8.noarch 502/994
    运行脚本: microcode_ctl-4:20200609-2.20201112.1.el8_3.x86_64 503/994
    清理 : microcode_ctl-4:20200609-2.20201112.1.el8_3.x86_64 503/994
    运行脚本: microcode_ctl-4:20200609-2.20201112.1.el8_3.x86_64 503/994
    清理 : perl-IO-Socket-SSL-2.066-4.module_el8.3.0+410+ff426aa3.no 504/994
    清理 : grub2-pc-1:2.02-90.el8.x86_64 505/994
    ...
    运行脚本: libsepol-2.9-1.el8.x86_64 989/994
    清理 : bash-4.4.19-12.el8.x86_64 990/994
    运行脚本: bash-4.4.19-12.el8.x86_64 990/994
    清理 : glibc-langpack-zh-2.28-127.el8.x86_64 991/994
    清理 : glibc-2.28-127.el8.x86_64 992/994
    清理 : filesystem-3.8-3.el8.x86_64 993/994
    清理 : libgcc-8.3.1-5.1.el8.x86_64 994/994
    运行脚本: libgcc-8.3.1-5.1.el8.x86_64 994/994
    运行脚本: filesystem-3.8-4.el8.x86_64 994/994
    运行脚本: container-selinux-2:2.155.0-1.module_el8.4.0+641+6116a774 994/994
    运行脚本: nss-3.53.1-17.el8_3.x86_64 994/994
    运行脚本: clevis-15-1.el8.x86_64 994/994
    运行脚本: sssd-common-2.4.0-5.el8.x86_64 994/994
    运行脚本: libvirt-daemon-6.0.0-29.module_el8.4.0+547+a85d02ba.x86_6 994/994
    运行脚本: dconf-0.28.0-4.el8.x86_64 994/994
    运行脚本: libwbclient-4.13.3-1.el8.x86_64 994/994
    运行脚本: kernel-core-4.18.0-269.el8.x86_64 994/994
    sort: fflush failed: 'standard output': Broken pipe
    sort: write error

    gzip: stdout: Broken pipe

    gzip: stdout: Broken pipe
    sort: write failed: 'standard output': Broken pipe
    sort: write error

    运行脚本: kmod-kvdo-6.2.4.26-76.el8.x86_64 994/994
    sort: fflush failed: 'standard output': Broken pipe
    sort: write error

    gzip: stdout: Broken pipe

    gzip: stdout: Broken pipe
    sort: write failed: 'standard output': Broken pipe
    sort: write error

    运行脚本: libvirt-daemon-config-network-6.0.0-29.module_el8.4.0+547 994/994
    运行脚本: authselect-libs-1.2.2-1.el8.x86_64 994/994
    运行脚本: authselect-compat-1.2.2-1.el8.x86_64 994/994
    运行脚本: evolution-data-server-3.28.5-15.el8.x86_64 994/994
    运行脚本: pulseaudio-14.0-1.el8.x86_64 994/994
    运行脚本: tuned-2.15.0-1.el8.noarch 994/994
    运行脚本: microcode_ctl-4:20201112-1.el8.x86_64 994/994
    sort: fflush failed: 'standard output': Broken pipe
    sort: write error

    gzip: stdout: Broken pipe

    gzip: stdout: Broken pipe
    sort: write failed: 'standard output': Broken pipe
    sort: write error
    sort: fflush failed: 'standard output': Broken pipe
    sort: write error

    gzip: stdout: Broken pipe

    gzip: stdout: Broken pipe
    sort: write failed: 'standard output': Broken pipe
    sort: write error

    运行脚本: libgcc-8.3.1-5.1.el8.x86_64 994/994
    运行脚本: glibc-common-2.28-145.el8.x86_64 994/994
    运行脚本: glib2-2.56.4-9.el8.x86_64 994/994
    运行脚本: systemd-239-43.el8.x86_64 994/994
    运行脚本: systemd-udev-239-43.el8.x86_64 994/994
    运行脚本: gtk2-2.24.32-5.el8.x86_64 994/994
    验证 : lmdb-libs-0.9.24-1.el8.x86_64 1/994
    验证 : python3-pexpect-4.3.1-3.el8.noarch 2/994
    验证 : python3-ptyprocess-0.5.2-4.el8.noarch 3/994
    验证 : fuse3-3.2.1-12.el8.x86_64 4/994
    验证 : centos-stream-release-8.4-1.el8.noarch 5/994
    ...
    验证 : xfsprogs-5.0.0-4.el8.x86_64 990/994
    验证 : yum-4.4.2-3.el8.noarch 991/994
    验证 : yum-4.2.23-4.el8.noarch 992/994
    验证 : zlib-1.2.11-17.el8.x86_64 993/994
    验证 : zlib-1.2.11-16.el8_2.x86_64 994/994
    Installed products updated.

    已升级:
    NetworkManager-1:1.30.0-0.5.el8.x86_64
    NetworkManager-adsl-1:1.30.0-0.5.el8.x86_64
    NetworkManager-bluetooth-1:1.30.0-0.5.el8.x86_64
    NetworkManager-config-server-1:1.30.0-0.5.el8.noarch
    NetworkManager-libnm-1:1.30.0-0.5.el8.x86_64
    ...
    xorg-x11-server-Xorg-1.20.10-1.el8.x86_64
    xorg-x11-server-Xwayland-1.20.10-1.el8.x86_64
    xorg-x11-server-common-1.20.10-1.el8.x86_64
    yum-4.4.2-3.el8.noarch
    zlib-1.2.11-17.el8.x86_64

    已安装:
    centos-stream-release-8.4-1.el8.noarch fuse3-3.2.1-12.el8.x86_64
    kernel-4.18.0-269.el8.x86_64 kernel-core-4.18.0-269.el8.x86_64
    kernel-modules-4.18.0-269.el8.x86_64 lmdb-libs-0.9.24-1.el8.x86_64
    python3-pexpect-4.3.1-3.el8.noarch python3-ptyprocess-0.5.2-4.el8.noarch

    完毕!

    注意:运行 dnf -y distro-sync 命令将系统或软件包更新为特定的,这会将所有本地软件包升级到新版本。

    重新启动系统

    1
    [root@localhost ~]# reboot

    注意:使用命令 reboot 重新启动服务器。

    检查升级结果

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    [root@localhost ~]# cat /etc/os-release
    NAME="CentOS Stream"
    VERSION="8"
    ID="centos"
    ID_LIKE="rhel fedora"
    VERSION_ID="8"
    PLATFORM_ID="platform:el8"
    PRETTY_NAME="CentOS Stream 8"
    ANSI_COLOR="0;31"
    CPE_NAME="cpe:/o:centos:centos:8"
    HOME_URL="https://centos.org/"
    BUG_REPORT_URL="https://bugzilla.redhat.com/"
    REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux 8"
    REDHAT_SUPPORT_PRODUCT_VERSION="CentOS Stream"

    注意:使用命令 cat /etc/os-release 可检查升级结果。



沪ICP备19023445号-2号
友情链接