Secure package management with GPG-signed packages
Yum and superuser privileges
yum
to install, update or remove packages on your system. All examples in this chapter assume that you have already obtained superuser privileges by using either the su
or sudo
command.
yum
check-update
~]# yum check-update
Loaded plugins: langpacks, presto, refresh-packagekit
PackageKit.x86_64 0.6.14-2.fc15 fedora
PackageKit-command-not-found.x86_64 0.6.14-2.fc15 fedora
PackageKit-device-rebind.x86_64 0.6.14-2.fc15 fedora
PackageKit-glib.x86_64 0.6.14-2.fc15 fedora
PackageKit-gstreamer-plugin.x86_64 0.6.14-2.fc15 fedora
PackageKit-gtk-module.x86_64 0.6.14-2.fc15 fedora
PackageKit-gtk3-module.x86_64 0.6.14-2.fc15 fedora
PackageKit-yum.x86_64 0.6.14-2.fc15 fedora
PackageKit-yum-plugin.x86_64 0.6.14-2.fc15 fedora
gdb.x86_64 7.2.90.20110429-36.fc15 fedora
kernel.x86_64 2.6.38.6-26.fc15 fedora
rpm.x86_64 4.9.0-6.fc15 fedora
rpm-libs.x86_64 4.9.0-6.fc15 fedora
rpm-python.x86_64 4.9.0-6.fc15 fedora
yum.noarch 3.2.29-5.fc15 fedora
PackageKit
— the name of the package
x86_64
— the CPU architecture the package was built for
0.6.14
— the version of the updated package to be installed
fedora
— the repository in which the updated package is located
yum
and rpm
packages), as well as their dependencies (such as the kernel-firmware, rpm-libs, and rpm-python packages), all using yum
.
root
:
yum
update
package_name
~]# yum update udev
Loaded plugins: langpacks, presto, refresh-packagekit
Updating Red Hat repositories.
INFO:rhsm-app.repolib:repos updated: 0
Setting up Update Process
Resolving Dependencies
--> Running transaction check
---> Package gdb.x86_64 0:7.2.90.20110411-34.fc15 will be updated
---> Package gdb.x86_64 0:7.2.90.20110429-36.fc15 will be an update
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package Arch Version Repository Size
================================================================================
Updating:
gdb x86_64 7.2.90.20110429-36.fc15 fedora 1.9 M
Transaction Summary
================================================================================
Upgrade 1 Package(s)
Total download size: 1.9 M
Is this ok [y/N]:
Loaded plugins:
— yum
always informs you which Yum plug-ins are installed and enabled. Here, yum
is using the langpacks, presto, and refresh-packagekit plug-ins. See Section 5.4, “Yum Plug-ins” for general information on Yum plug-ins, or to Section 5.4.3, “Plug-in Descriptions” for descriptions of specific plug-ins.
gdb.x86_64
— you can download and install new gdb package.
yum
presents the update information and then prompts you as to whether you want it to perform the update; yum
runs interactively by default. If you already know which transactions yum
plans to perform, you can use the -y
option to automatically answer yes
to any questions yum
may ask (in which case it runs non-interactively). However, you should always examine which changes yum
plans to make to the system so that you can easily troubleshoot any problems that might arise.
yum history
command as described in Section 5.2.6, “Working with Transaction History”.
Updating and installing kernels with Yum
yum
always installs a new kernel in the same sense that RPM installs a new kernel when you use the command rpm -i kernel
. Therefore, you do not need to worry about the distinction between installing and upgrading a kernel package when you use yum
: it will do the right thing, regardless of whether you are using the yum update
or yum install
command.
rpm -i kernel
command (which installs a new kernel) instead of rpm -u kernel
(which replaces the current kernel). See Section A.2.2, “Installing and Upgrading” for more information on installing/updating kernels with RPM.
yum update
(without any arguments):
yum update
yum
command with a set of highly-useful security-centric commands, subcommands and options. See Section 5.4.3, “Plug-in Descriptions” for specific information.