Happy Wednesday, everyone!
Time for another hands-on challenge. This is a scenario you will face constantly as a sysadmin and is a core part of the RHCSA exam: "Locate and interpret system log files and journals."
Your job isn't just to run commands; it's to find answers. Let's get to it!
You've just configured the Apache web server, but when you try to start it, you get an error. The command systemctl start httpd.service fails.
Running systemctl status httpd.service just tells you it "Failed" but doesn't show the real reason (like a typo in a config file). The system journal is full of thousands of messages from other services. You need to find the exact error message that caused the failure.
Post the commands you would use to find the needle in the haystack!
journalctl command you would run to see only the logs for the httpd.service unit?Let's see those `journalctl` commands!
1) journalctl -u httpd.service
2) journalctl -u httpd.service --since "10 minutes ago"
3) journalctl -u httpd.service -r -n 25
To follow the logs in real-time for httpd.service while we try to start it again:
journalctl -u httpd.service -f
Thanks
Red Hat
Learning Community
A collaborative learning environment, enabling open source skill development.