1.6 KiB
1.6 KiB
LPIC-1 102.5: RPM, YUM and Zypper
Querying and verifying installed packages, looking inside a downloaded package, and undoing an install with the DNF history. (The chapter's Zypper task needs openSUSE, so it isn't part of this lab.)
Before you start
The lab adds a comment line to /etc/ssh/sshd_config (reset takes it out
again), and notes where the DNF history stands. Write answers to the files
in /root/lab-answers/.
Tasks
- Find which package owns
/etc/ssh/sshd_config, list its configuration files, then verify the package withrpm -V. Write the package name on line 1 of/root/lab-answers/1, and below it every filerpm -Vreports as changed, one per line. - Download the
treepackage withdnf downloadinto/root/rpms, query it withrpm -qpiandrpm -qpl, and extract one file,usr/bin/tree, withrpm2cpioandcpio, so that it ends up as/root/rpms/usr/bin/tree. - Use
dnf providesto find the package for thedigcommand, which you don't have, and write its name to/root/lab-answers/3. Install it, then undo the install withdnf history undo last.
Hints
rpm -qf,rpm -qc,rpm -V; the letters say what changed (5the checksum,Sthe size,Tthe time),cmarks a configuration file.dnf download --destdir,rpm -qpi,rpm -qpl;rpm2cpio FILE.rpm | cpio -idv ./usr/bin/tree, run inside/root/rpms.- On RHEL 10 and its relatives, the first
dnf providesdownloads the repositories' file lists, which can take several minutes on a slow mirror.dnf history,dnf history info last.