exam questions

Exam XK0-005 All Questions

View all questions & answers for the XK0-005 exam

Exam XK0-005 topic 1 question 34 discussion

Actual exam question from CompTIA's XK0-005
Question #: 34
Topic #: 1
[All XK0-005 Questions]

A Linux administrator has installed a web server, a database server, and a web application on a server. The web application should be active in order to render the web pages. After the administrator restarts the server, the website displays the following message in the browser: Error establishing a database connection. The Linux administrator reviews the following relevant output from the systemd init files:

The administrator needs to ensure that the database is available before the web application is started. Which of the following should the administrator add to the HTTP server .service file to accomplish this task?

  • A. TRIGGERS=mariadb.service
  • B. ONFAILURE=mariadb.service
  • C. WANTEDBY=mariadb.service
  • D. REQUIRES=mariadb.service
Show Suggested Answer Hide Answer
Suggested Answer: D 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
Alizadeh
Highly Voted 11 months, 2 weeks ago
Selected Answer: D
The correct answer is D. REQUIRES=mariadb.service. The REQUIRES directive in systemd tells systemd that the HTTP server service depends on the mariadb.service service. This means that systemd will not start the HTTP server service until the mariadb.service service is started and running.
upvoted 5 times
...
Damon54
Most Recent 1 year ago
any commnets ? please
upvoted 1 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...