الفلاتر
طريقة البحث
  • الكلمات العادية تجد الأسماء والنصوص والأمثلة.
  • "كلمتان" تجد العبارة بالضبط.
  • --name أو -x تجد خيارًا.
  • #كلمة تبحث داخل الأوامر فقط.
  • @grep تجد الدروس والمعامل التي تستخدم grep.
  • الفلاتر: cat:network · in:labs · level:rhcsa · ch:8 · root:yes. ضع ! قبل كلمة لاستبعادها. OR بين الكلمات تعني إحداها.
  • ↑ ↓ للتنقل · Enter للفتح · Esc للإغلاق · / للبحث

الفصل 19الاسم في الدورة: Comprehensive Review

Review everything you learned

Check yourself on every part of RH134. Say the steps and the main commands out loud first, then compare with the short answer. Every task you can not answer points to the lesson to read again. Then do the review lab — and the two RHCSA practice exams.

  • 6 الدروس
  • 39 الأوامر
  • 3 المعامل

هذا الجزء لم يُترجم بعد. أنت ترى النص الإنجليزي.

$ مستخدم عادي# بصلاحية root (أو مع sudo)

19.1

Scripts and schedules

Shell scripts, regular expressions, at, cron, timers and tmpfiles.

TaskShort answer
A script must stop when it gets no argument[ $# -eq 0 ] && { echo "Usage: $0 NAME" >&2; exit 1; } — lesson
Run a command for every user listed in users.txtwhile read -r u; do …; done < users.txt — lesson
See every line a script runsbash -x script.sh — lesson
Show a config file without comments and empty linesgrep -Ev '^[[:space:]]*(#|$)' FILE — lesson
Find lines with error or fail, any casegrep -iE 'error|fail' FILE — lesson
Run a job once at 23:00 todayecho "CMD" | at 23:00, check with atq — lesson
User anna runs a script every work day at 07:30crontab -e -u anna: 30 7 * * 1-5 /path/script.sh — lesson
A user's timer must run without a loginloginctl enable-linger USER — lesson
A system job every night at 01:30, logged in the journalbackup.service + backup.timer with OnCalendar=*-*-* 01:30, systemctl enable --now backup.timer — lesson
Delete files older than 7 days in /var/tmp/app/etc/tmpfiles.d/app.conf: d /var/tmp/app 0750 root root 7d — lesson

19.2

Logs, SELinux, archives and transfer

The journal, time, SELinux, tar and file copy.

TaskShort answer
Keep the journal after a rebootStorage=persistent in /etc/systemd/journald.conf.d/*.conf, restart journald — lesson
Show only errors of the last bootjournalctl -b -1 -p err — lesson
Make the clock follow ntp.example.comserver ntp.example.com iburst in /etc/chrony.conf, restart chronyd, chronyc sources — lesson
Apache must serve files from /srv/websemanage fcontext -a -t httpd_sys_content_t '/srv/web(/.*)?', restorecon -Rv /srv/web — lesson
Allow Apache to connect to the network for goodsetsebool -P httpd_can_network_connect on — lesson
Find why SELinux blocked somethingausearch -m AVC -ts recent, sealert -a /var/log/audit/audit.log — lesson
Pack /etc with xz, keeping SELinux labelstar --selinux --acls --xattrs -cJf etc.tar.xz /etc — lesson
Copy only changed files of /srv/www to server2 and delete old ones therersync -av --delete /srv/www/ server2:/srv/www/ (test with -n first) — lesson

19.3

Performance and storage

tuned, nice, partitions, swap and LVM.

TaskShort answer
Use the recommended tuning profiletuned-adm recommend, tuned-adm profile NAME, tuned-adm active — lesson
Start a backup with the lowest CPU prioritynice -n 19 backup.sh — lesson
Give a running process (PID 3210) nice value 10renice -n 10 -p 3210 — lesson
A 2 GiB XFS partition mounted on /data at bootparted mkpart, mkfs.xfs, fstab line with UUID=, mount -a, findmnt --verify — lesson
Add 1 GiB of swap that is active after rebootPartition or LV, mkswap, fstab swap line, swapon -a — lesson
An LV of 100 extents of 16 MiBvgcreate -s 16M VG PV, lvcreate -l 100 -n LV VG — lesson
Make a mounted XFS LV 500 MiB biggerlvextend -r -L +500M /dev/VG/LV — lesson
The VG is full: add the disk /dev/vddpvcreate /dev/vdd, vgextend VG /dev/vdd — lesson

19.4

Boot, recovery, network and NFS

Targets, GRUB, root access, firewalld, SELinux ports, NFS and autofs.

TaskShort answer
Boot into text mode by defaultsystemctl set-default multi-user.target — lesson
Add quiet to all kernel entriesgrubby --update-kernel=ALL --args="quiet" — lesson
The boot stops in emergency mode after an fstab changemount -o remount,rw /, fix /etc/fstab, systemctl daemon-reload, mount -a — lesson
The root password is lostGRUB e, add rd.break, mount -o remount,rw /sysroot, chroot /sysroot, passwd, touch /.autorelabel — lesson
Allow https from everywhere, for goodfirewall-cmd --add-service=https --permanent, firewall-cmd --reload — lesson
Apache must listen on port 82Listen 82, semanage port -a -t http_port_t -p tcp 82, firewall-cmd --add-port=82/tcp --permanent — lesson
Mount server2:/srv/nfs/shared on /mnt/shared at bootfstab: server2:/srv/nfs/shared /mnt/shared nfs rw,_netdev 0 0 — lesson
Mount every NFS home folder under /home/remote/USER on demandautofs wildcard map: * -rw server2:/srv/nfs/home/& — lesson

19.5

Install, containers and image mode

Kickstart, Podman, Quadlet and bootc.

TaskShort answer
Install many servers the same wayKickstart file (start from /root/anaconda-ks.cfg), ksvalidator, boot with inst.ks=URL — lesson
Run a rootless web container on port 8080 with content from ~/sitepodman run -d --name site -p 8080:8080 -v ~/site:/var/www/html:Z IMAGE — lesson
Look at an image without pulling itskopeo inspect docker://IMAGE — lesson
A user's container must start at bootQuadlet ~/.config/containers/systemd/NAME.container, systemctl --user daemon-reload, loginctl enable-linger USER — lesson
Add a package to an image-mode serverAdd it to the Containerfile, build and push a new image, bootc upgrade — lesson
An update of an image-mode server broke itbootc rollback, reboot — lesson

19.6

Plan the exam

RH124 + RH134 together cover the RHCSA exam (EX200). Practise against the clock until every task is routine.

Next stepGo to
Check every official exam objectiveThe RHCSA summary
Two full practice examsPractice exam A, Practice exam B
The first course again, for the basicsRH124
Every command with all optionsCommands

نصيحة للامتحان

In the exam, make every change persistent and check it after a reboot: enable --now, --permanent, -P, fstab, set-default. A task that is lost at reboot counts as not done.

تدرّب

كل الأوامر في هذا الفصل