Intro to Linux pt 4
LF Introduction to Linux Course part 4
So on to part of the course that looks at dealing with courses, using apache2 as an example. So the idea of the lab is to be able to use systemctl to control a process, for example start, stop, enable and check the status of a running process.
So for this, I am using a Raspberry Pi4, as I don't really want to be enabling stuff on my laptop or desktop.
Installed apache2 on the pi, then when trying to check the status or start it,
sudo systemctl status apache2
I received an message that from, asking on the Linux user group list, was caused by a process already running on port 80.
So from more research the Linuxvoc suggested using the 'ss' command to determine what was already running on port 80
sudo ss -tlnp sport = :80
So it seems the Pi was already running nginx, this is fine. So I carried on with the lab
The instructions were
Instructions
1. Check the initial status - begin by checking if the Apache service is currently active on your system.
2. Start the service - if the service was inactive, or to practice the execution command, bring the server online.
3. Verify the change - always confirm that your command had the intended effect. Check the status again to ensure the service is now reported as active.
4. Stop the service - to conserve system resources or perform maintenance, shut the server down.
5. Final Verification - perform one last status check to ensure the service has successfully shut down.
so it is probably a case of replacing apache2 with nginx as e.g
sudo systemctl status apache2
sudo systemctl status nginx
Hopefully this is sufficient for the lab requirements, just using a different web server. If It turns out I NEED apache2, I can probably remove nginx and install apache2.
I will raise the question on the LF course forum. In the mean time it is on with the rest of that section of the course.
If nothing else I am learning more than the course is teaching which is never a bad thing. Troubleshooting is important.