最新的RedHat Red Hat Certified System Administrator - RHCSA (EX200日本語版) - EX200日本語免費考試真題
コンテナをサービスとして構成する
ユーザー「wallah」として、コンテナ用のsystemdサービスを設定します。
- コンテナ名: ascii2pdf
- 以前作成したpdfという名前の画像を使用してください。
- サービス名: container-ascii2pdf
- システム再起動時に、手動操作なしでサービスを自動的に起動します。
- サービスが起動時にコンテナ内の /opt/file を /dir1 に、/opt/progress を /dir2 に自動的にマウントするように設定してください。
ユーザー「wallah」として、コンテナ用のsystemdサービスを設定します。
- コンテナ名: ascii2pdf
- 以前作成したpdfという名前の画像を使用してください。
- サービス名: container-ascii2pdf
- システム再起動時に、手動操作なしでサービスを自動的に起動します。
- サービスが起動時にコンテナ内の /opt/file を /dir1 に、/opt/progress を /dir2 に自動的にマウントするように設定してください。
正確答案:
Solution:
# Note: Perform the following operations by SSHing into localhost as the user "wallah"
[root@node1 ~]# ssh wallah@localhost
# Prepare the relevant mapping directories
[wallah@node1 ~]$ sudo mkdir /opt/{file,progress}
[wallah@node1 ~]$ sudo chown wallah:wallah /opt/{file,progress}
# Start the container and map directories
# :Z changes the SELinux security context of the directory to allow container access.
[wallah@node1 ~]$ podman run -d --name ascii2pdf -v /opt/file:/dir1:Z -v /opt/progress:/dir2:Z pdf
[wallah@node1 ~]$ podman ps -a
# Create systemd service file
[wallah@node1 ~]$ mkdir -p ~/.config/systemd/user
[wallah@node1 ~]$ cd ~/.config/systemd/user/
[wallah@node1 ~]$ podman generate systemd -n ascii2pdf -f --new
[wallah@node1 user]$ ll
total 4
-rw-r--r--. 1 wallah wallah 770 Dec 13 01:07 container-ascii2pdf.service
# Stop and remove the existing ascii2pdf container
[wallah@node1 ~]$ podman stop ascii2pdf
[wallah@node1 ~]$ podman rm ascii2pdf
[wallah@node1 ~]$ podman ps -a
# Enable and start the container-ascii2pdf service
[wallah@node1 ~]$ systemctl --user daemon-reload
[wallah@node1 ~]$ systemctl --user enable --now container-ascii2pdf
# Check container status
[wallah@node1 ~]$ systemctl --user status container-ascii2pdf
[wallah@node1 ~]$ podman ps
# On node1, switch to the root user to perform the following operations
# Ensure that the services for the wallah user start automatically at system boot
[root@node1 ~]# loginctl enable-linger
[root@node1 ~]# loginctl show-user wallah
# Check to ensure the container starts on boot (mandatory operation)
[root@node1 ~]# reboot
[root@node1 ~]# ssh wallah@node1
[wallah@node1 ~]# podman ps
# Note: Perform the following operations by SSHing into localhost as the user "wallah"
[root@node1 ~]# ssh wallah@localhost
# Prepare the relevant mapping directories
[wallah@node1 ~]$ sudo mkdir /opt/{file,progress}
[wallah@node1 ~]$ sudo chown wallah:wallah /opt/{file,progress}
# Start the container and map directories
# :Z changes the SELinux security context of the directory to allow container access.
[wallah@node1 ~]$ podman run -d --name ascii2pdf -v /opt/file:/dir1:Z -v /opt/progress:/dir2:Z pdf
[wallah@node1 ~]$ podman ps -a
# Create systemd service file
[wallah@node1 ~]$ mkdir -p ~/.config/systemd/user
[wallah@node1 ~]$ cd ~/.config/systemd/user/
[wallah@node1 ~]$ podman generate systemd -n ascii2pdf -f --new
[wallah@node1 user]$ ll
total 4
-rw-r--r--. 1 wallah wallah 770 Dec 13 01:07 container-ascii2pdf.service
# Stop and remove the existing ascii2pdf container
[wallah@node1 ~]$ podman stop ascii2pdf
[wallah@node1 ~]$ podman rm ascii2pdf
[wallah@node1 ~]$ podman ps -a
# Enable and start the container-ascii2pdf service
[wallah@node1 ~]$ systemctl --user daemon-reload
[wallah@node1 ~]$ systemctl --user enable --now container-ascii2pdf
# Check container status
[wallah@node1 ~]$ systemctl --user status container-ascii2pdf
[wallah@node1 ~]$ podman ps
# On node1, switch to the root user to perform the following operations
# Ensure that the services for the wallah user start automatically at system boot
[root@node1 ~]# loginctl enable-linger
[root@node1 ~]# loginctl show-user wallah
# Check to ensure the container starts on boot (mandatory operation)
[root@node1 ~]# reboot
[root@node1 ~]# ssh wallah@node1
[wallah@node1 ~]# podman ps
システム最適化構成
お使いのシステムに最適な調整済み構成セットを選択し、それをデフォルトとして設定してください。
お使いのシステムに最適な調整済み構成セットを選択し、それをデフォルトとして設定してください。
正確答案:
Solution:
# Install and enable tuned
[root@node2 ~]# yum -y install tuned
[root@node2 ~]# systemctl enable tuned
[root@node2 ~]# systemctl restart tuned
# Check the recommended configuration scheme for the system
[root@node2 ~]# tuned-adm recommend
virtual-guest
# Switch to the specified configuration scheme
[root@node2 ~]# tuned-adm profile virtual-guest
# Check the current configuration scheme
[root@node2 ~]# tuned-adm active
Current active profile: virtual-guest
# Install and enable tuned
[root@node2 ~]# yum -y install tuned
[root@node2 ~]# systemctl enable tuned
[root@node2 ~]# systemctl restart tuned
# Check the recommended configuration scheme for the system
[root@node2 ~]# tuned-adm recommend
virtual-guest
# Switch to the specified configuration scheme
[root@node2 ~]# tuned-adm profile virtual-guest
# Check the current configuration scheme
[root@node2 ~]# tuned-adm active
Current active profile: virtual-guest
既存のNetworkManager接続上で、システムホスト名を設定し、静的IPアドレスを設定します。
正確答案:
See the solution below in Explanation.
Explanation:
Solution:
* Set the hostname:
hostnamectl set-hostname server1.example.com
* Configure the existing connection with a static IP:
nmcli connection modify ens160 ipv4.address 192.168.1.2/24 ipv4.gateway 192.168.1.1 ipv4.dns 1.1.1.1 ipv4.
method manual connection.autoconnect yes
* Bring the connection up:
nmcli connection up ens160
Detailed Explanation:
* hostnamectl is the correct modern command for changing the system hostname.
* nmcli is the correct tool for RHEL 10 network configuration because the old ifcfg style is removed in
RHEL 10, and NetworkManager keyfiles are the supported model.
* ipv4.method manual tells NetworkManager to use static addressing.
* connection.autoconnect yes ensures the profile activates automatically after reboot.
* nmcli connection up ens160 applies the changes immediately.
Explanation:
Solution:
* Set the hostname:
hostnamectl set-hostname server1.example.com
* Configure the existing connection with a static IP:
nmcli connection modify ens160 ipv4.address 192.168.1.2/24 ipv4.gateway 192.168.1.1 ipv4.dns 1.1.1.1 ipv4.
method manual connection.autoconnect yes
* Bring the connection up:
nmcli connection up ens160
Detailed Explanation:
* hostnamectl is the correct modern command for changing the system hostname.
* nmcli is the correct tool for RHEL 10 network configuration because the old ifcfg style is removed in
RHEL 10, and NetworkManager keyfiles are the supported model.
* ipv4.method manual tells NetworkManager to use static addressing.
* connection.autoconnect yes ensures the profile activates automatically after reboot.
* nmcli connection up ens160 applies the changes immediately.
GRUBから一度緊急モードで起動してください。
正確答案:
See the solution below in Explanation.
Explanation:
Solution:
* Reboot the server.
* At the GRUB menu, highlight the kernel entry and press e.
* Find the line starting with linux.
* Append:
systemd.unit=emergency.target
* Press Ctrl+x to boot.
Detailed Explanation:
* This changes the boot target only for the current boot.
* Emergency mode is useful for rescue and maintenance tasks.
* Red Hat's RHEL 10 systemd guidance documents booting with systemd.unit= < name > .target from
GRUB. ( Red Hat Documentation )
Explanation:
Solution:
* Reboot the server.
* At the GRUB menu, highlight the kernel entry and press e.
* Find the line starting with linux.
* Append:
systemd.unit=emergency.target
* Press Ctrl+x to boot.
Detailed Explanation:
* This changes the boot target only for the current boot.
* Emergency mode is useful for rescue and maintenance tasks.
* Red Hat's RHEL 10 systemd guidance documents booting with systemd.unit= < name > .target from
GRUB. ( Red Hat Documentation )
システムをデフォルトのリポジトリを使用するように構成してください。
YUMリポジトリは、http://content/rhel9.0/x86_64/dvd/BaseOS および http://content/rhel9.0/x86_64/dvd/AppStream から入手できます。システムを構成して使用するようにしてください。
これらの場所をデフォルトのリポジトリとして設定します。
YUMリポジトリは、http://content/rhel9.0/x86_64/dvd/BaseOS および http://content/rhel9.0/x86_64/dvd/AppStream から入手できます。システムを構成して使用するようにしてください。
これらの場所をデフォルトのリポジトリとして設定します。
正確答案:
Solution:
[root@node1 ~]# vim /etc/yum.repos.d/rhcsa.repo
[Base]
name=Base
baseurl=http://content/rhel9.0/x86_64/dvd/BaseOS
enabled=1
gpgcheck=no
[App]
name=App
baseurl=http://content/rhel9.0/x86_64/dvd/AppStream
enabled=1
gpgcheck=no
# Verification
[root@node1 ~]# yum repoinfo
[root@node1 ~]# yum -y install vsftpd
[root@node1 ~]# vim /etc/yum.repos.d/rhcsa.repo
[Base]
name=Base
baseurl=http://content/rhel9.0/x86_64/dvd/BaseOS
enabled=1
gpgcheck=no
[App]
name=App
baseurl=http://content/rhel9.0/x86_64/dvd/AppStream
enabled=1
gpgcheck=no
# Verification
[root@node1 ~]# yum repoinfo
[root@node1 ~]# yum -y install vsftpd
ボリュームグループvgdataにlvbackupという名前の1GiBの論理ボリュームを作成し、XFSでフォーマットし、マウントします。
/backup を実行し、それを永続化します。
/backup を実行し、それを永続化します。
正確答案:
See the solution below in Explanation.
Explanation:
Solution:
lvcreate -L 1G -n lvbackup vgdata
mkfs.xfs /dev/vgdata/lvbackup
mkdir -p /backup
echo "/dev/vgdata/lvbackup /backup xfs defaults 0 0" > > /etc/fstab
mount -a
df -h /backup
Detailed Explanation:
* lvcreate allocates a new LV from the existing VG.
* mkfs.xfs creates the filesystem.
* /etc/fstab makes the mount persistent across reboot.
* mount -a tests the fstab entry immediately.
* RHEL 10 storage documentation continues to use LVM and XFS as core administration topics. ( Red
Hat Documentation )
Explanation:
Solution:
lvcreate -L 1G -n lvbackup vgdata
mkfs.xfs /dev/vgdata/lvbackup
mkdir -p /backup
echo "/dev/vgdata/lvbackup /backup xfs defaults 0 0" > > /etc/fstab
mount -a
df -h /backup
Detailed Explanation:
* lvcreate allocates a new LV from the existing VG.
* mkfs.xfs creates the filesystem.
* /etc/fstab makes the mount persistent across reboot.
* mount -a tests the fstab entry immediately.
* RHEL 10 storage documentation continues to use LVM and XFS as core administration topics. ( Red
Hat Documentation )
サポートされているファイルシステムに対して、定期的なTRIM操作を有効にします。
正確答案:
See the solution below in Explanation.
Explanation:
Solution:
systemctl enable --now fstrim.timer
systemctl status fstrim.timer
Detailed Explanation:
* fstrim.timer schedules discard of unused blocks.
* This is useful on SSD-backed storage and thin-provisioned environments.
* RHEL 10 storage documentation explicitly documents enabling fstrim.timer. ( Red Hat Documentation )
Explanation:
Solution:
systemctl enable --now fstrim.timer
systemctl status fstrim.timer
Detailed Explanation:
* fstrim.timer schedules discard of unused blocks.
* This is useful on SSD-backed storage and thin-provisioned environments.
* RHEL 10 storage documentation explicitly documents enabling fstrim.timer. ( Red Hat Documentation )