How to install LAMP Server on Fedora 27

Hello everyone, welcome to Fedora Tutorial. Today we are going to learn how to install LAMP Server on Fedora 27 Server edition. LAMP (Linux Apache MySQL and PHP) is a powerful software combination that will turn your Fedora 27 into a powerful web server. You can then build or run many web applications on top of Fedora 27. If you are running Fedora 26, you can read our post How to install LAMP Server on Fedora 26. It’s pretty similar to that tutorial. You may browse some other tutorial of Fedora 27.

Before we install LAMP Server on Fedora 27, please make sure you have the following items 

  • root access to the server
  • Active internet connection
  • Basic understanding of the Linux command line

Steps to Install LAMP Server on Fedora 27

Step 1. Install Fedora 27 Server

I assume you have a running Fedora 27 Server edition, or Workstation edition prior to the LAMP installation. Please read the Fedora 27 Server Installation Guide first. 

Step 2. Install Apache Web Server

Log in to Fedora 27 Server via SSH and then paste this command to install Apache. Please note that all of the commands are executed by root user, or normal user with sudo privileges.

Output:

Now start and enable Apache 

Modify Firewall to Allow http and https access to the server

Now reload firewall configuration

Open a web browser and type the Server IP address to test the web server. Make sure you get the following output

install LAMP Server on Fedora 27

At this point, our Apache web server is up and running. Move to the next step.

Step 3. Install and Configure MariaDB

To install MariaDB Server on Fedora 27, use the following command

Start and Enable MariaDB Service

Secure MariaDB Installation

Now we need to secure the MariaDB installation. Use the following command instead

You will be asked to change the current root password (none by default). 

Output example:

Configure firewall to allow MariaDB connection

Done. At this point, MariaDB Server is up and running. 

Step 4. Install PHP

Now, we need to install PHP and some additional modules on Fedora 27. Use the following command 

Output:

That’s it. Now we have PHP installed. 

Conclusion

Installing LAMP Server on Fedora 27 is pretty easy. In few minutes, we can have a powerful web server running on our Fedora 27 Server. 

Thanks for reading this How to install LAMP Server on Fedora 27. Please consider share this post if you think its useful. Cheers

1 Comment

  1. Very nice tutorial, well explained with example results. The apache web server loads exactly as planned, but when I tried loading a test.php file with the basic

Leave a Reply

Your email address will not be published.


*