RHCSA - v8 (1) Containers
RHCSA - v8 (1) Containers
2
========================================================================
*Important_Instructions: Please read carefully.
● The web server on your system can server all the existing HTML files from
/var/www/html ( NOTE: Do not make any changes to these files )
● Web service should automatically start at boot time.
========================================================================
#Q4. Create User accounts with supplementary group.
========================================================================
#Q5. Configure a cron job that runs every 1 minutes and executes:
● Copy the file /etc/fstab to /var/tmp/ and configure the "ACL" as mentioned following.
● The file /var/tmp/fstab should be owned by the "root".
● The file /var/tmp/fstab should belong to the group "root".
● The file /var/tmp/fstab should not be executable by any one.
● The user "sarah" should be able to read and write to the file.
● The user "harry" can neither read nor write to the file.
● Other users (future and current) should be able to read /var/tmp/fstab.
========================================================================
#Q10. Create user 'bob' with 2112 uid and set the password 'trootent'
========================================================================
#Q11. Locate all files owned by user "harry" and copy it under /root/harry-files
========================================================================
================================
#Q12. Find a string 'ich' from "/usr/share/dict/words" and put it into /root/lines file.
========================================================================
#Q13. create an archive '/root/backup.tar.bz2' of /usr/local directory and compress it with
bzip2.
========================================================================
Server-2:
`````````
NOTE: In this Server 3 Disks will be given.
- Resize the logical volume "mylv" so that after reboot the size should be in between 200MB
to 300MB.
========================================================================
#Q17. Add a swap partition of 512MB and mount it permanently.
========================================================================
#Q18. Create a logical Volume and mount it permanently.
● Create the logical volume with the name "wshare" by using 50PE's from the volume
group "wgroup".
● Consider each PE size of the volume group as "8 MB".
● Mount it on /mnt/wshare with file system vfat.
========================================================================
#Q19. Create a new STRATIS volume according to following requirements:
● Choose the recommended 'tuned' profile for your system and set it as the default.
========================================================================
#Q21.
#22
● Configure your host journal to store all journal across reboot
● Copy all *.journal from /var/log/journal and all subdirectories to
/home/Walhalla/container_logserver
● Configure automount /var/log/journal from logserver (container) to
/home/walhalla/container_logserver when container starts.
node1:user1 steps
----------------
# podman login regisrty.redhat.io
# username:
# password:
# podman search rsyslog
# podman pull registry.redhat.io/rhel8/rsyslog
# podman image list
# podman run -d --name logserver -v /home/user1/container-logserver:/var/log/journal:Z
registry.redhat.io/rhel8/rsyslog
# podman container list
# podman ps
# mkdir -p ~/.config/systemd/user
# cd .config/systemd/user/
# loginctl enable-linger
# loginctl show-user user1
# podman generate systemd --name logserver -f -n
# systemctl --user daemon-reload
'in this step, we went to host and one time we rebooted it'
# systemctl --user enable --now container-logserver.service
# systemctl --user start --now container-logserver.service
# systemctl --user status --now container-logserver.service
# podman exec -it logserver /bin/bash
# ls /var/log/
# exit
--------------------------------------------------------- E N D -----------------------------------------------------------