Lab 3.1. Apache Web Server Status
Hello, everyone! This is yc, I am new here and am using Linux Mint.
I understand that Lab 3.1 will let me practise using systemctl to monitor and control the state of the Apache Web Server (apache2 or httpd, depending on my distribution). I do not know what to do with the following results from my Terminal:
yc@W530:~$ sudo systemctl status httpd
[sudo] password for yc:
Unit httpd.service could not be found.
yc@W530:~$ sudo systemctl status apache2
Unit apache2.service could not be found.
yc@W530:~$
Would anyone guide me how to take it further from here please?
Answers
-
Hi,
It looks like this post is in the incorrect forum. Can you please advise what course is this about?
Thank you,
Flavia0 -
Since Linux Mint is a Debian-based distribution, it uses apache2. However, based on your output, it looks like the Apache Web Server isn't installed on the system yet. You will need to first install it and them attempt the lab again.
0 -
Dear Flavia
Thank you for responding to me. My replies:
- "Can you please advise what course is this about?" - it is from the "Introduction to Linux (LSF101)", see the attached screenshot.
- How to install the apache2? Could you guide me please.
0 -
Dear @Yin Chen LEE
Apache just isn't installed yet on the system. Please follow below commands to install and practice the commands further.
- sudo apt update
- sudo apt install apache2
- systemctl status apache2
- curl -I localhost
- sudo systemctl stop apache2
- sudo systemctl start apache2
- sudo systemctl restart apache2
- sudo systemctl reload apache2 # re-read config, no dropped connections
- sudo systemctl disable apache2 # don't start at boot
- sudo systemctl enable apache2 # start at boot
- systemctl is-active apache2
- systemctl is-enabled apache2
0 -
I have a Raspberry pi 4, set up with ssh so I can remote login and experiment with the command line etc, I tried to complete this lab and also found apache2 was not installed so after installing it, I was still having issues.
I posted the output from
sudo systemctl status apache2
To my local linux user group, and was told from the output that something else was also running on port 80, so I did some research and the 'ss' command
sudo ss -tlnp sport = :80
will tell you what else is running on port 80 (or the specified port), it seems on the pi, nginx is already installed and running. So have completed the lab using that.
This may be useful to other people studying the course, I am not too sure if it is essential to use apache2 for this course, both are web servers, However finding out if anything else is running on a port will probably be useful anyway.
Hope this helps
Paul
0
Categories
- All Categories
- 179 LFX Mentorship
- 179 LFX Mentorship: Linux Kernel
- 778 Linux Foundation IT Professional Programs
- 384 Cloud Engineer IT Professional Program
- 175 Advanced Cloud Engineer IT Professional Program
- 76 DevOps IT Professional Program - Discontinued
- 8 DevOps & GitOps IT Professional Program
- 104 Cloud Native Developer IT Professional Program
- 7.7K Training Courses & Learning Paths
- 21 AI & ML Training
- 2 Blockchain & Decentralized Identity Training
- 54 Cloud & Containers Training
- 7 Cybersecurity Training
- 5 DevOps & Site-Reliability Training
- 3 Linux Kernel Development Training
- 3 Networking Training
- 2 Open Source Best Practice Training
- 12 System Administration Training
- 1 System Engineering Training
- 6 Web & Application Development Training
- 799 Hardware
- 202 Drivers
- 68 I/O Devices
- 37 Monitors
- 97 Multimedia
- 173 Networking
- 91 Printers & Scanners
- 92 Storage
- 776 Linux Distributions
- 83 Debian
- 68 Fedora
- 25 Linux Mint
- 13 Mageia
- 24 openSUSE
- 151 Red Hat Enterprise
- 32 Slackware
- 13 SUSE Enterprise
- 356 Ubuntu
- 474 Linux System Administration
- 31 Cloud Computing
- 73 Command Line/Scripting
- Github systems admin projects
- 104 Linux Security
- 79 Network Management
- 102 System Management
- 47 Web Management
- 194 Mobile Computing
- 32 Android
- 146 Development
- 1.2K New to Linux
- 1K Getting Started with Linux
- 409 Off Topic
- 129 Introductions
- 36 Study Material
- 1.1K Programming and Development
- 312 Kernel Development
- 740 Software Development
- 1K Software
- 421 Applications
- 183 Command Line
- 5 Compiling/Installing
- 71 Games
- 320 Installation
- Archived
- 183 Small Talk
- 2 LFD140 Class Forum
- 1.4K LFS258 Class Forum
Upcoming Training
-
August 20, 2018
Kubernetes Administration (LFS458)
-
August 20, 2018
Linux System Administration (LFS301)
-
August 27, 2018
Open Source Virtualization (LFS462)
-
August 27, 2018
Linux Kernel Debugging and Security (LFD440)

