Добавить
Уведомления

ZM PROTech Linux Academy 05-23-2020 0230 by Zafar Mohiuddin

ZM PROTech Linux Academy 05-23-2020 0230 by Zafar Mohiuddin http://apr20.zmprotech.com/yum-package-management/ To cleanup unused packages First install a utility to enable the package cleanup [root@localhost ~]# yum install yum-utils -y Output of list of packages no longer needed [root@localhost ~]# package-cleanup --leaves Loaded plugins: fastestmirror libsysfs-2.1.0-16.el7.x86_64 [root@localhost ~]# yum autoremove libsysfs-2.1.0-16.el7.x86_64 The package is removed using autoremove feature Group Packages See the group of packages [root@localhost ~]# yum group list Avaialbe group and hidden packages [root@localhost ~]# yum group list hidden View information about the group package [root@localhost ~]# yum group info "Development Tools" [root@localhost ~]# yum group list ids Security Tools (security-tools) Group name Group id Security Tools (security-tools) Lest see how you use this information to install group You can use any of the following format to install the group package Use the format below to install Yum group install “Security Tools” ------------------------ using group name Yum group install security-tools --------------------------- using group id Or Yum install @“Security Tools” Yum install @security-tools Install the group [root@localhost ~]# yum install @security-tools Update group [root@localhost ~]# yum group update security-tools Remove group – there is no autoremove for the group [root@localhost ~]# yum group remove @security-tools Manage OS Updates Output the list of updates which are available to install [root@localhost ~]# yum check-updates Check for obsolete package [root@localhost ~]# yum list obsoletes Obsolete package iwl7260-firmware.noarch 25.30.13.0-76.el7 base [root@localhost ~]# yum update iwl7260-firmware.noarch Transaction Summary Installed: iwl7260-firmware.noarch 0:25.30.13.0-76.el7 Replaced: iwl7265-firmware.noarch 0:22.0.7.0-72.el7 Update system wide package ***This will also update the kernel [root@localhost ~]# yum update Install 1 Package ------ add this new package Upgrade 138 Packages ------- upgrade existing packages *** A new kernel is available in this update Installing: kernel x86_64 3.10.0-1127.8.2.el7 updates 50 M To run only security update [root@localhost ~]# yum update –security Security specific update may or may not be available [root@localhost ~]# yum update-minimal –security Security specific update may or may not be available Kernel Update Kernel is between hardware and OS [root@localhost ~]# yum list installed kernel* kernel.x86_64 3.10.0-1062.el7 @anaconda ------ underline is current kernel kernel-tools.x86_64 3.10.0-1062.el7 @anaconda kernel-tools-libs.x86_64 3.10.0-1062.el7 @anaconda [root@localhost ~]# init 6 You can see the installed kernels during booting process Kernel break down bash-4.2# uname -r 3.10.0-1062.el7.x86_64 Major version Major Revision Patch Redhat ver Enterprise linux ver 7 64 bit arch 3 10 0 1062 el7 x86_64 All the kernels sits in /boot -rwxr-xr-x. 1 root root 6734016 Aug 7 2019 vmlinuz-3.10.0-1062.el7.x86_64 Bios base system boot loader sits in /boot/grub2 bash-4.2# cd /boot/grub2 bash-4.2# ls -l total 32 -rw-r--r--. 1 root root 4291 Apr 5 09:36 grub.cfg To edit grub bash-4.2# vi /etc/default/grub run grub2.mkconfig /boot/grub2/grub.cfg -------------- run this when you edited the file UEFI System grub2-mkconfig -o /boot/efi/EFI/redhat/grub.cfg bash-4.2# yum list available kernel* kernel.x86_64 3.10.0-1127.8.2.el7 updates -----------available in blue Update the kernel bash-4.2# yum update kernel -y Installed: kernel.x86_64 0:3.10.0-1127.8.2.el7 Kernel is not set to default yet bash-4.2# uname -r 3.10.0-1062.el7.x86_64 bash-4.2# cd /boot bash-4.2# ls -l -rwxr-xr-x. 1 root root 6734016 Aug 7 2019 vmlinuz-3.10.0-1062.el7.x86_64 -rwxr-xr-x. 1 root root 6762688 May 12 13:01 vmlinuz-3.10.0-1127.8.2.el7.x86_64 Reboot -bash-4.2# awk -F\' '$1=="menuentry "{print $2}' /etc/grub2.cfg CentOS Linux (3.10.0-1127.8.2.el7.x86_64) 7 (Core) ------------------------- position is 0 CentOS Linux (3.10.0-1062.el7.x86_64) 7 (Core) -------------------------------- position is 1 To set the new version active -bash-4.2# grub2-set-default 0 -bash-4.2# uname -r 3.10.0-1127.8.2.el7.x86_64 To set the previous version active -bash-4.2# grub2-set-default 1 -bash-4.2# uname -r 3.10.0-1062.el7.x86_64 So far we have installed the basic version of RHEL 7 -bash-4.2# yum update -y Install GUI version on existing basic version [root@localhost ~]# yum group install gnome-desktop x11 fonts

