To Install LAMP On Fedora or RHL
Install the Apache package

sudo dnf install httpd
Apache service
start
sudo systemctl start httpd
Enable
if you want your httpd auto start on boot run below command.
sudo systemctl enable httpd
status
sudo systemctl status httpd
MariaDB is a popular open-source relational database management system (RDBMS) that is compatible with MySQL.
Install MariaDB
sudo dnf install -y mariadb-server
MariaDB service
start
sudo systemctl start mariadb
Enable
if you want your mariadb autostart on boot run below command.
sudo systemctl enable mariadb
status
sudo systemctl status mariadb
MySQL_secure_installation
sudo mysql_secure_installation
Open MariaDB configuration file
sudo mysql -u root -p
Install PHP & modules command
sudo dnf install php -y
dnf install -y php-cli php-fpm php-common php-mbstring php-curl php-gd php-mysqlnd php-json php-xml php-intl php-pecl-apcu php-opcache
Now open the Apache configuration file and update the PHP test file
vim /var/www/html/test.php
stop service
To stop a service like httpd or mariadb using systemctl, you can use the following command:
sudo systemctl stop httpd
Replace httpd with mariadb to stop it.
disable service
If you want to prevent the service from starting automatically at boot time, you can disable it using the following command:
sudo systemctl disable httpd
Replace httpd with mariadb for it.