Web Server , Database & Scripting Language are the building blocks of web based software like WordPress, Drupal, Joomla and OpenCart. In Fedora linux Apache is the Web Server, Mariadb is the database server & php is the Scripting Language.

In this tutorial we install Apache, Mariadb & php on Fedora 23 workstation ( Desktop).

Install Apache ( Web Server )

dnf command is the advanced version of yum and is a Package Manager for RPM based Linux Distribution. So in Fedora 23 we will installing all the packages using dnf command.

[[email protected] ~]# dnf install httpd


Use below command to check Apache rpm Version

[[email protected] ~]# rpm -q httpd
[[email protected] ~]#

Start the Apache Service

[[email protected] ~]# systemctl start httpd
[[email protected] ~]# systemctl enable httpd
Created symlink from /etc/systemd/system/multi-user.target.wants/httpd.service to /usr/lib/systemd/system/httpd.service.
[[email protected] ~]#

Open default 80 port for Apache in case firewall is enable.

[[email protected] ~]# firewall-cmd --permanent --add-service=http
[[email protected] ~]# firewall-cmd --reload
[[email protected] ~]#

Verify the Installation of Apache :

Use “ip add show” command to verify the ip address of your machine.


Open the browser type IP Address or hostname of your machine.


Install MariaDB ( Database Server )

[[email protected] ~]# dnf install mariadb-server


Start the mariadb service and enable it across the reboot.

[[email protected] ~]# systemctl start mariadb
[[email protected] ~]# systemctl enable mariadb
Created symlink from /etc/systemd/system/multi-user.target.wants/mariadb.service to /usr/lib/systemd/system/mariadb.service.
[[email protected] ~]#

Configure Initial settings of database server and root password using “mysql_secure_installation

[[email protected] ~]# mysql_secure_installation



Install php ( Scripting Language )

Use below dnf command to install php and other important php modules.

[[email protected] ~]# dnf install php php-mysql php-pdo php-gd php-mbstring


To test the php installation , create a php file (fedora23.php) in /var/www/html

[[email protected] ~]# vi /var/www/html/fedora23.php

Restart the Apache Service

[[email protected] ~]# systemctl restart httpd
[[email protected] ~]#

Now Access the Fedora23.php file in your browser :



As we can see php info page , it means php is installed successfully.