Como instalar o Apache, MySQL e PHP no Oracle Linux 8

Instalando o Apache

 

sudo dnf -y install httpd

 

Agora inicie e habilite o serviço para iniciar com o sistema:

sudo systemctl start httpd
sudo systemctl enable httpd

 

Libere a porta no firewall:

sudo firewall-cmd –permanent –zone=public –add-service=http
sudo firewall-cmd –reload

 

Instalando o PHP

 

sudo dnf install -y php

 

Reinicie o Apache:

sudo systemctl restart httpd

 

 

Instalando  MySQL

 

sudo dnf -y install @mysql

 

Inicie o serviço:

sudo systemctl start mysqld
sudo systemctl enable mysqld

 

Execute a instalação segura:

sudo mysql_secure_installation

 

Respostas:

Press y|Y for Yes, any other key for No: y
Please enter 0 = LOW, 1 = MEDIUM and 2 = STRONG: 2
New password:
Re-enter new password:
Do you wish to continue with the password provided?(Press y|Y for Yes, any other key for No) : y
Remove anonymous users? (Press y|Y for Yes, any other key for No) : y
Disallow root login remotely? (Press y|Y for Yes, any other key for No) : y
Remove test database and access to it? (Press y|Y for Yes, any other key for No) : y
Reload privilege tables now? (Press y|Y for Yes, any other key for No) : y