RedHat Red Hat Certified System Administrator - RHCSA (EX200 Korean Version) - EX200 Korean Exam Practice Test

SELinux 디버깅
표준 포트가 아닌 82번 포트에서 실행되는 웹 서버가 콘텐츠 제공 중 문제를 겪고 있습니다. 다음 조건을 충족하도록 문제를 디버깅하고 해결하십시오.
- 시스템의 웹 서버는 /var/www/html에 호스팅된 HTML 파일을 제공할 수 있습니다. (참고: 기존 파일의 내용을 삭제하거나 수정하지 마십시오.)
- 웹 서버는 82번 포트를 통해 콘텐츠를 제공할 수 있습니다.
- 웹 서버는 시스템 부팅 시 자동으로 시작될 수 있습니다.
Correct Answer:
Solution:
# Check which package provides the semanage command
[root@node1 ~]# yum provides "*/semanage"
# Install the semanage command
[root@node1 ~]# yum -y install policycoreutils-python-utils
[root@node1 ~]# semanage port -l |grep http
[root@node1 ~]# semanage port -a -t http_port_t -p tcp 82
# Alternatively, you can use man semanage port, then search for EXAMPLE.
[root@node1 ~]# systemctl restart httpd
[root@node1 ~]# systemctl enable httpd
# Verification, seeing the source code indicates correctness (mandatory operation)
[root@node1 ~]# curl http://node1.domain250.example.com:82
시스템 시간 동기화 설정을 time.example.com을 NTP 소스로 사용하도록 구성하고 동기화가 완료되었는지 확인하십시오.
Correct Answer:
See the solution below in Explanation.
Explanation:
Solution:
sed -i '/^pool /d;/^server /d' /etc/chrony.conf
echo "server time.example.com iburst" > > /etc/chrony.conf
systemctl enable --now chronyd
systemctl restart chronyd
chronyc sources -v
chronyc tracking
Detailed Explanation:
* chronyd is the RHEL 10 NTP implementation.
* iburst speeds up initial synchronization.
* chronyc sources -v and chronyc tracking confirm the sync state.
* Red Hat's RHEL 10 time synchronization documentation uses chrony as the supported NTP
implementation. ( Red Hat Documentation )
기본 저장소를 사용하도록 시스템을 구성하십시오.
YUM 저장소는 http://content/rhel9.0/x86_64/dvd/BaseOS 및 http://content/rhel9.0/x86_64/dvd/AppStream에서 사용할 수 있습니다. 시스템을 구성하여 해당 저장소를 사용하십시오.
이러한 위치를 기본 저장소로 지정합니다.
Correct Answer:
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
네트워크 설정 구성
노드1을 다음 네트워크 설정으로 구성하십시오.
호스트 이름: node1.domain250.example.com
IP 주소: 172.25.250.100
서브넷 마스크: 255.255.255.0
게이트웨이: 172.25.250.254
Correct Answer:
Solution:
# Connect to servera via console for IP modification, then check using the ip addr command.
# After confirming no issues, SSH to servera for hostname modification. This way, you can copy the hostname to avoid typos.
[root@clear ~] nmcli con show
[root@clear ~] nmcli con mod 'network configuration name' ipv4.method manual ipv4.addresses 172.25.0.25/24 ipv4.gateway 172.25.0.254 ipv4.dns 172.25.0.254
autoconnect yes
[root@clear ~] nmcli con up 'network configuration name'
[root@clear ~] ip a
[root@clear ~] ssh [email protected]
[root@clear ~] hostnamectl set-hostname red.lab0.example.com
# Verification
[root@node1 ~] ip a //Check if the IP is correct
[root@node1 ~] hostname //Check if the hostname is correct
/share/projects 디렉토리를 생성하고, Alex를 소유자로 설정한 다음, 사용자들이 서로의 파일을 삭제할 수 없도록 스티키 비트를 구성하세요.
Correct Answer:
See the solution below in Explanation.
Explanation:
Solution:
mkdir -p /share/projects
chown alex /share/projects/
chmod a+rwx,+t /share/projects/
ls -ld /share/projects/
Detailed Explanation:
* chmod a+rwx gives read, write, and execute to everyone.
* +t sets the sticky bit.
* Sticky bit on a shared directory means users can create files, but only the file owner, directory owner, or
root can delete them.
* This is the same model used on /tmp.
시스템 호스트 이름을 구성하고 기존 NetworkManager 연결에 고정 IP 주소를 구성합니다.
Correct Answer:
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.
공동 디렉토리 만들기
다음과 같은 속성을 가진 공유 디렉터리 /home/managers를 생성합니다.
- /home/managers의 그룹 소유권은 sysmgrs입니다.
- 해당 디렉터리는 sysmgrs 그룹 구성원에게 읽기, 쓰기 및 실행 권한을 부여해야 하지만, 다른 사용자에게는 읽기 또는 쓰기 권한을 부여해서는 안 됩니다.
(물론, 루트 사용자는 모든 파일과 폴더에 접근할 수 있습니다.)
- /home/managers 내에 생성된 모든 파일은 자동으로 sysmgrs 그룹으로 설정된 그룹 소유권을 상속받아야 합니다.
Correct Answer:
Solution:
[root@node1 ~]# mkdir /home/managers
[root@node1 ~]# chgrp sysmgrs /home/managers
[root@node1 ~]# chmod 2770 /home/managers
# Verification
[root@node1 ~]# ll -d /home/managers
0
0
0
0