Install PHP from prebuilt packages on Fedora with Lighttpd and MySQL

PHP on Fedora

For Fedora Linux use the Remi's RPM repository:

dnf install http://rpms.remirepo.net/fedora/remi-release-26.rpm
dnf config-manager --set-enabled remi-php72
dnf update
dnf install php

Install Lighttpd

sudo dnf install lighttpd

Install MySQL

Development on localhost using built-in web server

If you're developing PHP applications on your local workstation, PHP also has a useful built-in web server for localhost development. It is not intended to be used for production environments.

Inside your project folder you can run it from the command line using PHP CLI SAPI:

php -S localhost:8000

Visit http://localhost:8000/ in your browser to access it.