Иконка канала Python обучение
11 подписчиков
12+
15 просмотров
2 года назад
12+
15 просмотров
2 года назад

ZM PROTech Linux Academy 05-23-2020 0230 by Zafar Mohiuddin http://apr20.zmprotech.com/yum-package-management/ To cleanup unused packages First install a utility to enable the package cleanup [root@localhost ~]# yum install yum-utils -y Output of list of packages no longer needed [root@localhost ~]# package-cleanup --leaves Loaded plugins: fastestmirror libsysfs-2.1.0-16.el7.x86_64 [root@localhost ~]# yum autoremove libsysfs-2.1.0-16.el7.x86_64 The package is removed using autoremove feature Group Packages See the group of packages [root@localhost ~]# yum group list Avaialbe group and hidden packages [root@localhost ~]# yum group list hidden View information about the group package [root@localhost ~]# yum group info "Development Tools" [root@localhost ~]# yum group list ids Security Tools (security-tools) Group name Group id Security Tools (security-tools) Lest see how you use this information to install group You can use any of the following format to install the group package Use the format below to install Yum group install “Security Tools” ------------------------ using group name Yum group install security-tools --------------------------- using group id Or Yum install @“Security Tools” Yum install @security-tools Install the group [root@localhost ~]# yum install @security-tools Update group [root@localhost ~]# yum group update security-tools Remove group – there is no autoremove for the group [root@localhost ~]# yum group remove @security-tools Manage OS Updates Output the list of updates which are available to install [root@localhost ~]# yum check-updates Check for obsolete package [root@localhost ~]# yum list obsoletes Obsolete package iwl7260-firmware.noarch 25.30.13.0-76.el7 base [root@localhost ~]# yum update iwl7260-firmware.noarch Transaction Summary Installed: iwl7260-firmware.noarch 0:25.30.13.0-76.el7 Replaced: iwl7265-firmware.noarch 0:22.0.7.0-72.el7 Update system wide package ***This will also update the kernel [root@localhost ~]# yum update Install 1 Package ------ add this new package Upgrade 138 Packages ------- upgrade existing packages *** A new kernel is available in this update Installing: kernel x86_64 3.10.0-1127.8.2.el7 updates 50 M To run only security update [root@localhost ~]# yum update –security Security specific update may or may not be available [root@localhost ~]# yum update-minimal –security Security specific update may or may not be available Kernel Update Kernel is between hardware and OS [root@localhost ~]# yum list installed kernel* kernel.x86_64 3.10.0-1062.el7 @anaconda ------ underline is current kernel kernel-tools.x86_64 3.10.0-1062.el7 @anaconda kernel-tools-libs.x86_64 3.10.0-1062.el7 @anaconda [root@localhost ~]# init 6 You can see the installed kernels during booting process Kernel break down bash-4.2# uname -r 3.10.0-1062.el7.x86_64 Major version Major Revision Patch Redhat ver Enterprise linux ver 7 64 bit arch 3 10 0 1062 el7 x86_64 All the kernels sits in /boot -rwxr-xr-x. 1 root root 6734016 Aug 7 2019 vmlinuz-3.10.0-1062.el7.x86_64 Bios base system boot loader sits in /boot/grub2 bash-4.2# cd /boot/grub2 bash-4.2# ls -l total 32 -rw-r--r--. 1 root root 4291 Apr 5 09:36 grub.cfg To edit grub bash-4.2# vi /etc/default/grub run grub2.mkconfig /boot/grub2/grub.cfg -------------- run this when you edited the file UEFI System grub2-mkconfig -o /boot/efi/EFI/redhat/grub.cfg bash-4.2# yum list available kernel* kernel.x86_64 3.10.0-1127.8.2.el7 updates -----------available in blue Update the kernel bash-4.2# yum update kernel -y Installed: kernel.x86_64 0:3.10.0-1127.8.2.el7 Kernel is not set to default yet bash-4.2# uname -r 3.10.0-1062.el7.x86_64 bash-4.2# cd /boot bash-4.2# ls -l -rwxr-xr-x. 1 root root 6734016 Aug 7 2019 vmlinuz-3.10.0-1062.el7.x86_64 -rwxr-xr-x. 1 root root 6762688 May 12 13:01 vmlinuz-3.10.0-1127.8.2.el7.x86_64 Reboot -bash-4.2# awk -F\' '$1=="menuentry "{print $2}' /etc/grub2.cfg CentOS Linux (3.10.0-1127.8.2.el7.x86_64) 7 (Core) ------------------------- position is 0 CentOS Linux (3.10.0-1062.el7.x86_64) 7 (Core) -------------------------------- position is 1 To set the new version active -bash-4.2# grub2-set-default 0 -bash-4.2# uname -r 3.10.0-1127.8.2.el7.x86_64 To set the previous version active -bash-4.2# grub2-set-default 1 -bash-4.2# uname -r 3.10.0-1062.el7.x86_64 So far we have installed the basic version of RHEL 7 -bash-4.2# yum update -y Install GUI version on existing basic version [root@localhost ~]# yum group install gnome-desktop x11 fonts

, чтобы оставлять комментарии