Question: This is on Linux. I'm stuck on the commands needed for the steps. Can I get some help? Step 6 : You can see an
This is on Linux. I'm stuck on the commands needed for the steps. Can I get some help?
Step 6: You can see an active list of running processes on our machine by using the top command. Issue the top command with no arguments to see a live-updating list of active processes on our system, with current CPU and RAM usage. top has plenty of options to filter down the processes that we can see. While viewing top, type h to view a help page of shortcuts and keyboard commands. Figure out a way to filter to see the http processes that are running. Include a screenshot.
Step 7: Use the systemd utility systemctl to identify the webserver service. Issue the systemctl command with no arguments to show a full list of services, devices, etc available for control with systemctl. Use grep to filter this list for the service associated with the web server. Use the process information you received in the last step from top to decide what to filter for. Include a screenshot of the command you used and the service name.
httpd.service
Step 8: Figure out how to use systemctl to stop the service you found. When you have stopped the service, figure out how to show the status of that same service. Include a screenshot proving that it is stopped.
Step 9: Use the curl command again and see if your webpage is still up. It should no longer be available. Include a screenshot showing the error you get when you try to curl it.
Step 10: Simply stopping a service will allow it to be started back up easily in the future. Also, if the service is enabled to be started on boot, then a reboot would restart this service. However, if we wanted to ensure that a service was unable to start we could use the mask functionality in systemctl. Use this functionality to mask httpd.service. Then try to start the service Include a screenshot of the error you receive.
Question 4.6: What does masking a service actually do? Why does it prevent a service from starting?
Step 11: Figure out the necessary commands to unmask this service using systemctl, set it to start on boot, and start the service back up. Include a screenshot of the output of systemctl status httpd.service when you have done so.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
