This tutorial will guide you on how to install LAMP stack on Fedora 30. Just as you already know, LAMP stack is an acronym of four open-source components; Linux the operating system, Apache the web server, MySQL/MariaDB the relational database management system and PHP the object-oriented scripting language.
Install LAMP Stack on Fedora 30
To get LAMP stack on Fedora 30 up and running, you need to install all the four components.
Installing Linux OS (Fedora 30 server)
The first component is the Linux operating system which in this case is the Fedora 30 server. Hence, this guide assumes that you already installed your Fedora 30 server.
Installing Apache HTTP server on Fedora 30
Once you have your Fedora 30 server up and running, proceed to install Apache HTTP server. We have already covered the installation of Apache Web server on Fedora 30 in our previous guide.
Once you have Apache HTTP server running, proceed with the installation of the next component of LAMP stack, MySQL or MariaDB.
Want to use Nginx instead? See the link below on installation of Nginx.
Install MariaDB on Fedora 30
The next step is to install MySQL or MariaDB the relational database management system. Hence see our guide on how to install MariaDB 10.3 on Fedora 30 by following the link below;
You can as well use MySQL 8 instead.
Install PHP on Fedora 30
PHP the web scripting language is the last component of the LAMP stack. We have covered the installation of PHP 7.3.4 on Fedora 30. See the link below;
Well, you also need to install other PHP modules such as php-mysqlnd.
dnf install php-mysqlnd
If you need other PHP modules, you can always search them and install them;
dnf search php-
Install PHP extension;
dnf install php-<extension-name>
This can be done by creating a simple PHP test page on the default Apache web root directory with the content shown below;
<?php phpinfo(); ?>
Restart Apache web server.
systemctl restart httpd
Next, navigate to the browser and access PHP test page via http://<server-ip>/info.php.
Great. You have successfully Setup LAMP stack on Fedora 30.