I need to setup a working LAMP environment on my Fedora 28 workstation. I created out this tutorial as my personal references and it might be useful for you.
First thing, you need to update your repository at first :
$ sudo dnf update --refresh
Then, lets begin to install Apache web server and MariaDB database server:
$ sudo dnf install httpd
$ sudo dnf install mariadb-server
Now install PHP engine and some dependency
$ sudo dnf install php php-mbstring php-pear php-mysqlnd php-common php-pdo php-xml
Do you need PhpMyAdmin? I always need that:
$ sudo dnf install phpmyadmin
Start Apache and MySQL services via systemctl:
$ sudo systemctl start httpd.service
$ sudo systemctl start mariadb.service