# (十)題目&解題影片 1. Configure network settings Configure mars to have the following network configuration: * Hostname: kvm8.deyu.wang * IP address: 192.168.122.8 * Netmask: 255.255.255.0 * Gateway: 192.168.122.1 * Name server: 192.168.122.1 :::info 解題影片: https://www.youtube.com/watch?v=mQm4PMpnybw&list=PL7Wa-BofSEa9knCUaaKAjGh6Dd7p3KNFf&index=1 ::: --- 2. Configure your system to use default repositories YUM repositories have been made available from http://dywang.csie.cyut.edu.tw/centos8.2/BaseOS and http://dywang.csie.cyut.edu.tw/centos8.2/AppStream Configure your systems to use these locations as default repositories. :::info 解題影片: https://www.youtube.com/watch?v=aDLJEDK88Bg&list=PL7Wa-BofSEa9knCUaaKAjGh6Dd7p3KNFf&index=2 ::: --- 3. Debug SELinux A web server running on non-standard port 82 is having issues serving content. Debug and fix the issues as necessary so that: * The web server on your system can serve all the existing HTML files from /var/www/html (Note: Do not remove or otherwise alter the existing file content) * The web server serves this content on port 82 * The web server starts automatically at system boot time :::info 解題影片: https://www.youtube.com/watch?v=mcoq_q6x-NQ&list=PL7Wa-BofSEa9knCUaaKAjGh6Dd7p3KNFf&index=3 ::: --- 4. Create user accounts Create the following users, groups, and group memberships: * A group named sysmgrs * A user deyu1 who belongs to sysmgrs as a secondary group * A user deyu2 who also belongs to sysmgrs as a secondary group * A user deyu3 who does not have access to an interactive shell on the system, and who is not a member of sysmgrs * deyu1 , deyu2 , and deyu3 should all have the password of tritebam :::info 解題影片: https://www.youtube.com/watch?v=IIvaBb5QX7U&list=PL7Wa-BofSEa9knCUaaKAjGh6Dd7p3KNFf&index=4 ::: --- 5. Configure a cron job The user deyu2 must configure a cron job that runs daily at 14:23 local time and executes /bin/echo hiya :::info 解題影片: https://www.youtube.com/watch?v=Waq0TUYFk5c&list=PL7Wa-BofSEa9knCUaaKAjGh6Dd7p3KNFf&index=5 ::: --- 6. Create a collaborative directory Create a collaborative directory /home/managers with the following characteristics: * Group ownership of /home/managers is sysmgrs * The directory should be readable, writable, and accessible to members of sysmgrs , but not to any other user. (It is understood that root has access to all files and directories on the system) * Files created in /home/managers automatically have group ownership set to the sysmgrs group :::info 解題影片: https://www.youtube.com/watch?v=E2q82AOXZgk&list=PL7Wa-BofSEa9knCUaaKAjGh6Dd7p3KNFf&index=6 ::: --- 7. Configure NTP Configure your system so that it is an NTP client of server.deyu.wang. (Note: server.deyu.wang is a DNS alias of deyu.wang). :::info 解題影片: https://www.youtube.com/watch?v=Tlhzxq0FLag&list=PL7Wa-BofSEa9knCUaaKAjGh6Dd7p3KNFf&index=7 ::: --- 8. Configure autofs Configure autofs to automount the home directories of remote users as follows: * server.deyu.wang(192.168.122.1) NFS-exports /rhome to your system. This filesystem contains a pre-configured home directory for the user ldapuser3 * ldapuser3's home directory is server.deyu.wang:/rhome/ldapuser3 * ldapuser3's home directory should be automounted locally beneath /rhome as /rhome/ldapuser3 * home directories must be writable by their users * ldapuser3's password is 123qwe :::info 解題影片: https://www.youtube.com/watch?v=h-44lRmx_eQ&list=PL7Wa-BofSEa9knCUaaKAjGh6Dd7p3KNFf&index=8 ::: --- 9. Configure /var/tmp/fstab permissions Copy the file /etc/fstab to /var/tmp/fstab . Configure the permissions of /var/tmp/fstab so that: * the file /var/tmp/fstab is owned by the root user * the file /var/tmp/fstab belongs to the group root * the file /var/tmp/fstab should not be executable by anyone * the user deyu1 is able to read and write /var/tmp/fstab * the user deyu2 can neither write nor read /var/tmp/fstab * all other users (current or future) have the ability to read /var/tmp/fstab :::info 解題影片: https://www.youtube.com/watch?v=drIGGLZQDsU&list=PL7Wa-BofSEa9knCUaaKAjGh6Dd7p3KNFf&index=9 ::: --- 10. Configure a user account. Create a user deyu4 with a userid of 3533. The password for this user should be tritebam. :::info 解題影片: https://www.youtube.com/watch?v=_tVvpbBTvpQ&list=PL7Wa-BofSEa9knCUaaKAjGh6Dd7p3KNFf&index=10 ::: --- 11. Locate files Locate all the files owned by deyu8 and place a copy of them in the /root/findfiles directory. :::info 解題影片: https://www.youtube.com/watch?v=8-g6A2-Kwrw&list=PL7Wa-BofSEa9knCUaaKAjGh6Dd7p3KNFf&index=11 ::: --- 12. Find a string Find all lines in the file /usr/share/xml/iso-codes/iso_639_3.xml that contain the string ng. Put a copy of all these lines in the original order in the file /root/list. /root/list should contain no empty lines and all lines must be exact copies of the original lines in /usr/share/xml/iso-codes/iso_639_3.xml. :::info 解題影片: https://www.youtube.com/watch?v=53d-nfbVrxs&list=PL7Wa-BofSEa9knCUaaKAjGh6Dd7p3KNFf&index=12 ::: --- 13. Create an archive Create a tar archive named /root/backup.tar.gz which contains the content of /usr/local. The tar archive must be compressed using gzip. :::info 解題影片: https://www.youtube.com/watch?v=L2n_4oUfyaY&list=PL7Wa-BofSEa9knCUaaKAjGh6Dd7p3KNFf&index=13 ::: --- 14. Create a container named logserver using the rsyslog image that is available from your registry server * Configure it to run as a systemd service that should run for the existing user deyu5 only * The service should be named container-logserver and should automatically start after a system reboot without any manual intervention :::info 解題影片: https://www.youtube.com/watch?v=4I9hA8PSdN0&list=PL7Wa-BofSEa9knCUaaKAjGh6Dd7p3KNFf&index=14 ::: --- 15. Extend the service from the previous task in this way: * Configure the host system journal to preserve its data after reboot and restart the logging service * Copy any *.journal files from the host /var/log/journal directory and any subdirectories, into the directory /home/deyu5/container_journal * Configure the service to automatically mount the directory /home/deyu5/container_journal under /var/log/journal on the container when it starts :::danger 新版題庫已刪除15題,故無解題影片 ::: --- 16. Configure the container service you created in a previous task to use persistent storage as follows: * Create a directory on the container host named container_journal under /home/deyu5 * The container service should mount the host directory /home/deyu5/container_journal under /var/log/journal on the container * When the command logger -p local3.info 'dywmylog test' is run on the container the message logger 'dywmylog test' should appear in both /var/log/journal/csie.cyut.log on the container as well as in /home/deyu5/container_journal/csie.cyut.log on the container host. :::info 解題影片: https://www.youtube.com/watch?v=c2r32VWWyu8&list=PL7Wa-BofSEa9knCUaaKAjGh6Dd7p3KNFf&index=15 ::: --- 17. Set default permissions Configure permissions for user deyu6 such that: * All newly created files for user deyu6 should have -r--r--r-- as the default permission * All newly created directories for the same user should have dr-xr-xr-x as the default permission :::info 解題影片: https://www.youtube.com/watch?v=pckH0Z2QbkE&list=PL7Wa-BofSEa9knCUaaKAjGh6Dd7p3KNFf&index=16 ::: --- 18. Set the root password Set the root password for kvm10 to 123qwe. You will need to gain access to the system in order to do this. :::info 解題影片: https://www.youtube.com/watch?v=ybRe46EN5JI&list=PL7Wa-BofSEa9knCUaaKAjGh6Dd7p3KNFf&index=17 ::: --- 19. Configure your system to use default repositories * YUM repositories have been made available from http://dywang.csie.cyut.edu.tw/centos8.2/BaseOS and http://dywang.csie.cyut.edu.tw/centos8.2/AppStream * Configure your systems to use these locations as default repositories. :::info 解題影片: https://www.youtube.com/watch?v=ngC-cUvc9fw&list=PL7Wa-BofSEa9knCUaaKAjGh6Dd7p3KNFf&index=18 ::: --- 20. Resize a logical volume Resize the logical volume vo and its filesystem to 80 MiB. Make sure that the filesystem contents remain intact. Note: partitions are seldom exactly the same size requested, so a size within the range of 75 MiB to 83 MiB is acceptable. :::info 解題影片: https://www.youtube.com/watch?v=01YHwPSjjQo&list=PL7Wa-BofSEa9knCUaaKAjGh6Dd7p3KNFf&index=19 ::: --- 21. Add a swap partition Add an additional swap partition of 56MiB to your system. The swap partition should automatically mount when your system boots. Do not remove or otherwise alter any existing swap partitions on your system. :::info 解題影片: 1. https://www.youtube.com/watch?v=jMC6dGwThzA&list=PL7Wa-BofSEa9knCUaaKAjGh6Dd7p3KNFf&index=20 2. https://www.youtube.com/watch?v=ewZov248GRI&list=PL7Wa-BofSEa9knCUaaKAjGh6Dd7p3KNFf&index=21 ::: --- 22. Create a logical volume Create a new logical volume according to the following requirements: * The logical volume is named qa and belongs to the qagroup volume group and has a size of 60 extents * Logical volumes in the qagroup volume group should have an extent size of 2 MiB * Format the new logical volume with a ext3 filesystem. The logical volume should be automatically mounted under /mnt/qa at system boot time :::info 解題影片: 1. https://www.youtube.com/watch?v=jMC6dGwThzA&list=PL7Wa-BofSEa9knCUaaKAjGh6Dd7p3KNFf&index=20 2. https://www.youtube.com/watch?v=ewZov248GRI&list=PL7Wa-BofSEa9knCUaaKAjGh6Dd7p3KNFf&index=21 ::: --- 23. Create a VDO volume Create a new VDO volume according to the following requirements: * Use the unpartitioned disk * The volume is named vdough * The volume has a logical size of 50G * The volume is formatted with the xfs filesystem * The volume is mounted (at boot time) under /vbread :::info 解題影片: https://www.youtube.com/watch?v=HgSr7cBmbtQ&list=PL7Wa-BofSEa9knCUaaKAjGh6Dd7p3KNFf&index=22 ::: --- 24. Configure System Tuning Choose the recommended tuned profile for your system and set it as the default. :::info 解題影片: https://www.youtube.com/watch?v=pRnIocvYVv4&list=PL7Wa-BofSEa9knCUaaKAjGh6Dd7p3KNFf&index=23 :::