Installing on Fedora/CentOS/Red Hat Enterprise Linux
sudo yum install httpd sudo systemctl enable httpd sudo systemctl start httpd
Newer releases of these distros use dnf
rather than yum
. See the Fedora project's documentation for platform-specific notes.
Installing on Ubuntu/Debian
sudo apt install apache2 sudo service apache2 start