Renée Rodrigues

Sumário

Instalando e Configurando o Apache no CentOS

1. Atualizar pacotes:

sudo yum -y update

2. Instalar e iniciar o firewall (firewalld):

yum -y install firewalld
systemctl enable --now firewalld
systemctl status firewalld --no-pager -l

3. Liberar HTTP e HTTPS no firewall:

firewall-cmd --permanent --add-service=http
firewall-cmd --permanent --add-service=https
firewall-cmd --reload

4. Instalar o Apache e o módulo SSL:

sudo yum -y install httpd mod_ssl

5. Habilitar e iniciar o serviço do Apache:

sudo systemctl enable --now httpd
sudo systemctl status httpd --no-pager -l

6. Validar que está rodando:

ss -tulpn | grep -E ':80|:443'

7. Teste no navegador:

curl -I http://127.0.0.1

Observações rápidas:

sudo dnf -y update
sudo dnf -y install firewalld
sudo systemctl enable --now firewalld
sudo firewall-cmd --permanent --add-service=http
sudo firewall-cmd --permanent --add-service=https
sudo firewall-cmd --reload
sudo dnf -y install httpd mod_ssl
sudo systemctl enable --now httpd
sudo systemctl status httpd --no-pager -l
sudo ss -tulpn | grep :80

link de compartilhamento

Renée Maksoud - setembro de 2025