Rhcsa Lab Test

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

Training and Certification

RHCSA LAB TEST

Important Notes
• Collect the answers before Friday, May 20th 2022 at 13.00 WIB
• The answer is a screenshot that displays the results of the configuration that has been
done, either in the command or contents of the configuration file
• Each screenshot must display the date and time (WIB)
• File format using .docx or .pdf
• File naming format:
Name - Agency
Example:
Feryansa - PT Inovasi Informatika Indonesia.docx
Feryansa - PT Inovasi Informatika Indonesia.pdf
• Submit to the provided Google Form (https://bit.ly/39ggcdY)
Training and Certification

RHCSA LAB TEST

Configure Default Repositories


Configure the servera to use http://server.lab.test.com/BaseOS and
http://server.lab.test.com/AppStream as default YUM repositories.

Create User Accounts


In servera, create the following users, groups, and group memberships:
• A group named production
• A user brian who belongs to production as a secondary group
• A user joji who also belongs to production as a secondary group
• A user niki who does not have access to an interactive shell on the system, and who
is not a member of production
• brian, joji, and niki should all have the password 88rising

Configure a Cron Job


In servera, configure a cron job that runs every 7 minutes and executes logger “LAB TEST
in progress” as the user joji. (Must be done Create User Accounts first)

Create a Collaborative Directory


In servera, create a collaborative directory /home/project with the following
characteristics: (Must be done Create User Accounts first)
• Group ownership of /home/project is production
• The directory should be readable, writable, and accessible to members of production,
but not to any other user
• File created in /home/project automatically have group ownership set to the
production group
Training and Certification

RHCSA LAB TEST

Configure NTP
In servera, configure the system so that it is an NTP client of utility.lab.test.com.

Configure ACL Permissions


In servera, copy the file /etc/fstab to /home/project/fstab, and configure the
permissions of /home/project/fstab so that:
• The file is owned by the root user
• The file belongs to the group root
• The file should not be executable by anyone
• The user brian is able to read and write this file
• The user joji can neither write nor read this file
• All other users (current or future) have the ability to read this file

Configure a User Account


In servera, create a user poetri with a userid of 2000 and have 88rising as a password.

Locate Files
In servera, locate all the files owned by student and place a copy of them in the
/home/project/findfiles directory.

Find a String
In servera, find all lines in the file /etc/ssh/sshd_config that contain the string ssh.
Put a copy of all these lines in the original order in the file /home/project/sshlines.
/home/project/sshlines should contain no empty lines and all lines must be exact copies
of the original lines in /etc/ssh/sshd_config.
Training and Certification

RHCSA LAB TEST

Debug SELinux
Change the SELinux context type in the /home/project and everything in this directory to
httpd_sys_content_t persistently. (Must be done Create a Collaborative Directory,
Configure a User Account, Locate Files, and Find a String first)

Create an Archive
In servera, create a tar archive named /root/archive.bz2 which contains the content of
/home/project. The tar archive must be compressed using bzip2. (Must be done Create a
Collaborative Directory, Configure a User Account, Locate Files, Find a String, and
Debug SELinux first)

Set the Root Password


Run lab boot-resetting start at the workstation and set the root password for
servera to 88rising using the boot processes.

Create a Logical Volume


In servera, create a new logical volume according to the following requirements:
• The logical volume is named music and belongs to the development volume group
and has a size of 400MiB.
• The development volume group should have 2 partitions, each partition has a size
500MiB.
• Format the new logical volume with an ext4 filesystem, and should be automatically
mounted under /song/progress at system boot time

Add a Swap Partition


In servera, add an additional swap partition of 1GiB to the system, and should automatically
mount when the system boot. Note: Don’t remove any existing swap partitions on the system.
Training and Certification

RHCSA LAB TEST

Create a VDO Volume


In servera, create a new VDO volume according to the following requirements:
• Use the unpartitioned disk
• The volume is named vdopart
• The volume has a logical size of 35G
• The volume is formatted with the xfs filesystem
• The volume is mounted under /vdodir at boot time

Resize a Logical Volume


In servera, resize the logical volume music and its filesystem to 700MiB and make sure that
the filesystem contents remain intact. (Must be done Create a Logical Volume first)

Configure System Tuning


Choose the balanced tuned profile for the servera and set it as the default.

Configure Autofs
Run lab netstorage-review start at the workstation and configure an automounter
indirect map on servera using shares from serverb. Create an indirect map using files
named /etc/auto.master.d/shares.autofs for the master map and
/etc/auto.shares for the mapping file. Use the /remote directory as the main mount
point on servera. Reboot servera to determine if the autofs service starts automatically.
Training and Certification

RHCSA LAB TEST

Running Containers
Run lab lab containers-review start at the workstation. And on serverb, as
the podsvc user, create a detached MariaDB container named inventorydb. To query
registry.lab.example.com, use the admin account with redhat321 for the password.
Use the rhel8/mariadb-103 image from registry.lab.example.com, specifying the
tag with the lowest version number on that image. Map port 3306 in the container to port
13306 on the host. Mount the /home/podsvc/db_data directory on the host
as /var/lib/mysql/data in the container. Declare the following variable values:

Variable Value

MYSQL_USER operator1

MYSQL_PASSWORD redhat

MYSQL_DATABASE inventory

MYSQL_ROOT_PASSWORD redhat

Also configure systemd so that the inventorydb container starts automatically with the
server.

Configure Network Settings


Configure servera to have the following network configuration:
• Hostname: servera.lab.test.com
• IP address: 172.24.4.10
• Netmask: 255.255.255.0
• Gateway: 172.24.4.254
• Name server: 172.24.4.254

Note: All the configuration must be done first before running this task, because this task will
make the system disconnected from all system.

You might also like