Meskipun CentOS 8 / RHEL 8 baru-baru ini dirilis, akan ada beberapa pembaruan yang menunggu sistem Anda karena komunitas CentOS / Red Hat sangat sering merilis pembaruan untuk sistem operasinya.
Dalam beberapa kasus, tepat setelah penginstalan sistem operasi, Anda akan melihat pembaruan menunggu penginstalan.
BACA: Cara Menginstal CentOS 8
BACA: Cara Menginstal Red Hat Enterprise Linux 8
Panduan ini membantu Anda cara memperbarui sistem CentOS 8 / RHEL 8 untuk mendapatkan paket terbaru yang diperbarui atau rilis minor OS (seperti CentOS 8.1 / RHEL 8.1) pada sistem serta untuk menjaga keamanan sistem.
Cadangan
Sebelum melakukan pembaruan OS, disarankan untuk mengambil cadangan file penting ke lokasi yang aman.Perbarui CentOS 8 / RHEL 8
Periksa Pembaruan
Pertama, mari kita lihat pembaruan apa yang menunggu sistem Anda.
yum check-update
Keluaran:
Pembaruan berikut tersedia untuk mesin saya.
Last metadata expiration check: 0:00:37 ago on Wed 23 Oct 2019 04:43:10 AM EDT. bash.x86_64 4.4.19-8.el8_0 BaseOS bind-export-libs.x86_64 32:9.11.4-17.P2.el8_0.1 BaseOS epel-release.noarch 8-6.el8 epel grub2-common.noarch 1:2.02-66.el8_0.1 BaseOS grub2-pc.x86_64 1:2.02-66.el8_0.1 BaseOS grub2-pc-modules.noarch 1:2.02-66.el8_0.1 BaseOS grub2-tools.x86_64 1:2.02-66.el8_0.1 BaseOS grub2-tools-extra.x86_64 1:2.02-66.el8_0.1 BaseOS grub2-tools-minimal.x86_64 1:2.02-66.el8_0.1 BaseOS initscripts.x86_64 10.00.1-1.el8_0.1 BaseOS iptables.x86_64 1.8.2-9.el8_0.1 BaseOS iptables-ebtables.x86_64 1.8.2-9.el8_0.1 BaseOS iptables-libs.x86_64 1.8.2-9.el8_0.1 BaseOS . . . . . . sssd-client.x86_64 2.0.0-43.el8_0.3 BaseOS sssd-common.x86_64 2.0.0-43.el8_0.3 BaseOS sssd-kcm.x86_64 2.0.0-43.el8_0.3 BaseOS sssd-nfs-idmap.x86_64 2.0.0-43.el8_0.3 BaseOS systemd.x86_64 239-13.el8_0.5 BaseOS systemd-libs.x86_64 239-13.el8_0.5 BaseOS systemd-pam.x86_64 239-13.el8_0.5 BaseOS systemd-udev.x86_64 239-13.el8_0.5 BaseOS Obsoleting Packages grub2-tools.x86_64 1:2.02-66.el8_0.1 BaseOS grub2-tools.x86_64 1:2.02-66.el8 @anaconda grub2-tools-efi.x86_64 1:2.02-66.el8_0.1 BaseOS grub2-tools.x86_64 1:2.02-66.el8 @anaconda grub2-tools-extra.x86_64 1:2.02-66.el8_0.1 BaseOS grub2-tools.x86_64 1:2.02-66.el8 @anaconda grub2-tools-minimal.x86_64 1:2.02-66.el8_0.1 BaseOS grub2-tools.x86_64 1:2.02-66.el8 @anaconda
Jika Anda puas dengan pembaruan, lanjutkan untuk menginstal pembaruan pada sistem Anda.
Perbarui Kernel
Sebagai tugas pertama, kami hanya akan memperbarui paket kernel OS.
Memperbarui kernel secara terpisah adalah opsional karena Anda dapat memperbarui kernel dan paket dalam satu perintah yang akan dilihat di bagian berikutnya. Karena CentOS / Red Hat tidak mengikuti tanggal yang dijadwalkan untuk merilis pembaruan, Anda tidak akan mendapatkan pembaruan Kernel setiap saat.Gunakan perintah di bawah ini untuk memperbarui kernel OS.
yum update -y kernel
Perbarui Paket
Sekarang, instal pembaruan yang tersisa untuk sistem Anda yang terkait dengan aplikasi yang sudah diinstal.
yum update
Anda akan mendapatkan daftar paket beserta ukuran unduhannya. Anda harus mengetik Y dan tekan Enter untuk memulai pembaruan.
Last metadata expiration check: 0:13:04 ago on Wed 23 Oct 2019 04:43:10 AM EDT. Dependencies resolved. ============================================================================================================================ Package Arch Version Repository Size ============================================================================================================================ Upgrading: bash x86_64 4.4.19-8.el8_0 BaseOS 1.5 M bind-export-libs x86_64 32:9.11.4-17.P2.el8_0.1 BaseOS 1.1 M grub2-common noarch 1:2.02-66.el8_0.1 BaseOS 880 k grub2-pc x86_64 1:2.02-66.el8_0.1 BaseOS 35 k grub2-pc-modules noarch 1:2.02-66.el8_0.1 BaseOS 899 k grub2-tools x86_64 1:2.02-66.el8_0.1 BaseOS 1.9 M grub2-tools-extra x86_64 1:2.02-66.el8_0.1 BaseOS 1.0 M grub2-tools-minimal x86_64 1:2.02-66.el8_0.1 BaseOS 196 k . . . . . . sssd-kcm x86_64 2.0.0-43.el8_0.3 BaseOS 207 k sssd-nfs-idmap x86_64 2.0.0-43.el8_0.3 BaseOS 94 k systemd x86_64 239-13.el8_0.5 BaseOS 3.4 M systemd-libs x86_64 239-13.el8_0.5 BaseOS 551 k systemd-pam x86_64 239-13.el8_0.5 BaseOS 222 k systemd-udev x86_64 239-13.el8_0.5 BaseOS 1.3 M epel-release noarch 8-6.el8 epel 21 k Installing dependencies: grub2-tools-efi x86_64 1:2.02-66.el8_0.1 BaseOS 444 k Transaction Summary ============================================================================================================================ Install 1 Package Upgrade 50 Packages Total download size: 47 M Is this ok [y/N]: Y << Press Y and Enter Downloading Packages: (1/51): grub2-tools-efi-2.02-66.el8_0.1.x86_64.rpm 226 kB/s | 444 kB 00:01 (2/51): bind-export-libs-9.11.4-17.P2.el8_0.1.x86_64.rpm 364 kB/s | 1.1 MB 00:03 (3/51): grub2-pc-2.02-66.el8_0.1.x86_64.rpm 346 kB/s | 35 kB 00:00 (4/51): grub2-common-2.02-66.el8_0.1.noarch.rpm 575 kB/s | 880 kB 00:01 (5/51): bash-4.4.19-8.el8_0.x86_64.rpm 413 kB/s | 1.5 MB 00:03 (6/51): grub2-pc-modules-2.02-66.el8_0.1.noarch.rpm 699 kB/s | 899 kB 00:01 (7/51): grub2-tools-minimal-2.02-66.el8_0.1.x86_64.rpm 987 kB/s | 196 kB 00:00
Setelah pembaruan paket diunduh, penginstal akan mulai menginstalnya secara otomatis.
Anda mungkin perlu menerima kunci penandatanganan GPG jika diminta.
(45/51): python3-libs-3.6.8-4.el8_0.x86_64.rpm 818 kB/s | 7.9 MB 00:09 (46/51): systemd-libs-239-13.el8_0.5.x86_64.rpm 929 kB/s | 551 kB 00:00 (47/51): systemd-pam-239-13.el8_0.5.x86_64.rpm 960 kB/s | 222 kB 00:00 (48/51): systemd-239-13.el8_0.5.x86_64.rpm 690 kB/s | 3.4 MB 00:05 (49/51): epel-release-8-6.el8.noarch.rpm 115 kB/s | 21 kB 00:00 (50/51): systemd-udev-239-13.el8_0.5.x86_64.rpm 959 kB/s | 1.3 MB 00:01 (51/51): selinux-policy-targeted-3.14.1-61.el8_0.2.noarch.rpm 775 kB/s | 15 MB 00:19 ---------------------------------------------------------------------------------------------------------------------------- Total 1.5 MB/s | 47 MB 00:32 warning: /var/cache/dnf/epel-6519ee669354a484/packages/epel-release-8-6.el8.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID 2f86d6a1: NOKEY Extra Packages for Enterprise Linux 8 - x86_64 1.6 MB/s | 1.6 kB 00:00 Importing GPG key 0x2F86D6A1: Userid : "Fedora EPEL (8) <[email protected]>" Fingerprint: 94E2 79EB 8D8F 25B2 1810 ADF1 21EA 45AB 2F86 D6A1 From : /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-8 Is this ok [y/N]: Y << Press Y and Enter Key imported successfully Running transaction check Transaction check succeeded. Running transaction test Transaction test succeeded. Running transaction Preparing : 1/1 Running scriptlet: bash-4.4.19-8.el8_0.x86_64 1/1 Upgrading : bash-4.4.19-8.el8_0.x86_64 1/101 Running scriptlet: bash-4.4.19-8.el8_0.x86_64 1/101 Upgrading : grub2-common-1:2.02-66.el8_0.1.noarch 2/101 Upgrading : platform-python-3.6.8-4.el8_0.x86_64 3/101 Running scriptlet: platform-python-3.6.8-4.el8_0.x86_64 3/101 Upgrading : python3-libs-3.6.8-4.el8_0.x86_64 4/101
Tunggu beberapa saat hingga pembaruan sistem selesai.
Verifying : systemd-pam-239-13.el8.x86_64 97/101 Verifying : systemd-udev-239-13.el8_0.5.x86_64 98/101 Verifying : systemd-udev-239-13.el8.x86_64 99/101 Verifying : epel-release-8-6.el8.noarch 100/101 Verifying : epel-release-8-5.el8.noarch 101/101 Upgraded: bash-4.4.19-8.el8_0.x86_64 bind-export-libs-32:9.11.4-17.P2.el8_0.1.x86_64 grub2-common-1:2.02-66.el8_0.1.noarch grub2-pc-1:2.02-66.el8_0.1.x86_64 grub2-pc-modules-1:2.02-66.el8_0.1.noarch grub2-tools-1:2.02-66.el8_0.1.x86_64 grub2-tools-extra-1:2.02-66.el8_0.1.x86_64 grub2-tools-minimal-1:2.02-66.el8_0.1.x86_64 initscripts-10.00.1-1.el8_0.1.x86_64 iptables-1.8.2-9.el8_0.1.x86_64 iptables-ebtables-1.8.2-9.el8_0.1.x86_64 iptables-libs-1.8.2-9.el8_0.1.x86_64 kernel-tools-4.18.0-80.11.2.el8_0.x86_64 kernel-tools-libs-4.18.0-80.11.2.el8_0.x86_64 kmod-25-11.el8_0.2.x86_64 kmod-libs-25-11.el8_0.2.x86_64 kpartx-0.7.8-7.el8_0.2.x86_64 libdnf-0.22.5-5.el8_0.x86_64 libnfsidmap-1:2.3.3-14.el8_0.2.x86_64 libsss_autofs-2.0.0-43.el8_0.3.x86_64 libsss_certmap-2.0.0-43.el8_0.3.x86_64 libsss_idmap-2.0.0-43.el8_0.3.x86_64 libsss_nss_idmap-2.0.0-43.el8_0.3.x86_64 libsss_sudo-2.0.0-43.el8_0.3.x86_64 microcode_ctl-4:20180807a-2.20190618.1.el8_0.x86_64 p11-kit-0.23.14-5.el8_0.x86_64 p11-kit-trust-0.23.14-5.el8_0.x86_64 platform-python-3.6.8-4.el8_0.x86_64 python3-hawkey-0.22.5-5.el8_0.x86_64 python3-libdnf-0.22.5-5.el8_0.x86_64 python3-libs-3.6.8-4.el8_0.x86_64 python3-perf-4.18.0-80.11.2.el8_0.x86_64 python3-rpm-4.14.2-11.el8_0.x86_64 rpm-4.14.2-11.el8_0.x86_64 rpm-build-libs-4.14.2-11.el8_0.x86_64 rpm-libs-4.14.2-11.el8_0.x86_64 rpm-plugin-selinux-4.14.2-11.el8_0.x86_64 rpm-plugin-systemd-inhibit-4.14.2-11.el8_0.x86_64 selinux-policy-3.14.1-61.el8_0.2.noarch selinux-policy-targeted-3.14.1-61.el8_0.2.noarch setup-2.12.2-2.el8.noarch sssd-client-2.0.0-43.el8_0.3.x86_64 sssd-common-2.0.0-43.el8_0.3.x86_64 sssd-kcm-2.0.0-43.el8_0.3.x86_64 sssd-nfs-idmap-2.0.0-43.el8_0.3.x86_64 systemd-239-13.el8_0.5.x86_64 systemd-libs-239-13.el8_0.5.x86_64 systemd-pam-239-13.el8_0.5.x86_64 systemd-udev-239-13.el8_0.5.x86_64 epel-release-8-6.el8.noarch Installed: grub2-tools-efi-1:2.02-66.el8_0.1.x86_64 Complete!
Setelah paket diinstal, reboot mesin Anda
reboot
Verifikasi Pembaruan
Gunakan perintah check-update untuk melihat apakah ada pembaruan yang menunggu untuk dipasang.
yum check-update
Seharusnya tidak mengembalikan output apa pun
ATAU
Jika Anda memeriksa konsol sistem atau layar boot, seharusnya boot melalui kernel yang diperbarui.
Anda juga dapat memastikan bahwa sistem di-boot dengan kernel yang diperbarui menggunakan perintah di bawah ini.
uname -a
Keluaran:
Linux centos8.itzgeek.local 4.18.0-80.11.2.el8_0.x86_64 #1 SMP Tue Sep 24 11:32:19 UTC 2019 x86_64 x86_64 x86_64 GNU/LinuxJika sistem tidak bisa boot dengan kernel baru, boot mesin ke kernel lama dan kemudian instal ulang kernel yang baru diinstal.
Kesimpulan
Itu saja. Silakan bagikan tanggapan Anda di bagian komentar.