Geavanceerd
Zoeken inSamenvattingen
Zo zoek je
  • Woorden vinden lestitels, tekst en code. Filter op soort (gidsen, cursussen, programma's, boeken) of blijf in dit boek.
  • book:rhcsa en ch:8 maken de zoektocht kleiner; #code vindt een woord alleen in commando's van de lessen.
  • "twee woorden" vindt precies die zin.
  • Gewone woorden vinden namen, teksten en voorbeelden.
  • ↑ ↓ bewegen · Enter openen · Esc sluiten · / zoeken
Probeer:

Cursus 2Naam in de cursus: Crush the RHCSA/RHEL Course + Mock EX200 Exam

Crush the RHCSA/RHEL Course + Mock EX200 Exam

Course 2 of 13 in the Alta3 Academy library. Alta3 Academy self-paced course.

Notitie

My result — Lessons read: all 109/109; Course progress: 100%.

  • 18 Lessen
  • 90 Commando's
  • 2 Labs

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

$ als gewone gebruiker# als root (of met sudo)

2.1

What the course covers

This course teaches Linux on Red Hat Enterprise Linux (RHEL).

  • It follows the goals of the RHCSA EX200 exam. It is a full study path.
  • You start with files, text, and the shell. Then you move to users, services, storage, and security.
  • You learn the tools an admin uses every day: grep, awk, sed, vim, tar, systemctl, journalctl.
  • You build storage: partitions, swap, LVM, NFS shares, and autofs mounts.
  • You harden the host with SELinux, firewalld, sudo, and file permissions.
  • You run containers with Podman. You make them start at boot with systemd.
  • The last part is a mock exam with 41 tasks. Each task has a check script.

2.2

Welcome to Alta3 Research Labs!

Three short lessons. They show how to use the Academy, the lab, and the VIRGIL coach.

  • The lab has Linux machines: bchd, rhel-1, and rhel-2. You move between them with ssh.
  • To paste in the terminal: right-click Paste, or press Shift + Insert, or Ctrl + Shift + V.
  • The prompt shows user@host:~$. The ~ is your home. The $ means a normal user. Root shows #.

Commando's in deze les

2.3

Required Tools

tmux is a terminal multiplexer. It keeps many shells in one window.

  • Press Ctrl + B, let go of the keys, then press the next key.
  • % splits the screen left and right. " splits it top and bottom.
  • Arrow keys move between panes. z zooms one pane. [ opens scrollback. Ctrl + D closes a pane.

Commando's in deze les

2.4

Understand and use essential tools

grep finds text. -i ignores case, -n shows line numbers, -r searches folders, -v shows lines that do not match.

  • Regex: ^ start of line, $ end of line, [abc] one of these letters, [^0-9] not a digit, . any one character, * zero or more.
  • awk works on fields. awk '{print $1}' prints the first field.
  • sed 's/old/new/g' replaces text in a stream. -i edits the file in place.
  • Vim is a modal editor. i to type, Esc to stop typing, :wq to save and quit, :q! to quit and drop changes.
  • find looks for files by name, owner, size, type, or empty state. ln makes a hard link. ln -s makes a soft link.
  • Redirection: > writes, >> appends, 2> sends errors, &> sends both, | sends output to the next command.
  • Archives: tar -cf, tar -xf, tar -czf for gzip, tar -cjf for bzip2, tar -cJf for xz.
  • Copy between hosts with scp, rsync (add -u or --delete), and sftp.

2.5

Manage users and groups

useradd -m john makes a user with a home. Other options: -d home path, -s shell, -G extra groups.

2.6

Create simple shell scripts

A script starts with #!/bin/bash.

  • Use variables: name="Alice" then echo "$name".
  • Read arguments with $1, $2, and $#.
  • Use if [ -f /etc/passwd ]; then ... fi, plus for and while loops.
  • Make it executable with chmod u+x script.sh, then run ./script.sh. You can also run bash script.sh.

2.7

Operate running systems

systemctl start, stop, restart, status, enable, and disable. systemctl --failed lists broken units.

2.8

Configure local storage

lsblk shows disks and partitions.

2.9

Create and configure file systems

LVM has three layers: physical volumes, volume groups, and logical volumes.

2.10

Deploy, configure, and maintain systems

dnf install, dnf remove, dnf update, and dnf autoremove. Add --enablerepo= to pick a repo.

  • dnf repolist and repo files under /etc/yum.repos.d/ control where packages come from.
  • Flatpak installs desktop apps outside dnf.
  • at 14:30 runs one job later. Close the input with Ctrl + D. atq lists jobs and atrm deletes them.
  • crontab -e edits repeat jobs. The five fields are minute, hour, day, month, weekday.
  • */15 * * * * runs every 15 minutes. 0 9 * * 1 runs at 09:00 on Monday.
  • Time sync uses chrony. Enable chronyd, then set a server ... iburst line in /etc/chrony.conf.

2.11

Manage basic networking

sshd is the SSH server. Set Port, PermitRootLogin no, AllowUsers, and PubkeyAuthentication yes in /etc/ssh/sshd_config, then restart it.

2.12

Manage security

ls -l shows ugo/rwx permissions. chmod u+x, chmod g-w, and chmod 754 change them.

2.13

Manage containers

podman pull nginx downloads an image. podman images lists images. podman tag adds a second name.

2.14

Crush the RHCSA Exam!

The mock exam has 41 tasks. It looks and feels like the real EX200.

  • Setup: install git, clone the rock-the-rhcsa repo on rhel-1 and rhel-2.
  • Each page has a task and a check script, for example bash ~/rock-the-rhcsa/check/13_vg_starfleet_check.sh.
  • Users and access: create users, set password policy, switch user, allow one sudo command without a password.
  • Text and files: find files by owner, grep by case, sed in place, default file in each home, permissions, set-GID folder, soft link, scp.
  • Time and logs: at job, cron plus tar every five minutes, NTP server, logrotate daily with five backups, export boot logs with journalctl.
  • System: find the top CPU process, renice cron, set SELinux enforcing, fix a context, set a boolean, configure ens4, add an EPEL repo, autofs, NFS, boot target, tuned.
  • Storage: make a partition, a swap partition, vg-starfleet, lv-spock on XFS, then grow it from 4G to 5G.
  • Security and services: reset the root password from GRUB, set the home firewall zone, install and enable httpd.
  • Containers: pull and tag nginx:examprep, run toystory with a volume, then make it a systemd service.
  • Tip from the course: if a task does not survive a reboot, it is not done. Check your work twice.

2.15

Key commands and tools

2.16

Key terms

The words of this course in one table. Learn them before the quiz or exam.

TermMeaning
autofsA service that mounts a share only when someone uses it.
ContextThe SELinux label of a file or process, for example httpd_sys_content_t.
dnfThe package manager on RHEL. It installs, updates, and removes software.
EX200The code of the RHCSA exam. The mock exam in this course copies its style.
firewalldThe firewall service on RHEL. firewall-cmd changes its rules.
journalctlThe command that reads the systemd log (the journal).
Logical volume (LV)A slice of a volume group. You format and mount it like a disk.
logrotateThe tool that rotates, compresses, and deletes old log files.
LVMLogical Volume Management. A flexible layer between disks and file systems.
NFSNetwork File System. It shares a folder from one host to other hosts.
Physical volume (PV)A disk or partition prepared for LVM with pvcreate.
PodmanA tool that runs containers without a daemon.
RedirectionSending command output to a file with >, >>, or 2>.
Regular expressionA pattern for matching text, used by grep and sed.
RHCSARed Hat Certified System Administrator. A Linux admin certificate from Red Hat.
RHELRed Hat Enterprise Linux. The Linux version used in the labs.
SELinuxSecurity-Enhanced Linux. It labels files and processes and blocks actions that break policy.
set-GIDA folder bit (chmod g+s) that makes new files keep the folder's group.
sudoA tool that lets a normal user run one command as root.
SwapDisk space used as extra memory when RAM is full.
systemdThe service manager on RHEL. systemctl controls it.
TargetA systemd state such as multi-user, graphical, rescue, or emergency.
umaskA mask that sets the default permissions of new files and folders.
Volume group (VG)A pool of space built from one or more physical volumes.
ZoneA named set of firewall rules, such as public, home, or a custom webapp.

Oefenen

Alle commando's in dit hoofdstuk