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

4) Install PHP

Use the below command to install PHP. PHP initially called Personal Home Page, now it is called as Hypertext Preprocessor. PHP is a open-source software which is designed for web development purpose. It is used for server-side scripting language as well as general-purpose programming language.

[Install php Module]
$ sudo dnf install php php-mysql php-pdo php-gd php-mbstring php-common php-mcrypt php-gettext php-curl php-cli

Create test php file to check whether php is working with apache or not.

[Creating php info file]
$ sudo nano /var/www/html/phpinfo.php
<?php phpinfo(); ?>

[Restart apache service]
$ sudo systemctl restart httpd.service

Open your web browser and navigate to http://localhost/index.php or http://your-server-ip-address/index.php or

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 *