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 http://127.0.0.1/index.php
install-lamp-on-fedora-24-workstation-4

Magesh Maruthamuthu

Love to play with all Linux distribution

You may also like...