CompTIA
XK0-005 · Question #1864
A web application that uses a database for managing logins needs to be set up so that the database is running before the web server starts. A Linux administrator, who is troubleshooting the issue…
The correct answer is C. Add Before=httpd. service to die MariaDB configuration. This ensures that systemd starts the MariaDB service before the HTTPD service, enforcing the correct order based on dependency rather than relying solely on After= directives in the web server unit file.
System Management
Question
A web application that uses a database for managing logins needs to be set up so that the database is running before the web server starts. A Linux administrator, who is troubleshooting the issue, runs a few commands and receives the following output: Which of the following should the Linux administrator do to ensure the database starts first?
Exhibit
Options
- AEnable the HTTPD service using the httpd command.
- BAdd mariadb. service to the Wants for the HTTPD service configuration
- CAdd Before=httpd. service to die MariaDB configuration.
- DAdd mariadb. service to the HTTPD service configuration.
How the community answered
(54 responses)- A15% (8)
- B4% (2)
- C74% (40)
- D7% (4)
Explanation
This ensures that systemd starts the MariaDB service before the HTTPD service, enforcing the correct order based on dependency rather than relying solely on After= directives in the web server unit file.
Topics
#systemd#Service Dependencies#Service Management#Troubleshooting
Community Discussion
No community discussion yet for this question.
