Filters
Zo zoek je
  • Gewone woorden vinden namen, teksten en voorbeelden.
  • "twee woorden" vindt precies die zin.
  • --naam of -x vindt een optie.
  • #woord zoekt alleen in commando's.
  • @grep vindt lessen en labs die grep gebruiken.
  • Filters: cat:network · in:labs · in:notes · level:rhcsa · ch:8 · root:yes. Zet ! voor een woord om het weg te laten. OR tussen woorden betekent één ervan.
  • ↑ ↓ bewegen · Enter openen · Esc sluiten · / zoeken

Lab 9.1RHCSA 10, Hoofdstuk 9

Use a local repository and manage packages

Niveau
Gemiddeld
40 min
Machines
server1
Status
Nog niet begonnen

Dit deel is nog niet vertaald. Je ziet de Engelse tekst.

Doel

Turn the installation ISO into a repository that survives a reboot, then find, install, inspect and undo packages.

Voordat je begint

  • Copy the RHEL 10 installation ISO to /root/ on server1 (or attach it to the VM as a DVD; then it is /dev/sr0).
  • Move any other .repo files to /root/repos-backup/ so you only use the local repository (move them back after the lab if you need them).

Taken

  1. Mount the ISO on /repo in a way that survives a reboot.
  2. Create the repository file /etc/yum.repos.d/local.repo with BaseOS and AppStream from the ISO. No GPG check.
  3. Show that both repositories are enabled.
  4. Find out which package provides the command semanage and install it.
  5. Install httpd, show its configuration files, and find which package owns /etc/httpd/conf/httpd.conf.
  6. Install the package group "Development Tools", look at the dnf history, and undo the group install.
  7. Show which files of openssh-server were changed since it was installed.

Controleer je werk

findmnt /repo
dnf repolist
rpm -q policycoreutils-python-utils httpd
rpm -qc httpd
dnf history | head -5
dnf group list --installed
  • /repo is mounted (also after reboot).
  • dnf repolist shows local-BaseOS and local-AppStream.
  • semanage and httpd are installed; "Development Tools" is not installed anymore.

Hints

Toon de hints

Oplossing

Toon de oplossing
  1. Mount the ISO for good.
    mkdir /repo
    echo "/root/rhel-10.0-x86_64-dvd.iso /repo iso9660 defaults,loop 0 0" >> /etc/fstab
    systemctl daemon-reload
    mount -a
  2. The repository file.
    /etc/yum.repos.d/local.repo
    [local-BaseOS]
    name=Local BaseOS
    baseurl=file:///repo/BaseOS
    gpgcheck=0
     
    [local-AppStream]
    name=Local AppStream
    baseurl=file:///repo/AppStream
    gpgcheck=0
  3. Check the repositories.
    dnf repolist
  4. Find and install semanage.
    dnf provides '*/semanage'
    dnf install -y policycoreutils-python-utils
  5. httpd and its files.
    dnf install -y httpd
    rpm -qc httpd
    rpm -qf /etc/httpd/conf/httpd.conf
  6. Group install and undo.
    dnf group install -y "Development Tools"
    dnf history
    dnf -y history undo last
  7. Verify the package files.
    rpm -V openssh-server

Mijn notities

Nog geen notities.

Lessen voor dit lab

Commando's in dit lab