Sample RHCE Exam 2 - RHCSA & RHCE Red Hat Enterprise Linux 7: Training and Exam Preparation Guide (EX200 and EX300), Third Edition (2015) 

RHCSA & RHCE Red Hat Enterprise Linux 7: Training and Exam Preparation Guide (EX200 and EX300), Third Edition (2015)

Appendix D: Sample RHCE Exam 2

Time Duration:     4 hours

Passing Score:        70% (210 out of 300)

Instructions:         The RHCE exam, EX300, is offered electronically on a desktop system running RHEL7. The exam presents a list of tasks that are to be completed within the stipulated time. Firewall and SELinux are active and running, and they need to be taken into account. All settings performed on the systems must survive system reboots or you will not be given credits. Access to the Internet, printed material, and electronic devices is prohibited during the exam.

Setup for the Sample Exam:

Install RHEL7 (or its clone) on a physical system called hv4 with hypervisor and desktop/X Window support. Install two virtual machines (rhce3 and rhce4) and load minimal RHEL7 without GUI support. The virtual machines should have their primary interfaces configured with appropriate IP addresses on the same network. You may want to build virtual machines for this sample exam on an existing hypervisor.

Instructions for this Sample Exam:

Instruction 01: Tasks furnished here are in addition to the exercises and labs presented in the RHCSA section of this book. No solutions are provided.

Instruction 02: Do not consult the material in this book or browse the Internet while taking this sample exam. However, you can refer to the online help and the documentation located in the /usr/share/doc directory.

Instruction 03: This exam should be done in a text console using commands or text tools.

Instruction 04: You can reboot the system after completing each task or a few tasks, or wait until all tasks have been finished. Do not forget to retest the configuration after the reboot.

Instruction 05: Create user accounts harry, barry, and mary on both virtual machines and the hypervisor server, and set a password for them.

Instruction 06: Use your own judgement for making decisions where necessary.

Tasks:

Task 01: Allow telnet access from host 192.168.2.20 and network 192.168.3 on both virtual machines.

Task 02: Configure IP forwarding on rhce4.

Task 03: Write a shell script on rhce3 to create three user accounts called user555, user666, and user777 with no login shell and passwords matching their usernames. Usernames should be listed in a file and the script should be able to get that information from that file.

Task 04: Share /shared directory on rhce3 with Samba accessible to user larry and mary on the local network with write and browse capabilities. Access the share on rhce4 and set it for persistent mount on /mnt/cifsshare. Create a file in the mount point with some text identifying it, and verify the file creation on rhce3.

Task 05: Share /shared directory on rhce3 in read/write mode with NFS to users on the local network. Mount it on rhce4 on /mnt/nfsshare. Create a file in the mount point with some text identifying it, and verify the file creation on rhce3.

Task 06: Configure Apache with “This is my web server” in index.html on rhce3. This web server should be accessible from rhce3, rhce4, and hv4 by typing webserver.rhce3.example.com.

Task 07: Configure a virtual host called vhostlab1.example.com on port 8000 on rhce3. Create an index.html file with some unique text in it for identification. Update DNS or the hosts table for resolution.

Task 08: Create a simple CGI script on rhce1 that displays the output of the lsblk command when accessed as www.rhce3.example.com.

Task 09: Configure user harry on rhce3 so that he is prompted for passphrase instead of a password from rhce4.

Task 10: Set up Postfix on rhce3 for the local network and have the mail for user mary forwarded to user larry, example.com to user barry, and any mail for group admins forwarded to user gary.

Task 11: Configure NTP server on hv4, peer on rhce3, and client on rhce4.

Task 12: Create four virtual interfaces on the hypervisor and assign two to rhce3 and the other two to rhce4. Configure teaming with IP assignments of your choice on both virtual machines. Run ping tests to verify the connection. Disable one of the interfaces while ping running. You should not notice a change. The team interfaces should be active after system reboots.

Task 13: Create a MariaDB database called rhcedb and add ten records containing firstname, lastname, city, country, and random social security/insurance numbers. The records should have some duplicate fields.

Task 14: Query the rhcedb database to find all people in a city with a specific social security/insurance number, and store the result in a file. Run another query to find all people with matching lastnames in a country.

Task 15: Create a backup of the rhcedb database and store it as a rhcedb.dump. Remove the rhcedb database, and restore it from the dump. Verify the records.

Task 16: Create two directories /nfs1 and /nfs2 on rhce3 and export them with NFS to rhce4 and example.com domain, respectively. Export /nfs1 in read/write mode and /nfs2 in read-only mode. Mount /nfs1 on rhce4 on /mnt/nfsshare1. Mount /nfs2 on hv4 on /mnt/nfsshare2. Touch a file in the mount points with some text for identification, and verify the file creation on rhce3. Make sure the mounts survive system reboots.

Task 17: Add port 9999 to SELinux and forward it to port 80 persistently.

Task 18: Create a 500MB disk on hv4 and assign it to rhce3. Configure iSCSI target on rhce3 using the disk and present it as a block disk to rhce4.

Task 19: Configure iSCSI initiator on rhce4 using the block device presented from rhce3. Create a standard partition and construct ext3 file system structures. Mount the file system on /mnt/iscsipar on rhce4 persistently using a label.

Task 20: Configure Apache on rhce4 with DocumentRoot /var/rhce4 and password-protected access to dba group members (create the group with two members).

Task 21: Configure rhce4 as a relayhost to forward mail from the localhost to rhce3. Send a test mail as the root user. The mail should appear to have originated from example.com domain. Log on to rhce3 as root and verify the receipt.

Task 22: Configure caching DNS service on rhce4 and test it.

Task 23: Configure a web server called srhce4.example.com on rhce4 that provides access to a private directory called /var/private to user barry.

Task 24: Create four virtual interfaces on the hypervisor and assign two to rhce3 and the other two to rhce4. Configure bonding with IP assignments of your choice on both virtual machines. Run ping tests to verify the connection. Disable one of the interfaces while ping running. You should not notice an issue. The bonding interfaces should be active after system reboots. The bond should work and co-exist with IPv6 and teaming setups.

Reboot the system and validate the configuration.