(Reading time: 2 - 4 minutes)


A LAMP stack is a group of programs used to get web servers up and running. The acronym stands for Linux, Apache, MySql, PHP.
Because Fedora is yet a Linux distribution "the L part" of the name is taken care of.




Before start installing LAMP programs you should update your repositories with dnf update, dnf replaced yum installer from Fedora 22

sudo dnf update


 Step one - Install Apache

Apache is a free and open source software which runs great part of web server in the world (around 50%).

For install Apache open a terminal and type

sudo dnf install httpd

 Once it installs you can run your VPS (Virtual Private Server) :

sudo systemctl start httpd.service

 To test your installation you can open your browser and open your localhost or the IP
You should see the default home page:



 Step two - Install MySql

MySQL/MariaDB is a powerful database management system used for organizing and retrieving data on a virtual server

To install MySQL, open terminal and type in these commands:

sudo dnf install mysql mysql-server
sudo systemctl start mariadb.service


Once it is done installing, you can set a root MySQL password:

sudo /usr/bin/mysql_secure_installation

The prompt will ask you for your current root password.

Since you just installed MySQL, you most likely won’t have one, so leave it blank by pressing enter.

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

Then the prompt will ask you if you want to set a root password. Go ahead and choose Y and follow the instructions.

Fedora automates the process of setting up MySQL, asking you a series of yes or no questions.

It’s easiest just to say Yes to all the options. At the end, MySQL will reload and implement the new changes.

By default, a MariaDB installation has an anonymous user, allowing anyone
to log into MariaDB without having to have a user account created for
them.  This is intended only for testing, and to make the installation
go a bit smoother.  You should remove them before moving into a
production environment.
Remove anonymous users? [Y/n] Y
 ... Success!
Normally, root should only be allowed to connect from 'localhost'.  This
ensures that someone cannot guess at the root password from the network.
Disallow root login remotely? [Y/n] Y
 ... Success!
By default, MariaDB comes with a database named 'test' that anyone can
access.  This is also intended only for testing, and should be removed
before moving into a production environment.
Remove test database and access to it? [Y/n] Y
 - Dropping test database...
 ... Success!
 - Removing privileges on test database...
 ... Success!
Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.
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!

Step Three—Install PHP

PHP is an open source scripting  language for web pages that is much used.
To install PHP you should open terminal and type:

sudo dnf install php php-mysql

Step Four—RESULTS: See PHP on your Server

To set this up, first install the nano text editor and create a new file:

sudo dnf install nano
sudo nano /var/www/html/info.php

 Add in the following line:


 then save and exit.

Restart apache so that all of the changes take effect on your virtual server:

sudo systemctl restart httpd.service

 Finish up by visiting your php info page

It should look similar to this:


Joomla SEF URLs by Artio