The install command depends on your Linux distro. For common cases:

  • RHEL / CentOS / Fedora: sudo dnf install httpd
  • Older CentOS / RHEL: sudo yum install httpd
  • Ubuntu / Debian: sudo apt update && sudo apt install apache2

If you want, I can also give you the start , enable , and firewall commands for httpd after installation.