You want to install Apache 2 on CentOS 8 (or other RHEL forks like Rocky Linux or AlmaLinux OS)? Perfect 🙂
sudo dnf install httpd
sudo systemctl start httpdEnable Apache as a CentOS service to start automatically
sudo systemctl enable httpd.serviceLet’s enable Apache through the firewall
sudo firewall-cmd --permanent --add-service=http
sudo firewall-cmd --permanent --list-all
sudo firewall-cmd --reloadNow test it by typing your server’s IP in the browser.
That’s it 🙂
