Welcome to the Linux Foundation Forum!

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

  • Flavia
    Flavia Posts: 2,647

    Hi,

    It looks like this post is in the incorrect forum. Can you please advise what course is this about?

    Thank you,
    Flavia

  • Flavia
    Flavia Posts: 2,647

    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.

  • Dear Flavia

    Thank you for responding to me. My replies:

    1. "Can you please advise what course is this about?" - it is from the "Introduction to Linux (LSF101)", see the attached screenshot.
    2. How to install the apache2? Could you guide me please.
  • fazlur.khan
    fazlur.khan Posts: 76
    edited July 27

    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

Categories

Upcoming Training