Install LAMP Stack ( Apache, MariaDB, php, phpMyAdmin) on Fedora 22/23/24

2a) Enabling public access to the web server

By default web server is only accessible as localhost. If you want to access publicly you need to allow http & https in firewall.

[Allow http in firewall]
$ sudo firewall-cmd --permanent --add-service=http
success

[Allow https in firewall]
$ sudo firewall-cmd --permanent --add-service=https
success

[Reload firewall]
$ sudo systemctl reload firewalld

3) Install MariaDB

MariaDB is a drop in replacement for MySQL. MariaDB is open-source relational database management system (RDBMS) which is supporting database access. It’s robust, scalable, and reliable SQL server for high availability databases as free of cost.

[Install MariaDB]
$ sudo dnf install mariadb-server

[Start the MariaDB service]
$ sudo systemctl start mariadb.service

[Enable MariaDB in boot]
$ sudo systemctl enable mariadb.service

3a) Set MySQL root password

By default there is no password for MySQL instant and you need to run the below command to set the root password for security reason. I advise you to secure MySQL installation using mysql_secure_installation method which will set root password and adjust other settings to make more secure.

[MariaDB Secure installation]
$ sudo mysql_secure_installation

NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
      SERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!

Enter current password for root (enter for none): Press Enter
OK, successfully used password, moving on...

Set root password? [Y/n] y
New password: 
Re-enter new password: 
Password updated successfully!
Reloading privilege tables..
 ... Success!

Remove anonymous users? [Y/n] y
 ... Success!

Disallow root login remotely? [Y/n] y
 ... Success!

Remove test database and access to it? [Y/n] y
 - Dropping test database...
 ... Success!
 - Removing privileges on test database...
 ... Success!

Reload privilege tables now? [Y/n] y
 ... Success!

Cleaning up...

All done!  If you've completed all of the above steps, your MariaDB
installation should now be secure.

Thanks for using MariaDB!

install-lamp-on-fedora-24-workstation-3

About Magesh Maruthamuthu

Love to play with all Linux distribution

View all posts by Magesh Maruthamuthu

4 Comments on “Install LAMP Stack ( Apache, MariaDB, php, phpMyAdmin) on Fedora 22/23/24”

  1. The firewall might need to be restarted after running the commands in step 2a – I know my setup required it.

    $sudo systemctl reload firewalld

  2. Very detailed, yet easy to follow and concise. Thanks for taking the time to put this together. It helped me to get LAMP up and running quickly so I can learn the languages of web development and how to set up WordPress and other CMS sites.

Leave a Reply

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