Skip to content

Instantly share code, notes, and snippets.

@kyudorimj
Last active October 28, 2021 00:32
Show Gist options
  • Save kyudorimj/39339e0d05128fc4687aaf85b90af048 to your computer and use it in GitHub Desktop.
Save kyudorimj/39339e0d05128fc4687aaf85b90af048 to your computer and use it in GitHub Desktop.
10 Steps to Install LAMP and phpMyAdmin in Fedora Linux

How To Install LAMP [ Linux, Apache, MariaDB, PHP ] and phpMyAdmin in Fedora 34

A straight-forward guide in installing LAMP and phpMyAdmin in Linux Fedora 34.
This guide is dedicated for personal use only, but if others find it useful then it is more than better.

Prerequisites

  • You have access to the Terminal
  • You have access to the root from Terminal using the root password.
    If you haven't configure your root password yet, follow this link

Steps

Open the Fedora Linux Terminal

Enter the root priveleges using the command:

    su -

Then you will be prompted for a password, enter your root password to proceed.

Inside the root in Terminal follow this Steps.

1. Update the system.

    dnf update -y

Note: The -y stands for yes, which means it will automatically accept all the updates to be downloaded.

2. Install the Apache

    dnf install -y httpd

3. Start the apache service and enable it on boot

    systemctl start httpd
    systemctl enable httpd

4. Install MariaDB

    dnf install -y mariadb mariadb-server

5. Start the mariadb server and enable it on boot.

    systemctl start mariadb
    systemctl enable mariadb

6. Setup your MariaDB.

    mysql_secure_installation

Note: Press enter then y, y, y for every [Y/n] questions. You will be ask for password to setup your MariaDB.

7. Install PHP.

    dnf install -y php php-common php-pdo_mysql php-pdo php-gd php-mbstring

8. Restart Apache service.

    systemctl restart httpd

9. Install phpMyAdmin

    dnf install phpMyAdmin

10. Add firewall restriction for port 80 to be open.

    firewall-cmd --add-port=80/tcp --permanent
    firewall-cmd --add-port=443/tcp --permanent
    firewall-cmd --reload

Congratulations! You have successfully installed LAMP in Fedora 34!

If everything goes right, you can now open your browser and navigate to http://localhost/phpmyadmin.
Enter your username and password that you set in the MariaDB installation to login.

References

How to Install LAMP | YOUTUBE https://www.youtube.com/watch?v=-9smf5Mm2Sw
Install phpMyAdmin | OSRADAR BBlogpost https://www.osradar.com/install-phpmyadmin-fedora-33/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment