Install Apache, PHP, MySQL on CentOS8

CentOS 8 is here. And it brings a few changes from the Fedora/RHEL world. Like the new default package manager ‘dnf’. Although it is quite familiar for Fedora users, ‘dnf’ comes to kind of replace the well known ‘yum’ in the CentOS8 world.

This tutorial is the trivial Apache, MySQL, PHP or a.k.a. LAMP stack installation, on CentOS8, using ‘dnf’.

Installation is simple and straight forward. Just do:

dnf install httpd php mysql-server

This will install the three required packages, but you still need to start them:

systemctl start httpd mysqld

At this point you a fully running Apache2 web server and a MySQL server. Don’t forget to Allow the HTTP and HTTPS ports in the firewalld.

Leave a Reply

Your email address will not be published. Required fields are marked *