30 lines
576 B
Markdown
30 lines
576 B
Markdown
# Installation apache
|
|
|
|
Installer le paquet _httpd_
|
|
```bash
|
|
dnf install httpd -y
|
|
```
|
|
|
|
Activer et lancer le service
|
|
```bash
|
|
systemctl enable --now httpd
|
|
```
|
|
Ouvrir le parefeu
|
|
```bash
|
|
firewalld-cmd --add-service http --permanent
|
|
firewalld-cmd --add-service https --permanent
|
|
firewall-cmd --reload
|
|
```
|
|
|
|
S'assurer du bon fonctionnement du service
|
|
```bash
|
|
systemctl status httpd
|
|
ss -taupen |grep ':80'
|
|
```
|
|
|
|
Créer une page html dans /var/www/html et l'interroger avec curl ou wget
|
|
```bash
|
|
echo '<h1>Hello world</h1>' >> /var/www/html/hello.html
|
|
curl http://localhost/hello.html
|
|
```
|