최신 EX200 무료덤프 - RedHat Red Hat Certified System Administrator - RHCSA
Configure Network Settings
Configure node1 with the following network settings:
Hostname: node1.domain250.example.com
IP address: 172.25.250.100
Subnet mask: 255.255.255.0
Gateway: 172.25.250.254
Configure node1 with the following network settings:
Hostname: node1.domain250.example.com
IP address: 172.25.250.100
Subnet mask: 255.255.255.0
Gateway: 172.25.250.254
정답:
# 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
# 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
Your System is configured in 192.168.0.0/24 Network and your nameserver is 192.168.0.254. Make successfully resolve to server1.example.com.
정답:
nameserver is specified in question,
1. Vi /etc/resolv.conf
nameserver 192.168.0.254
2. host server1.example.com
1. Vi /etc/resolv.conf
nameserver 192.168.0.254
2. host server1.example.com
Create Archive
Create a tar archive named /root/backup.tar.bz2, which should contain the contents of /usr/local. The tar archive must be compressed using bzip2.
Create a tar archive named /root/backup.tar.bz2, which should contain the contents of /usr/local. The tar archive must be compressed using bzip2.
정답:
[root@node1 ~]# yum -y install bzip2
[root@node1 ~]# tar -jcvPf /root/backup.tar.bz2 /usr/local
# Verification
[root@node1 ~]# file /root/backup.tar.bz
[root@node1 ~]# tar -jcvPf /root/backup.tar.bz2 /usr/local
# Verification
[root@node1 ~]# file /root/backup.tar.bz
Some users home directory is shared from your system. Using showmount -e localhost command, the shared directory is not shown. Make access the shared users home directory.
정답:
Verify the File whether Shared or not ? : cat /etc/exports
Start the nfs service: service nfs start
Start the portmap service: service portmap start
Make automatically start the nfs service on next reboot: chkconfig nfs on Make automatically start the portmap service on next reboot: chkconfig portmap on Verify either sharing or not: showmount -e localhost Check that default firewall is running on system?
If running flush the iptables using iptables -F and stop the iptables service.
Start the nfs service: service nfs start
Start the portmap service: service portmap start
Make automatically start the nfs service on next reboot: chkconfig nfs on Make automatically start the portmap service on next reboot: chkconfig portmap on Verify either sharing or not: showmount -e localhost Check that default firewall is running on system?
If running flush the iptables using iptables -F and stop the iptables service.
According the following requirements, configure autofs service and automatically mount to user's home directory in the ldap domain.
- Instructor.example.com (192.168.0.254) has shared /home/guests/ldapuserX home directory to your system by over NFS export, X is your hostname number.
- LdapuserX's home directory is exist in the instructor.example.com: /home/ guests/ldapuserX
- LdapuserX's home directory must be able to automatically mount to /home/ guests/ldapuserX in your system.
- Home directory have write permissions for the corresponding user.
However, you can log on to the ldapuser1 - ldapuser99 users after verification. But you can only get your corresponding ldapuser users. If your system's hostname is server1.example.com, you can only get ldapuser1's home directory.
- Instructor.example.com (192.168.0.254) has shared /home/guests/ldapuserX home directory to your system by over NFS export, X is your hostname number.
- LdapuserX's home directory is exist in the instructor.example.com: /home/ guests/ldapuserX
- LdapuserX's home directory must be able to automatically mount to /home/ guests/ldapuserX in your system.
- Home directory have write permissions for the corresponding user.
However, you can log on to the ldapuser1 - ldapuser99 users after verification. But you can only get your corresponding ldapuser users. If your system's hostname is server1.example.com, you can only get ldapuser1's home directory.
정답:
mkdir -p /home/guests
cat /etc/auto.master:
/home/guests /etc/auto.ldap
cat /etc/auto.ldap:
ldapuser1 -rw instructor.example.com:/home/guests/ldapuser1
automatically mount all the user's home directory #* -rw instructor.example.com:/home/guests/&
cat /etc/auto.master:
/home/guests /etc/auto.ldap
cat /etc/auto.ldap:
ldapuser1 -rw instructor.example.com:/home/guests/ldapuser1
automatically mount all the user's home directory #* -rw instructor.example.com:/home/guests/&
SELinux must run in force mode.
정답:
/etc/sysconfig/selinux
SELINUX=enforcing
SELINUX=enforcing
Set Root Password
Set the root password of node2 to "redhat." You need to gain system access to perform this operation.
Set the root password of node2 to "redhat." You need to gain system access to perform this operation.
정답:
***Restart the node2 machine and wait for the screen shown in Image 1.
Press "e" to enter the screen shown in Image 2. The original configuration is as shown in the image. Modify the original configuration to the part highlighted in red box, as shown in Image 2. Then press "Ctrl+X" to execute the following commands:
# chroot /sysroot
# echo redhat |passwd --stdin root
# touch /.autorelabel
# sync
# exit
# reboot
Press "e" to enter the screen shown in Image 2. The original configuration is as shown in the image. Modify the original configuration to the part highlighted in red box, as shown in Image 2. Then press "Ctrl+X" to execute the following commands:
# chroot /sysroot
# echo redhat |passwd --stdin root
# touch /.autorelabel
# sync
# exit
# reboot
Configure the verification mode of your host account and the password as LDAP. And it can login successfully through ldapuser40. The password is set as "password". And the certificate can be downloaded from http://ip/dir/ldap.crt. After the user logs on the user has no host directory unless you configure the autofs in the following questions.
정답:
system-config-authentication
LDAP Server: ldap//instructor.example.com (In domain form, not write IP) OR
# yum groupinstall directory-client (1.krb5-workstation 2.pam-krb5 3.sssd)
# system-config-authentication
1.User Account Database: LDAP
2.LDAP Search Base DN: dc=example,dc=com
3.LDAP Server: ldap://instructor.example.com (In domain form, not write IP) 4.Download CA Certificate
5.Authentication Method: LDAP password
6.Apply
getent passwd ldapuser40
LDAP Server: ldap//instructor.example.com (In domain form, not write IP) OR
# yum groupinstall directory-client (1.krb5-workstation 2.pam-krb5 3.sssd)
# system-config-authentication
1.User Account Database: LDAP
2.LDAP Search Base DN: dc=example,dc=com
3.LDAP Server: ldap://instructor.example.com (In domain form, not write IP) 4.Download CA Certificate
5.Authentication Method: LDAP password
6.Apply
getent passwd ldapuser40
Part 2 (on Node2 Server)
Task 4 [Managing Logical Volumes]
Resize the logical volume, lvrz and reduce filesystem to 4600 MiB. Make sure the the filesystem contents remain intact with mount point /datarz (Note: partitions are seldom exactly the size requested, so anything within the range of 4200MiB to 4900MiB is acceptable)
Task 4 [Managing Logical Volumes]
Resize the logical volume, lvrz and reduce filesystem to 4600 MiB. Make sure the the filesystem contents remain intact with mount point /datarz (Note: partitions are seldom exactly the size requested, so anything within the range of 4200MiB to 4900MiB is acceptable)
정답:
* [root@node2 ~]# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
vdb 252:16 0 5G 0 disk
└─vdb1 252:17 0 4.2G 0 part
└─vgrz-lvrz 253:2 0 4.1G 0 lvm /datarz
vdc 252:32 0 5G 0 disk
└─vdc1 252:33 0 4.4G 0 part
└─datavg-datalv 253:3 0 3.9G 0 lvm /data
vdd 252:48 0 5G 0 disk
vde 252:64 0 10G 0 disk
[root@node2 ~]# lvs
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
lvrz vgrz -wi-ao---- 4.10g
[root@node2 ~]# vgs
VG #PV #LV #SN Attr VSize VFree
vgrz 1 1 0 wz--n- <4.15g 48.00m
[root@node2 ~]# parted /dev/vdb print
Number Start End Size Type File system Flags
1 1049kB 4456MB 4455MB primary lvm
* [root@node2 ~]# df -hT
Filesystem Type Size Used Avail Use% Mounted on
/dev/mapper/vgrz-lvrz ext4 4.0G 17M 3.8G 1% /datarz
[root@node2 ~]# parted /dev/vdb mkpart primary 4456MiB 5100MiB
[root@node2 ~]# parted /dev/vdb set 2 lvm on
[root@node2 ~]# udevadm settle
[root@node2 ~]# pvcreate /dev/vdb2
Physical volume "/dev/vdb2" successfully created.
* [root@node2 ~]# vgextend vgrz /dev/vdb2
Volume group "vgrz" successfully extended
[root@node2 ~]# lvextend -r -L 4600M /dev/vgrz/lvrz
Size of logical volume vgrz/lvrz changed from 4.10 GiB (1050 extents) to 4.49 GiB (1150 extents).
Logical volume vgrz/lvrz successfully resized.
[root@node2 ~]# resize2fs /dev/vgrz/lvrz
[root@node2 ~]# df -hT
Filesystem Type Size Used Avail Use% Mounted on
/dev/mapper/vgrz-lvrz ext4 4.4G 17M 4.2G 1% /datarz
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
vdb 252:16 0 5G 0 disk
└─vdb1 252:17 0 4.2G 0 part
└─vgrz-lvrz 253:2 0 4.1G 0 lvm /datarz
vdc 252:32 0 5G 0 disk
└─vdc1 252:33 0 4.4G 0 part
└─datavg-datalv 253:3 0 3.9G 0 lvm /data
vdd 252:48 0 5G 0 disk
vde 252:64 0 10G 0 disk
[root@node2 ~]# lvs
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
lvrz vgrz -wi-ao---- 4.10g
[root@node2 ~]# vgs
VG #PV #LV #SN Attr VSize VFree
vgrz 1 1 0 wz--n- <4.15g 48.00m
[root@node2 ~]# parted /dev/vdb print
Number Start End Size Type File system Flags
1 1049kB 4456MB 4455MB primary lvm
* [root@node2 ~]# df -hT
Filesystem Type Size Used Avail Use% Mounted on
/dev/mapper/vgrz-lvrz ext4 4.0G 17M 3.8G 1% /datarz
[root@node2 ~]# parted /dev/vdb mkpart primary 4456MiB 5100MiB
[root@node2 ~]# parted /dev/vdb set 2 lvm on
[root@node2 ~]# udevadm settle
[root@node2 ~]# pvcreate /dev/vdb2
Physical volume "/dev/vdb2" successfully created.
* [root@node2 ~]# vgextend vgrz /dev/vdb2
Volume group "vgrz" successfully extended
[root@node2 ~]# lvextend -r -L 4600M /dev/vgrz/lvrz
Size of logical volume vgrz/lvrz changed from 4.10 GiB (1050 extents) to 4.49 GiB (1150 extents).
Logical volume vgrz/lvrz successfully resized.
[root@node2 ~]# resize2fs /dev/vgrz/lvrz
[root@node2 ~]# df -hT
Filesystem Type Size Used Avail Use% Mounted on
/dev/mapper/vgrz-lvrz ext4 4.4G 17M 4.2G 1% /datarz
Create a Container Image
As the user "wallah," download the Containerfile from http://classroom/Containerfile.
Do not modify the content of this file. Build an image named "pdf."
As the user "wallah," download the Containerfile from http://classroom/Containerfile.
Do not modify the content of this file. Build an image named "pdf."
정답:
# Install container management tools
[root@node1 ~]# dnf -y install container-tools
# Execute operations as the user wallah
[root@node1 ~]# ssh wallah@localhost
# Download the container build file
[wallah@node1 ~]# wget http://classroom/Containerfile
# Log in to the image registry
[wallah@node1 ~]# podman login -u admin -p redhat321 registry.lab.example.com
# Build the container image using the Containerfile in the current directory, with the image name "pdf"
[wallah@node1 ~]# podman build -t pdf .
# View the images
[wallah@node1 ~]$ podman images
REPOSITORY TAG IMAGE ID CREATED SIZE
localhost/pdf latest 1d6e7ea71460 31 seconds ago 300 MB
registry.lab.example.com/ubi9-beta/ubi latest 28b0a4b69d9b 2 years ago 229 MB
[root@node1 ~]# dnf -y install container-tools
# Execute operations as the user wallah
[root@node1 ~]# ssh wallah@localhost
# Download the container build file
[wallah@node1 ~]# wget http://classroom/Containerfile
# Log in to the image registry
[wallah@node1 ~]# podman login -u admin -p redhat321 registry.lab.example.com
# Build the container image using the Containerfile in the current directory, with the image name "pdf"
[wallah@node1 ~]# podman build -t pdf .
# View the images
[wallah@node1 ~]$ podman images
REPOSITORY TAG IMAGE ID CREATED SIZE
localhost/pdf latest 1d6e7ea71460 31 seconds ago 300 MB
registry.lab.example.com/ubi9-beta/ubi latest 28b0a4b69d9b 2 years ago 229 MB