nethserver_201_cahier_04_dokuwiki
Différences
Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
nethserver_201_cahier_04_dokuwiki [2019-08-16 14:21] – michelandre | nethserver_201_cahier_04_dokuwiki [2025-01-12 19:30] (Version actuelle) – modification externe 127.0.0.1 | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
+ | \\ | ||
+ | [[cours_nethserver_101|{{ Images_Cahier-201-04-000.png? | ||
+ | \\ | ||
+ | ====== Description générale ====== | ||
+ | Ce document décrit l' | ||
+ | |||
+ | Ce cahier utilise le Serveur NethServer du [[nethserver_101_cahier_03_creation_un_serveur_virtuel|Cahier-03]]: | ||
+ | |||
+ | ===== But de ce cahier ===== | ||
+ | |||
+ | {{ Images_Cahier-201-04-003.png? | ||
+ | \\ | ||
+ | |||
+ | ===== DokuWiki ===== | ||
+ | |||
+ | // | ||
+ | |||
+ | **DokuWiki** est un moteur de wiki libre sous licence GNU GPL conforme aux standards, simple à utiliser, dont le but principal est de créer des documentations de toute sorte. Ce logiciel est développé en **PHP** par **Andreas Gohr**. Il est destiné aux équipes de développement, | ||
+ | |||
+ | DokuWiki a été créé par Andreas Gohr en juin 2004. La première version officielle est sortie en juillet sur // | ||
+ | |||
+ | //Manuel DokuWiki:// [[https:// | ||
+ | |||
+ | ===== Cours NethServer-101 ===== | ||
+ | |||
+ | Le //Cours NethServer-101//, | ||
+ | |||
+ | - [[nethserver_101_cahier_01_linux|Cahier-01]]: | ||
+ | - [[nethserver_101_cahier_02_installations_configurations_logiciels_prerequis|Cahier-02]]: | ||
+ | - [[nethserver_101_cahier_03_creation_un_serveur_virtuel|Cahier-03]]: | ||
+ | - [[nethserver_101_cahier_04_local_certificat_let_encrypt|Cahier-04]]: | ||
+ | - [[nethserver_101_cahier_05_vdsl_fqdn_internet_et_nethserver|Cahier-05]]: | ||
+ | // | ||
+ | - [[nethserver_101_cahier_06_nethserver_wordPress|Cahier-06]]: | ||
+ | - [[nethserver_101_cahier_07_nethserver_wordPress_wordfence|Cahier-07]]: | ||
+ | - [[nethserver_101_cahier_08_woocommerce_paypal_stripe|Cahier-08]]: | ||
+ | - [[nethserver_101_cahier_09_duplicator_migration|Cahier-09]]: | ||
+ | - [[nethserver_101_cahier_10_mandataire_inverse|Cahier-10]]: | ||
+ | - [[nethserver_101_cahier_11_nethserver_backuppc|Cahier-11]]: | ||
+ | |||
+ | ==== Cours NethServer-201 ==== | ||
+ | |||
+ | Le //Cours NethServer-201// | ||
+ | |||
+ | - [[nethserver_201_cahier_01_nethserver_et_dolibarr|Cahier-201-01]]: | ||
+ | - [[nethserver_201_cahier_02_odoo_12|Cahier-201-02]]: | ||
+ | - [[nethserver_201_cahier_03_mediawiki|Cahier-201-03]]: | ||
+ | - [[nethserver_201_cahier_04_dokuwiki|Cahier-201-04]]: | ||
+ | - [[nethserver_201_cahier_05_moodle|Cahier-201-05]]: | ||
+ | - [[nethserver_201_cahier_06_proxmox|Cahier-201-06]]: | ||
+ | - [[nethserver_201_cahier_07_flectra|Cahier-201-07]]: | ||
+ | |||
+ | ==== Logiciels ==== | ||
+ | |||
+ | Tous les logiciels nécessaires sont du domaine public ou LIBRE sous licence //GPL//; ils ne coûtent pas un sou. Le seul achat nécessaire est l' | ||
+ | |||
+ | ==== But final ==== | ||
+ | |||
+ | Après avoir suivi le //Cours NethServer-101//, | ||
+ | |||
+ | {{ NS-101_001_Diagramme.png? | ||
+ | |||
+ | ===== Particularités de ce document ===== | ||
+ | |||
+ | ==== Notes au lecteur ==== | ||
+ | |||
+ | < | ||
+ | < | ||
+ | < | ||
+ | |||
+ | ==== Conventions ==== | ||
+ | |||
+ | {{Images_icone-201-001_doigt.png? | ||
+ | {{Images_icone-201-002_Lumiere.png? | ||
+ | {{Images_icone-201-003_Note.png? | ||
+ | {{Images_icone-201-004_Triangle.png? | ||
+ | {{Images_icone-201-005_Non-termine.png? | ||
+ | {{Images_icone-201-006_Securite.png? | ||
+ | |||
+ | Toutes les commandes à la console ou à travers //PuTTY// sont précédées d'une invite qui est toujours présente. | ||
+ | |||
+ | < | ||
+ | [root@dorgee ~]# ping 10.10.10.75 -c1 | ||
+ | |||
+ | PING 10.10.10.75 (10.10.10.75) 56(84) bytes of data. | ||
+ | 64 bytes from 10.10.10.75: | ||
+ | |||
+ | --- 10.10.10.75 ping statistics --- | ||
+ | 1 packets transmitted, | ||
+ | rtt min/ | ||
+ | [root@dorgee ~]# | ||
+ | </ | ||
+ | |||
+ | <WRAP box round> | ||
+ | < | ||
+ | Commande à exécuter si ce n'est déjà fait. | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | <WRAP box> | ||
+ | < | ||
+ | Commande indiquée à titre d' | ||
+ | </ | ||
+ | </ | ||
+ | \\ | ||
+ | |||
+ | ====== À savoir ====== | ||
+ | |||
+ | ===== Diagramme réseau ===== | ||
+ | |||
+ | {{ Images_Cahier-201-04-004.png? | ||
+ | \\ | ||
+ | |||
+ | ===== Serveur NethServer-7.6.1810 ===== | ||
+ | |||
+ | Le Serveur NethServer-7.6.1810 est un dérivé de la distribution Linux CentOS et est équivalent à CentOS-7.6.1810. | ||
+ | |||
+ | ==== dorgee.micronator-101.org ==== | ||
+ | |||
+ | Serveur et passerelle pour la documentation. | ||
+ | |||
+ | ==== tchana.micronator-dev.org ==== | ||
+ | |||
+ | Serveur virtuel LOCAL sous VirtualBox Version 6.0.4 r128413 // | ||
+ | |||
+ | ==== Répertoire d' | ||
+ | |||
+ | Nous installerons DokuWiki dans le répertoire ''/ | ||
+ | |||
+ | ===== Poste de travail ===== | ||
+ | |||
+ | Windows-8.1, | ||
+ | |||
+ | ===== Éditeur de texte ===== | ||
+ | |||
+ | Ne modifiez pas les fichiers avec des éditeurs de documents tels Notepad, TextEdit ou autres qui ajoutent une marque d' | ||
+ | |||
+ | ==== Notepad++ ==== | ||
+ | |||
+ | Voir le [[nethserver_101_cahier_02_installations_configurations_logiciels_prerequis|Cahier-02]]: | ||
+ | |||
+ | ==== Description ==== | ||
+ | |||
+ | // | ||
+ | Notepad++ est un éditeur de code source qui prend en charge plusieurs langages. Ce logiciel, codé en C++ avec STL et win32 api, a pour vocation de fournir un éditeur de code source de taille réduite mais très performant. En optimisant de nombreuses fonctions, tout en conservant une facilité d’utilisation et une certaine convivialité, | ||
+ | |||
+ | //Site de téléchargement:// | ||
+ | |||
+ | ==== Documentation ==== | ||
+ | |||
+ | Guide pratique //(1er août 2013)//: [[http:// | ||
+ | Aide-mémoire des principales commande: [[https:// | ||
+ | |||
+ | ===== Connexion sécuritaire ===== | ||
+ | |||
+ | Ce document décrit aussi la marche à suivre pour une connexion sécuritaire //(https)// vers DokuWiki. | ||
+ | |||
+ | HTTPS //(Hyper Text Transfer Protocol Secure)// apparaît dans l'URL lorsqu' | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | ====== Préparation de l' | ||
+ | |||
+ | ===== Configuration du poste de travail ===== | ||
+ | |||
+ | Voir la section __À savoir__ du | ||
+ | [[nethserver_101_cahier_03_creation_un_serveur_virtuel# | ||
+ | : //Création d'un Serveur NethServer virtuel// du "Cours NethServer-101" | ||
+ | |||
+ | <WRAP column 60%> | ||
+ | ==== Vérification ==== | ||
+ | |||
+ | **Centre Réseau et partage -> Modifier les paramètres de la carte ->** clac //(clic droit)// sur la carte Éthernet **-> Statut -> Détails**. | ||
+ | |||
+ | ● Nos deux adresses IP et nos deux passerelles son présentes. | ||
+ | |||
+ | ● **Fermer** toutes les fenêtre. | ||
+ | </ | ||
+ | <WRAP column 30%> | ||
+ | |{{ Images_Cahier-201-02-007.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | <WRAP column 45%> | ||
+ | '' | ||
+ | |||
+ | Les CNAME de notre Serveur NethServer virtuel LOCAL sont présents. | ||
+ | </ | ||
+ | <WRAP column 45%> | ||
+ | |{{ Images_Cahier-201-02-008.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | ===== Installation d'un Serveur NethServer ===== | ||
+ | |||
+ | Voir le [[nethserver_101_cahier_03_creation_un_serveur_virtuel|Cahier-03]]: | ||
+ | |||
+ | Pour un serveur virtuel de test, prendre un minimum de //8 Go// dynamiquement alloué __pour le disque principal__. | ||
+ | |||
+ | ==== Mise à jour du Serveur ==== | ||
+ | |||
+ | Avant de commencer quoi que ce soit, il est toujours préférable de mettre à jour le Serveur NethServer. | ||
+ | |||
+ | ==== Fail2ban & ClamAV ==== | ||
+ | |||
+ | Il est fortement recommandé d' | ||
+ | |||
+ | ===== interface Web NethServer ===== | ||
+ | |||
+ | {{Images_icone-201-004_Triangle.png? | ||
+ | Depuis le poste de travail, sur le réseau LOCAL // | ||
+ | |||
+ | === Login === | ||
+ | |||
+ | Lorsque vous parvenez à l'URL, vous serez invité à entrer votre nom d’utilisateur //(qui est obligatoirement root et son mot de passe)//. Entrez ce justificatif et cliquez sur **Login** afin d’être amené à l' | ||
+ | |||
+ | {{Images_icone-201-004_Triangle.png? | ||
+ | |||
+ | <WRAP column 20%> | ||
+ | |{{ Images_Cahier-201-02-009.png? | ||
+ | </ | ||
+ | <WRAP column 70%> | ||
+ | |{{ Images_Cahier-201-02-010.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | Si vous avez de la difficulté à vous connecter, vidanger le cache DNS du poste de travail et celui du navigateur Firefox. | ||
+ | |||
+ | <WRAP column 55%> | ||
+ | < | ||
+ | < | ||
+ | |{{ Images_Cahier-201-02-011.png? | ||
+ | </ | ||
+ | <WRAP column 37%> | ||
+ | **Historique -> Supprimer l' | ||
+ | |{{ Images_Cahier-201-02-012.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | {{ Images_Cahier-201-02-013.png? | ||
+ | ==== Fournisseur des comptes ==== | ||
+ | |||
+ | **Configuration -> Fournisseur des comptes**. | ||
+ | |||
+ | LDAP local est notre fournisseur de comptes. | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | {{ Images_Cahier-201-04-100.png? | ||
+ | ==== FQDN du serveur ==== | ||
+ | |||
+ | **Configuration -> DNS ->** onglet **Hôtes**. | ||
+ | |||
+ | Le FQDN du serveur: // | ||
+ | // | ||
+ | \\ | ||
+ | |||
+ | {{ Images_Cahier-201-02-015.png? | ||
+ | ==== Nom du serveur ==== | ||
+ | |||
+ | **Configuration -> Nom du serveur**. | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | {{ Images_Cahier-201-02-016.png? | ||
+ | ==== Paramètres d' | ||
+ | |||
+ | **Sécurité -> SSH**. | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | {{ Images_Cahier-201-02-017.png? | ||
+ | ==== FTP ==== | ||
+ | |||
+ | **Configuration -> FTP ->** onglet **Configurer**. | ||
+ | |||
+ | {{Images_icone-201-001_doigt.png? | ||
+ | __Nous ne recommandons pas d' | ||
+ | <WRAP clear></ | ||
+ | |||
+ | {{ Images_Cahier-201-02-018.png? | ||
+ | ==== Serveurs DNS ==== | ||
+ | |||
+ | **Configuration -> Réseau ->** onglet **Serveur DNS**. | ||
+ | |||
+ | Le serveur DNS secondaire peut être //8.8.8.8// ou // | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | ===== Ouverture d'une session PuTTY ===== | ||
+ | |||
+ | Les paramètres du serveur sont définis correctement et on peut utiliser PuTTY pour s'y loguer. | ||
+ | |||
+ | Voir __PuTTY__ dans le | ||
+ | [[nethserver_101_cahier_02_installations_configurations_logiciels_prerequis# | ||
+ | : // | ||
+ | |||
+ | On se logue en tant que l' | ||
+ | |||
+ | < | ||
+ | login as: root | ||
+ | root@10.10.10.75' | ||
+ | Last login: Thu May 16 09:58:33 2019 from 10.10.10.81 | ||
+ | |||
+ | ************ Welcome to NethServer ************ | ||
+ | |||
+ | This is a NethServer installation. | ||
+ | |||
+ | Before editing configuration files, be aware | ||
+ | of the automatic events and templates system. | ||
+ | |||
+ | |||
+ | http:// | ||
+ | |||
+ | *********************************************** | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | ==== Adresse IP ==== | ||
+ | |||
+ | On vérifie les adresses IP du serveur. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# ifconfig | ||
+ | |||
+ | enp0s3: flags=4163< | ||
+ | inet 10.10.10.75 | ||
+ | inet6 fe80:: | ||
+ | ether 08: | ||
+ | RX packets 680 bytes 63712 (62.2 KiB) | ||
+ | RX errors 0 dropped 0 overruns 0 frame 0 | ||
+ | TX packets 634 bytes 260579 (254.4 KiB) | ||
+ | TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 | ||
+ | |||
+ | enp0s8: flags=4163< | ||
+ | inet 192.168.1.75 | ||
+ | inet6 fe80:: | ||
+ | ether 08: | ||
+ | RX packets 27919 bytes 26181152 (24.9 MiB) | ||
+ | RX errors 0 dropped 0 overruns 0 frame 0 | ||
+ | TX packets 20591 bytes 5112156 (4.8 MiB) | ||
+ | TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 | ||
+ | |||
+ | lo: flags=73< | ||
+ | inet 127.0.0.1 | ||
+ | inet6 ::1 prefixlen 128 scopeid 0x10< | ||
+ | loop txqueuelen 1000 (Local Loopback) | ||
+ | RX packets 2534 bytes 309622 (302.3 KiB) | ||
+ | RX errors 0 dropped 0 overruns 0 frame 0 | ||
+ | TX packets 2534 bytes 309622 (302.3 KiB) | ||
+ | TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 | ||
+ | |||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | ==== Fail2ban ==== | ||
+ | |||
+ | On vérifie que le pare-feu // | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# rpm -qa | grep -i fail2ban | ||
+ | |||
+ | fail2ban-firewalld-0.9.7-1.el7.noarch | ||
+ | fail2ban-server-0.9.7-1.el7.noarch | ||
+ | fail2ban-0.9.7-1.el7.noarch | ||
+ | fail2ban-sendmail-0.9.7-1.el7.noarch | ||
+ | nethserver-fail2ban-1.1.6-1.ns7.noarch | ||
+ | fail2ban-shorewall-0.9.7-1.el7.noarch | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | On vérifie que Fail2ban roule sur le serveur. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# ps aux | grep -i fail2ban | ||
+ | |||
+ | root 4586 1.2 0.5 1746708 22656 ? | ||
+ | root 7161 0.0 0.0 112728 | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | ==== ClamAV ==== | ||
+ | |||
+ | Par défaut //ClamAV// est installé, mais partiellement, | ||
+ | |||
+ | Dans le | ||
+ | [[nethserver_101_cahier_03_creation_un_serveur_virtuel# | ||
+ | : //Création d'un Serveur NethServer virtuel// du "Cours NethServer-101", | ||
+ | |||
+ | On vérifie que l' | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# rpm -qa | grep -i clamav | ||
+ | |||
+ | clamav-scanner-systemd-0.101.2-1.el7.x86_64 | ||
+ | clamav-lib-0.101.2-1.el7.x86_64 | ||
+ | clamav-server-systemd-0.101.2-1.el7.x86_64 | ||
+ | clamav-unofficial-sigs-5.6.2-7.el7.noarch | ||
+ | clamav-update-0.101.2-1.el7.x86_64 | ||
+ | clamav-0.101.2-1.el7.x86_64 | ||
+ | clamav-filesystem-0.101.2-1.el7.noarch | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | {{ Images_Cahier-201-02-019.png? | ||
+ | **Configuration -> Scanner Antivirus ->** onglet **Clamscan**. | ||
+ | |||
+ | ClamAV lancera un balayage complet du système à // | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | ===== Utilisateurs ===== | ||
+ | |||
+ | {{ Images_Cahier-201-02-020.png? | ||
+ | ==== Utilisateur michelandre ==== | ||
+ | |||
+ | **Gestion -> Utilisateurs et groupes ->** onglet **Utilisateurs**. | ||
+ | |||
+ | L' | ||
+ | [[nethserver_101_cahier_03_creation_un_serveur_virtuel# | ||
+ | : //Création d'un Serveur NethServer virtuel// du "Cours NethServer-101" | ||
+ | \\ | ||
+ | |||
+ | ===== Fichier hosts du poste de travail ===== | ||
+ | |||
+ | {{ Images_Cahier-201-04-101.png? | ||
+ | Nous sommes sur un réseau LOCAL et vu que nous n' | ||
+ | <WRAP centeralign>'' | ||
+ | du poste de travail afin qu'il puisse trouver l' | ||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | ====== Prérequis ====== | ||
+ | |||
+ | ===== Collection PHP ===== | ||
+ | |||
+ | Version PHP actuelle pour notre Serveur NethServer-7.6-1810. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# php --version | ||
+ | |||
+ | PHP 5.4.16 (cli) (built: Oct 30 2018 19:30:51) | ||
+ | Copyright (c) 1997-2013 The PHP Group | ||
+ | Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | Comme on le voit, notre version //5.4.16// de PHP est légèrement vieillotte. | ||
+ | |||
+ | {{Images_icone-201-003_Note.png? | ||
+ | |||
+ | ==== Collections de logiciels ==== | ||
+ | |||
+ | {{Images_icone-201-001_doigt.png? | ||
+ | |||
+ | Tous les //RPM// des Collections sont installés dans le répertoire ''/ | ||
+ | |||
+ | ==== But de la Collection PHP === | ||
+ | |||
+ | Le but de la // | ||
+ | |||
+ | ==== Prérequis pour l' | ||
+ | |||
+ | // | ||
+ | Il faut installer les référentiels //stephdl// et //remi// pour pouvoir installer la // | ||
+ | |||
+ | ==== Référentiel stephdl ==== | ||
+ | |||
+ | // | ||
+ | |||
+ | On vérifie si le référentiel **stephdl** est déjà installé. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# rpm -qa | grep nethserver-stephdl | ||
+ | |||
+ | nethserver-stephdl-1.0.7-1.ns7.sdl.noarch | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | Si ce n'est déjà fait, on installe ce référentiel. | ||
+ | |||
+ | <WRAP box round> | ||
+ | < | ||
+ | [root@tchana ~]# yum install -y http:// | ||
+ | |||
+ | ... | ||
+ | Transaction Summary | ||
+ | ============================================================================================ | ||
+ | Install | ||
+ | |||
+ | Total size: 40 k | ||
+ | Installed size: 40 k | ||
+ | ... | ||
+ | Installed: | ||
+ | nethserver-stephdl.noarch 0: | ||
+ | |||
+ | Complete! | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | Vérification. | ||
+ | |||
+ | <WRAP box round> | ||
+ | < | ||
+ | [root@tchana ~]# rpm -qa | grep stephdl | ||
+ | |||
+ | nethserver-stephdl-1.0.7-1.ns7.sdl.noarch | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | ==== Référentiel remi ==== | ||
+ | |||
+ | On vérifie si le référentiel **remi** est déjà installé. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# rpm -qa | grep remi | ||
+ | |||
+ | remi-release-7.6-2.el7.remi.noarch | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | Si ce n'est déjà fait, on installe ce référentiel. | ||
+ | |||
+ | <WRAP box round> | ||
+ | < | ||
+ | [root@tchana ~]# yum install -y http:// | ||
+ | |||
+ | ... | ||
+ | Transaction Summary | ||
+ | ============================================================================================ | ||
+ | Install | ||
+ | |||
+ | Total size: 19 k | ||
+ | Installed size: 19 k | ||
+ | ... | ||
+ | Installed: | ||
+ | remi-release.noarch 0: | ||
+ | |||
+ | Complete! | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | On vérifie. | ||
+ | |||
+ | <WRAP box round> | ||
+ | < | ||
+ | [root@tchana ~]# rpm -qa | grep remi | ||
+ | |||
+ | remi-release-7.6-2.el7.remi.noarch | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | ==== Installation de la Collection PHP ==== | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# yum install -y nethserver-php-scl --enablerepo=stephdl | ||
+ | |||
+ | ... | ||
+ | Résumé de la transaction | ||
+ | ============================================================================================ | ||
+ | Installation | ||
+ | |||
+ | Taille totale des téléchargements : 47 M | ||
+ | Taille d' | ||
+ | ... | ||
+ | Installation : scl-utils-20130529-19.el7.x86_64 | ||
+ | ... | ||
+ | Installation : nethserver-php-scl-1.2.4-1.ns7.sdl.x86_64 | ||
+ | Vérification : 1: | ||
+ | ... | ||
+ | Vérification : php72-php-tidy-7.2.18-1.el7.remi.x86_64 | ||
+ | |||
+ | Installé : | ||
+ | nethserver-php-scl.x86_64 0: | ||
+ | |||
+ | Dépendances installées : | ||
+ | enchant.x86_64 1: | ||
+ | ... | ||
+ | tcl.x86_64 1: | ||
+ | |||
+ | Terminé ! | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | ==== Usage ==== | ||
+ | |||
+ | Normalement, | ||
+ | |||
+ | Les réglages sont répartis à deux endroits. | ||
+ | |||
+ | - À la page **Gestion -> Hôtes virtuels**.\\ | ||
+ | Là, après avoir créé un hôte virtuel, vous pouvez choisir la version que vous utiliserez pour l'// | ||
+ | - À la page **Configuration -> Paramètres PHP**.\\ Là, vous pouvez choisir la version PHP que vous souhaitez utiliser __pour l’ensemble du serveur__.\\ - Lorsqu' | ||
+ | \\ | ||
+ | |||
+ | ==== Répertoire d' | ||
+ | |||
+ | {{Images_icone-201-003_Note.png? | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# yum repolist | grep remi | ||
+ | |||
+ | * remi-safe: mirror.team-cymru.com | ||
+ | remi-safe | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | On vérifie le répertoire ''/ | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# ls -ls /opt | ||
+ | |||
+ | total 0 | ||
+ | 0 drwxr-xr-x. 7 root root 81 Jan 4 09:16 puppetlabs | ||
+ | 0 drwxr-xr-x | ||
+ | 0 drwxr-xr-x | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | On affiche le répertoire ''/ | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# ls -ls /opt/remi | ||
+ | |||
+ | total 0 | ||
+ | 0 dr-xr-xr-x 3 root root 32 16 mai 13:03 php56 | ||
+ | 0 dr-xr-xr-x 3 root root 32 16 mai 13:03 php70 | ||
+ | 0 dr-xr-xr-x 3 root root 32 16 mai 13:03 php71 | ||
+ | 0 dr-xr-xr-x 3 root root 32 16 mai 13:03 php72 | ||
+ | 0 dr-xr-xr-x 3 root root 32 16 mai 13:03 php73 | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | ==== PHP72 par défaut après une connexion à la ligne de commande ==== | ||
+ | |||
+ | // | ||
+ | |||
+ | On crée le fichier d' | ||
+ | |||
+ | {{Images_icone-201-004_Triangle.png? | ||
+ | |||
+ | < | ||
+ | cat > / | ||
+ | #!/bin/bash | ||
+ | source / | ||
+ | if [[ " | ||
+ | src=" | ||
+ | pkgs=(${src// | ||
+ | uniq=($(printf " | ||
+ | export X_SCLS=" | ||
+ | fi | ||
+ | EOT | ||
+ | |||
+ | |||
+ | </ | ||
+ | |||
+ | On rend le fichier exécutable. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# chmod +x / | ||
+ | |||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | On vérifie. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# ls -als / | ||
+ | |||
+ | 4 -rwxr-xr-x 1 root root 215 16 mai 13:11 / | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | === Vérification si PHP72 est le défaut== | ||
+ | |||
+ | {{Images_icone-201-004_Triangle.png? | ||
+ | On vérifie l' | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# rpm -qa | grep scl- | ||
+ | |||
+ | centos-release-scl-rh-2-3.el7.centos.noarch | ||
+ | centos-release-scl-2-3.el7.centos.noarch | ||
+ | nethserver-php-scl-1.2.4-1.ns7.sdl.x86_64 | ||
+ | scl-utils-20130529-19.el7.x86_64 | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | Collections installées. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# scl -l | ||
+ | |||
+ | php56 | ||
+ | php70 | ||
+ | php71 | ||
+ | php72 | ||
+ | php73 | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | Quel est le PHP par défaut? | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# which php | ||
+ | |||
+ | / | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | Quelle est sa version? | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# php --version | ||
+ | |||
+ | PHP 7.2.18 (cli) (built: Apr 30 2019 14:41:03) ( NTS ) | ||
+ | Copyright (c) 1997-2018 The PHP Group | ||
+ | Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | Notre fichier '' | ||
+ | \\ | ||
+ | |||
+ | === Sauvegarde | ||
+ | |||
+ | On vérifie si le nom du fichier ''/ | ||
+ | |||
+ | {{Images_icone-201-004_Triangle.png? | ||
+ | |||
+ | < | ||
+ | NouvelleInclusion="/ | ||
+ | if grep -Fxq " | ||
+ | then | ||
+ | # L' | ||
+ | echo -e "\nLe fichier custom.include contient déjà l' | ||
+ | else | ||
+ | # L' | ||
+ | echo -e " | ||
+ | echo -e " | ||
+ | fi | ||
+ | |||
+ | |||
+ | </ | ||
+ | |||
+ | On vérifie. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# cat / | ||
+ | |||
+ | / | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | Ci-dessus, il n'y a pas de ligne vide avant __/ | ||
+ | \\ | ||
+ | |||
+ | ==== Mise à jour de la Collection ==== | ||
+ | |||
+ | NethServer-7.6.1810 | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# yum update -y nethserver-php-scl --enablerepo=stephdl | ||
+ | |||
+ | Loaded plugins: changelog, fastestmirror, | ||
+ | Loading mirror speeds from cached hostfile | ||
+ | * ce-base: it.centos.contactlab.it | ||
+ | * ce-extras: it.centos.contactlab.it | ||
+ | * ce-updates: it.centos.contactlab.it | ||
+ | * epel: epel.mirror.constant.com | ||
+ | * nethforge: mirror.nethserver.org | ||
+ | * nethserver-base: | ||
+ | * nethserver-updates: | ||
+ | * remi-safe: rpms.remirepo.net | ||
+ | No packages marked for update | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | {{Images_icone-201-004_Triangle.png? | ||
+ | {{Images_icone-201-003_Note.png? | ||
+ | \\ | ||
+ | |||
+ | ==== Ajustement des paramètres PHP ==== | ||
+ | |||
+ | Les valeurs de certains paramètres de PHP ne sont pas suffisants pour certains ajouts. Ces paramètres sont: **'' | ||
+ | |||
+ | Affichage des paramètres par défaut. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# config show php72 | ||
+ | |||
+ | php72=configuration | ||
+ | AllowUrlFopen=On | ||
+ | ExposePhp=0 | ||
+ | MaxExecutionTime=30 | ||
+ | MaxFileUpload=20 | ||
+ | MaxInputTime=60 | ||
+ | MemoryLimit=128 | ||
+ | PostMaxSize=20 | ||
+ | UploadMaxFilesize=10 | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | {{Images_icone-201-001_doigt.png? | ||
+ | \\ | ||
+ | |||
+ | {{Images_icone-201-004_Triangle.png? | ||
+ | \\ | ||
+ | |||
+ | === MemoryLimit === | ||
+ | |||
+ | Chaque fois qu'un client fait une requête au serveur Web, PHP génère un processus PHP. Le travail de ce processus est de générer du code HTML qu'il envoie au client. Le processus fournit un temps d' | ||
+ | |||
+ | === PostMaxSize === | ||
+ | |||
+ | Le paramètre '' | ||
+ | |||
+ | <WRAP column 30%> | ||
+ | === UploadMaxFilesize === | ||
+ | |||
+ | Pour certaines extensions telles qu' | ||
+ | La limite ci-contre, est celle de WordPress. | ||
+ | </ | ||
+ | <WRAP column 60%> | ||
+ | |{{ Images_Cahier-201-02-200.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | <WRAP column 30%> | ||
+ | |||
+ | === Version PHP par défaut === | ||
+ | |||
+ | On définit la version PHP par défaut pour Apache. | ||
+ | |||
+ | **Configuration -> Paramètres PHP ->** onglet **Version PHP Apache ->** cliquer | ||
+ | </ | ||
+ | <WRAP column 60%> | ||
+ | |{{ Images_Cahier-201-02-201.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | <WRAP column 30%> | ||
+ | === Ajustements des paramètres de la version PHP-7.2 === | ||
+ | |||
+ | Onglet **Php V7.2 SCL**\\ | ||
+ | Ajuster tel que ci-contre //(250M - 100M - 75M)// | ||
+ | **-> SOUMETTRE**. | ||
+ | |||
+ | {{Images_icone-201-006_Securite.png? | ||
+ | </ | ||
+ | <WRAP column 60%> | ||
+ | |{{ Images_Cahier-201-02-202.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | <WRAP column 30%> | ||
+ | Onglet **Version par défaut de PHP**\\ | ||
+ | Ajuster tel que ci-contre //(250M - 75M - 75M)// | ||
+ | **-> SOUMETTRE**.\\ | ||
+ | |||
+ | {{Images_icone-201-006_Securite.png? | ||
+ | </ | ||
+ | <WRAP column 60%> | ||
+ | |{{ Images_Cahier-201-02-203.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | === Vérifications à la ligne de commande === | ||
+ | |||
+ | '' | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# cat / | ||
+ | |||
+ | memory_limit | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | '' | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# cat / | ||
+ | |||
+ | post_max_size | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | '' | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# cat / | ||
+ | |||
+ | upload_max_filesize | ||
+ | </ | ||
+ | |||
+ | {{Images_icone-201-004_Triangle.png? | ||
+ | \\ | ||
+ | |||
+ | ===== Instantané VirtualBox ===== | ||
+ | |||
+ | {{Images_icone-201-002_Lumiere.png? | ||
+ | \\ | ||
+ | |||
+ | <WRAP centeralign> | ||
+ | \\ | ||
+ | |||
+ | ===== Installation de git ===== | ||
+ | |||
+ | On installe '' | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# yum install -y git | ||
+ | |||
+ | ... | ||
+ | Installation de 2 paquet(s) | ||
+ | |||
+ | Taille totale des téléchargements : 4.6 M | ||
+ | Taille d' | ||
+ | ... | ||
+ | Installé: | ||
+ | git.x86_64 0: | ||
+ | |||
+ | Dépendance(s) installée(s) : | ||
+ | perl-Git.noarch 0: | ||
+ | |||
+ | Terminé ! | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | \\ | ||
+ | |||
+ | ===== Création de l' | ||
+ | |||
+ | **Gestion -> Hôtes virtuels -> CRÉER NOUVEAU ->** onglet | ||
+ | |||
+ | <WRAP column 46%> | ||
+ | |{{ Images_Cahier-201-04-005.png? | ||
+ | ==== NOM ==== | ||
+ | |||
+ | On peut utiliser n' | ||
+ | |||
+ | C'est dans ce répertoire qu'on installera DokuWiki. | ||
+ | |||
+ | On entre les informations demandées. | ||
+ | |||
+ | **SOUMETTRE**. | ||
+ | </ | ||
+ | <WRAP column 46%> | ||
+ | |{{ Images_Cahier-201-04-006.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | <WRAP column 46%> | ||
+ | \\ | ||
+ | \\ | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | |{{ Images_Cahier-201-04-007.png? | ||
+ | </ | ||
+ | <WRAP column 46%> | ||
+ | < | ||
+ | < | ||
+ | <wrap em>< | ||
+ | < | ||
+ | |{{ Images_Cahier-201-04-008.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | <WRAP column 22%> | ||
+ | On vérifie le résultat. | ||
+ | </ | ||
+ | <WRAP column 70%> | ||
+ | |{{ Images_Cahier-201-04-009.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | ==== Vérification du répertoire dokuwiki ==== | ||
+ | |||
+ | La création de l' | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# ls -alsd / | ||
+ | |||
+ | 0 drwxr-sr-x 2 ftp apache 7 juin 13:01 / | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | {{Images_icone-201-003_Note.png? | ||
+ | |||
+ | On change le propriétaire. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# chown apache / | ||
+ | |||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | On vérifie. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# ls -alsd / | ||
+ | |||
+ | 0 drwxr-sr-x 2 apache apache 7 juin 13:01 / | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | ==== Création d'une entrée DNS pour l' | ||
+ | |||
+ | <WRAP column 22%> | ||
+ | **Configuration -> DNS ->** onglet **Hôtes -> CRÉER NOUVEAU**. | ||
+ | </ | ||
+ | <WRAP column 70%> | ||
+ | |{{ Images_Cahier-201-04-010.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | <WRAP column 46%> | ||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | Le //**Nom d' | ||
+ | |||
+ | L' | ||
+ | |||
+ | **SOUMETTRE**. | ||
+ | |||
+ | </ | ||
+ | <WRAP column 46%> | ||
+ | |{{ Images_Cahier-201-04-011.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | <WRAP column 22%> | ||
+ | On vérifie le résultat. | ||
+ | </ | ||
+ | <WRAP column 70%> | ||
+ | |{{ Images_Cahier-201-04-012.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | ===== Configuration de la messagerie électronique ===== | ||
+ | |||
+ | Si on veut que DokuWiki puisse envoyer et recevoir des courriels, il faut configurer le domaine de l' | ||
+ | |||
+ | <WRAP column 46%> | ||
+ | **Configuration -> Courrier (Email) ->** onglet **Domaines -> CRÉER NOUVEAU**. | ||
+ | |{{ Images_Cahier-201-04-014.png? | ||
+ | </ | ||
+ | <WRAP column 46%> | ||
+ | < | ||
+ | < | ||
+ | |{{ Images_Cahier-201-04-015.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | <WRAP column 22%> | ||
+ | On vérifie le résultat. | ||
+ | </ | ||
+ | <WRAP column 70%> | ||
+ | |{{ Images_Cahier-201-04-016.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | ==== Création d'un alias pour l' | ||
+ | |||
+ | Il nous faur créer un //alias// de messagerie pour l' | ||
+ | |||
+ | <WRAP column 46%> | ||
+ | \\ | ||
+ | \\ | ||
+ | **Gestion -> Adresse mail ->** onglet | ||
+ | |{{ Images_Cahier-201-04-017.png? | ||
+ | </ | ||
+ | <WRAP column 46%> | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | |{{ Images_Cahier-201-04-018.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | <WRAP column 22%> | ||
+ | On vérifie le résultat. | ||
+ | </ | ||
+ | <WRAP column 70%> | ||
+ | |{{ Images_Cahier-201-03-021.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | L' | ||
+ | |||
+ | * https:// | ||
+ | * https:// | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | ===== Redirection par le module Proxy inverse ===== | ||
+ | |||
+ | // | ||
+ | On installe le module **Proxy Inverse** qui s' | ||
+ | |||
+ | ==== Installation ==== | ||
+ | |||
+ | {{ Images_Cahier-201-03-022.png? | ||
+ | **Administration -> Gestionnaire des logiciels ->** onglet **Disponible ->** cocher **Proxy inverse -> AJOUTER**. | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | <WRAP column 30%> | ||
+ | \\ | ||
+ | **APPLIQUER LES CHANGEMENTS**. | ||
+ | |{{ Images_Cahier-201-03-023.png? | ||
+ | </ | ||
+ | <WRAP column 30%> | ||
+ | \\ | ||
+ | **Recharger la page**. | ||
+ | |{{ Images_Cahier-201-03-024.png? | ||
+ | </ | ||
+ | <WRAP column 30%> | ||
+ | Le nouveau menu //**Proxy inverse**// est disponible. | ||
+ | |{{ Images_Cahier-201-03-025.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | ==== Configuration du mandataire inversé ==== | ||
+ | |||
+ | <WRAP column 46%> | ||
+ | **Passerelle -> Proxy inverse ->** onglet **Hôtes virtuels -> CRÉER NOUVEAU**.\\ | ||
+ | {{ Images_Cahier-201-03-026.png? | ||
+ | |||
+ | On configure le Serveur NethServer en tant que mandataire inversé pour: | ||
+ | <WRAP centeralign> | ||
+ | |||
+ | < | ||
+ | |||
+ | < | ||
+ | </ | ||
+ | <WRAP column 46%> | ||
+ | |{{ Images_Cahier-201-04-024.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | <WRAP column 15%> | ||
+ | On vérifie le résultat. | ||
+ | </ | ||
+ | <WRAP column 77%> | ||
+ | |{{ Images_Cahier-201-04-025.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | ==== Vérification de la connexion redirigée et sécurisée ==== | ||
+ | |||
+ | {{Images_Cahier-101-03-003.png? | ||
+ | |||
+ | On se rend à l'URL https:// | ||
+ | |||
+ | {{Images_icone-201-003_Note.png? | ||
+ | |||
+ | <WRAP column 46%> | ||
+ | C'est la page Web par défaut de NethServer qui s' | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | </ | ||
+ | <WRAP column 46%> | ||
+ | |{{ Images_Cahier-201-04-026.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | ===== Instantané VirtualBox ===== | ||
+ | |||
+ | {{Images_Cahier-101-03-004.png? | ||
+ | \\ | ||
+ | |||
+ | ===== Fichier httpd.conf ===== | ||
+ | |||
+ | Le fichier ''/ | ||
+ | |||
+ | Par défaut, cette directive est à **None** et fait en sorte que le démon //httpd// ne traitera aucun fichier '' | ||
+ | |||
+ | Plus loin, après l' | ||
+ | |||
+ | Nous allons donc créer un fichier ''/ | ||
+ | |||
+ | ==== Création du ficher y_docuwiki.conf ==== | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | < | ||
+ | cat > / | ||
+ | # ************************************** | ||
+ | # Michel-André, | ||
+ | # Pour permettre la lecture de fichiers .htaccess du répertoire DokuWiki | ||
+ | < | ||
+ | # Permet de suivre les liens synboliques | ||
+ | Options Indexes FollowSymLinks | ||
+ | |||
+ | # | ||
+ | # La directive AllowOverride ALL signifie d' | ||
+ | # configuration httpd.conf lorsque le démon rencontre des directives identiques | ||
+ | # dans un fichier .htaccess. | ||
+ | AllowOverride All | ||
+ | # | ||
+ | # Contrôle qui peut obtenir des pages de ce serveur. | ||
+ | # | ||
+ | Require all granted | ||
+ | </ | ||
+ | |||
+ | EOT | ||
+ | |||
+ | |||
+ | </ | ||
+ | |||
+ | On vérifie. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# cat / | ||
+ | |||
+ | # La directive AllowOverride ALL signifie d' | ||
+ | AllowOverride All | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | ==== Sauvegarde du fichier ==== | ||
+ | |||
+ | On vérifie si le nom du fichier ''/ | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | < | ||
+ | NouvelleInclusion="/ | ||
+ | if grep -Fxq " | ||
+ | then | ||
+ | # L' | ||
+ | echo -e "\nLe fichier custom.include contient déjà l' | ||
+ | else | ||
+ | # L' | ||
+ | echo -e " | ||
+ | echo -e " | ||
+ | fi | ||
+ | |||
+ | |||
+ | </ | ||
+ | |||
+ | On vérifie. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# cat / | ||
+ | |||
+ | / | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | Ci-dessus, il n'y a pas de ligne vide avant __/ | ||
+ | |||
+ | {{Images_icone-201-003_Note.png? | ||
+ | |||
+ | ===== Répertoire well-known ===== | ||
+ | |||
+ | // | ||
+ | // | ||
+ | |||
+ | __<wrap em>Pour un serveur branché directement à l' | ||
+ | |||
+ | Nous allons créer un fichier ''/ | ||
+ | |||
+ | ==== Création du fichier z_well-known.conf ==== | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | < | ||
+ | cat > / | ||
+ | Alias "/ | ||
+ | < | ||
+ | | ||
+ | | ||
+ | | ||
+ | </ | ||
+ | |||
+ | EOT | ||
+ | |||
+ | |||
+ | </ | ||
+ | |||
+ | On vérifie. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# ls -als / | ||
+ | |||
+ | 4 -rw-r--r-- 1 root root 231 10 juin 11:03 / | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | On affiche le contenu du fichier. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# cat / | ||
+ | |||
+ | Alias "/ | ||
+ | < | ||
+ | | ||
+ | | ||
+ | | ||
+ | </ | ||
+ | |||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | ==== Sauvegarde du fichier ==== | ||
+ | |||
+ | On vérifie si le nom du fichier ''/ | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | < | ||
+ | NouvelleInclusion="/ | ||
+ | if grep -Fxq " | ||
+ | then | ||
+ | # L' | ||
+ | echo -e "\nLe fichier custom.include contient déjà l' | ||
+ | else | ||
+ | # L' | ||
+ | echo -e " | ||
+ | echo -e " | ||
+ | fi | ||
+ | |||
+ | |||
+ | </ | ||
+ | |||
+ | On vérifie. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# cat / | ||
+ | |||
+ | / | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | Ci-dessus, il n'y a pas de ligne vide avant __/ | ||
+ | |||
+ | ==== Redémarrage du démon httpd ==== | ||
+ | |||
+ | On redémarre le démon Apache afin qu'il relise son fichier de configuration. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# systemctl restart httpd | ||
+ | |||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | ===== Instantané VirtualBox ===== | ||
+ | |||
+ | {{Images_Cahier-101-03-004.png? | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | ====== Certificat Let's Encrypt ====== | ||
+ | |||
+ | ===== CNAME ===== | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | [[nethserver_101_cahier_04_local_certificat_let_encrypt# | ||
+ | du Cahier-04: // | ||
+ | |||
+ | Il faut ajouter les CNAME dokuwiki chez [[https:// | ||
+ | |||
+ | <WRAP column 46%> | ||
+ | On clique **micronator-dev.org**. | ||
+ | |{{ Images_Cahier-201-03-030.png? | ||
+ | </ | ||
+ | <WRAP column 46%> | ||
+ | **DNS**. | ||
+ | |{{ Images_Cahier-201-03-031.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | <WRAP column 20%> | ||
+ | On ajoute les CNAME: | ||
+ | \\ | ||
+ | |||
+ | **dokuwiki** | ||
+ | \\ | ||
+ | \\ | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | **www.dokuwiki** | ||
+ | \\ | ||
+ | \\ | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | **mail.dokuwiki** | ||
+ | \\ | ||
+ | \\ | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | **www.mail.dokuwiki** | ||
+ | </ | ||
+ | <WRAP column 72%> | ||
+ | |{{ Images_Cahier-201-04-027.png? | ||
+ | |||
+ | |{{ Images_Cahier-201-04-028.png? | ||
+ | |||
+ | |{{ Images_Cahier-201-04-029.png? | ||
+ | |||
+ | |{{ Images_Cahier-201-04-030.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | <WRAP column 20%> | ||
+ | On rafraîchit la page, on vérifie et on quitte [[https:// | ||
+ | </ | ||
+ | <WRAP column 72%> | ||
+ | |{{ Images_Cahier-201-04-031.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | ==== Demande d'un certificat de test ==== | ||
+ | |||
+ | On force '' | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | {{Images_icone-201-003_Note.png? | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# / | ||
+ | --issue | ||
+ | --dns dns_cf | ||
+ | -d micronator-dev.org | ||
+ | -d www.micronator-dev.org | ||
+ | -d mail.micronator-dev.org | ||
+ | -d wpad.micronator-dev.org | ||
+ | -d mediawiki.micronator-dev.org | ||
+ | -d www.mediawiki.micronator-dev.org | ||
+ | -d mail.mediawiki.micronator-dev.org | ||
+ | -d dokuwiki.micronator-dev.org | ||
+ | -d www.dokuwiki.micronator-dev.org | ||
+ | -d mail.dokuwiki.micronator-dev.org | ||
+ | -d www.mail.dokuwiki.micronator-dev.org | ||
+ | --cert-file / | ||
+ | --ca-file / | ||
+ | --key-file / | ||
+ | --reloadcmd "/ | ||
+ | --force | ||
+ | --test | ||
+ | |||
+ | ... | ||
+ | [ven. juin 7 13:50:12 EDT 2019] Installing cert to:/ | ||
+ | [ven. juin 7 13:50:12 EDT 2019] Installing CA to:/ | ||
+ | [ven. juin 7 13:50:12 EDT 2019] Installing key to:/ | ||
+ | [ven. juin 7 13:50:12 EDT 2019] Run reload cmd: / | ||
+ | [ven. juin 7 13:50:12 EDT 2019] Reload success | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | La demande d'un certificat de test a été couronné de succès. | ||
+ | |||
+ | ==== Demande d'un certificat officiel ==== | ||
+ | |||
+ | On force le renouvellement pour l' | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# / | ||
+ | --issue | ||
+ | --dns dns_cf | ||
+ | -d micronator-dev.org | ||
+ | -d www.micronator-dev.org | ||
+ | -d mail.micronator-dev.org | ||
+ | -d wpad.micronator-dev.org | ||
+ | -d mediawiki.micronator-dev.org | ||
+ | -d www.mediawiki.micronator-dev.org | ||
+ | -d mail.mediawiki.micronator-dev.org | ||
+ | -d dokuwiki.micronator-dev.org | ||
+ | -d www.dokuwiki.micronator-dev.org | ||
+ | -d mail.dokuwiki.micronator-dev.org | ||
+ | -d www.mail.dokuwiki.micronator-dev.org | ||
+ | --cert-file / | ||
+ | --ca-file / | ||
+ | --key-file / | ||
+ | --reloadcmd "/ | ||
+ | --force | ||
+ | |||
+ | ... | ||
+ | [ven. juin 7 13:52:13 EDT 2019] Installing cert to:/ | ||
+ | [ven. juin 7 13:52:13 EDT 2019] Installing CA to:/ | ||
+ | [ven. juin 7 13:52:13 EDT 2019] Installing key to:/ | ||
+ | [ven. juin 7 13:52:13 EDT 2019] Run reload cmd: / | ||
+ | [ven. juin 7 13:52:16 EDT 2019] Reload success | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | La demande d'un certificat officiel a été couronné de succès. | ||
+ | |||
+ | ===== Vérification de la connexion sécurisée ===== | ||
+ | |||
+ | * On se rend à: [[https:// | ||
+ | * On peut aussi utiliser http://... qui sera transformé en https://... | ||
+ | |||
+ | <WRAP column 46%> | ||
+ | Le cadenas est __vert__, car le certificat a été émis par Let's Encrypt qui est une autorité de certification reconnue et la connexion est sécurisée par un chiffrement TLS/SSL. | ||
+ | |||
+ | C'est la page Web par défaut de NethServer qui s' | ||
+ | |||
+ | Si nous avions un site WordPress dans le répertoire web par défaut, c'est la page WordPress du site qui s' | ||
+ | </ | ||
+ | <WRAP column 46%> | ||
+ | |{{ Images_Cahier-201-04-032.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | Si vous avez de la difficulté à vous connecter, vidanger le cache DNS du poste de travail et celui du navigateur Firefox. | ||
+ | |||
+ | <WRAP column 55%> | ||
+ | < | ||
+ | < | ||
+ | |{{ Images_Cahier-201-02-011.png? | ||
+ | </ | ||
+ | <WRAP column 37%> | ||
+ | **Historique -> Supprimer l' | ||
+ | |{{ Images_Cahier-201-02-012.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | ===== Instantané VirtualBox ===== | ||
+ | |||
+ | {{Images_Cahier-101-03-004.png? | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | ====== Installation de DokuWiki ====== | ||
+ | |||
+ | ===== Téléchargement avec git ===== | ||
+ | |||
+ | On se rend dans le répertoire racine de notre futur DokuWiki. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# cd / | ||
+ | |||
+ | [root@tchana dokuwiki]# | ||
+ | </ | ||
+ | |||
+ | On vérifie. | ||
+ | |||
+ | < | ||
+ | [root@tchana dokuwiki]# pwd | ||
+ | |||
+ | / | ||
+ | [root@tchana dokuwiki]# | ||
+ | </ | ||
+ | |||
+ | On indique à '' | ||
+ | |||
+ | < | ||
+ | [root@tchana dokuwiki]# git clone --branch stable | ||
+ | https:// | ||
+ | / | ||
+ | |||
+ | Cloning into '/ | ||
+ | remote: Enumerating objects: 135, done. | ||
+ | remote: Counting objects: 100% (135/135), done. | ||
+ | remote: Compressing objects: 100% (100/100), done. | ||
+ | remote: Total 105612 (delta 61), reused 81 (delta 35), pack-reused 105477 | ||
+ | Receiving objects: 100% (105612/ | ||
+ | Resolving deltas: 100% (72692/ | ||
+ | [root@tchana dokuwiki]# | ||
+ | </ | ||
+ | |||
+ | ==== Ajustement du propriétaire et du groupe ==== | ||
+ | |||
+ | < | ||
+ | [root@tchana dokuwiki]# chown -R apache: | ||
+ | |||
+ | [root@tchana dokuwiki]# | ||
+ | </ | ||
+ | |||
+ | ==== Ajustement des droits ==== | ||
+ | |||
+ | On renforce la sécurité de l’accès aux fichiers <wrap em> | ||
+ | |||
+ | < | ||
+ | [root@tchana dokuwiki]# find . -type f -exec chmod 640 {} \; | ||
+ | |||
+ | [root@tchana dokuwiki]# | ||
+ | </ | ||
+ | |||
+ | On répète l' | ||
+ | |||
+ | < | ||
+ | [root@tchana dokuwiki]# find . -type d -exec chmod 2750 {} \; | ||
+ | |||
+ | [root@tchana dokuwiki]# | ||
+ | </ | ||
+ | |||
+ | On vérifie. | ||
+ | |||
+ | < | ||
+ | [root@tchana dokuwiki]# ls -als | ||
+ | |||
+ | total 140 | ||
+ | 4 drwxr-s--- 11 apache apache | ||
+ | 0 drwxr-xr-x | ||
+ | 4 -rw-r-S--- | ||
+ | 0 drwxr-s--- | ||
+ | 4 -rw-r-S--- | ||
+ | 20 -rw-r-S--- | ||
+ | 4 drwxr-s--- | ||
+ | 20 -rw-r-S--- | ||
+ | 0 drwxr-s--- | ||
+ | 4 drwxr-s--- 12 apache apache | ||
+ | 4 -rw-r-S--- | ||
+ | 4 -rw-r-S--- | ||
+ | 20 -rw-r-S--- | ||
+ | 0 drwxr-s--- | ||
+ | 4 -rw-r-S--- | ||
+ | 4 -rw-r-S--- | ||
+ | 4 -rw-r-S--- | ||
+ | 4 drwxr-s--- | ||
+ | 4 -rw-r-S--- | ||
+ | 20 -rw-r-S--- | ||
+ | 0 drwxr-s--- | ||
+ | 4 -rw-r-S--- | ||
+ | 0 drwxr-s--- | ||
+ | 4 -rw-r-S--- | ||
+ | 0 drwxr-s--- 11 apache apache | ||
+ | 4 -rw-r-S--- | ||
+ | [root@tchana dokuwiki]# | ||
+ | </ | ||
+ | |||
+ | ===== Lancement de l' | ||
+ | |||
+ | <WRAP column 22%> | ||
+ | On se rend sur notre site: https:// | ||
+ | </ | ||
+ | <WRAP column 70%> | ||
+ | |{{ Images_Cahier-201-04-033.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | <WRAP column 22%> | ||
+ | Choisissez votre langue **->** entrez les informations demandées **-> Enregistrer**. | ||
+ | </ | ||
+ | <WRAP column 70%> | ||
+ | |{{ Images_Cahier-201-04-034.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | <WRAP column 22%> | ||
+ | On clique: **votre nouveau DokuWiki**. | ||
+ | </ | ||
+ | <WRAP column 70%> | ||
+ | |{{ Images_Cahier-201-04-035.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | <WRAP column 22%> | ||
+ | **S' | ||
+ | </ | ||
+ | <WRAP column 70%> | ||
+ | |{{ Images_Cahier-201-04-036.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | <WRAP column 22%> | ||
+ | On entre le justificatif du super-utilisateur **-> S' | ||
+ | </ | ||
+ | <WRAP column 70%> | ||
+ | |{{ Images_Cahier-201-04-037.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | <WRAP column 22%> | ||
+ | Notre DokuWiki est fonctionnel. | ||
+ | \\ | ||
+ | \\ | ||
+ | \\ | ||
+ | \\ | ||
+ | \\ | ||
+ | \\ | ||
+ | \\ | ||
+ | \\ | ||
+ | \\ | ||
+ | \\ | ||
+ | \\ | ||
+ | \\ | ||
+ | \\ | ||
+ | \\ | ||
+ | \\ | ||
+ | \\ | ||
+ | \\ | ||
+ | \\ | ||
+ | \\ | ||
+ | \\ | ||
+ | \\ | ||
+ | \\ | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | |||
+ | ===== Instantané VirtualBox ===== | ||
+ | |||
+ | {{Images_Cahier-101-03-004.png? | ||
+ | </ | ||
+ | <WRAP column 70%> | ||
+ | |{{ Images_Cahier-201-04-038.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | <WRAP centeralign> | ||
+ | |||
+ | ====== Configuration ====== | ||
+ | |||
+ | ===== Préparation ===== | ||
+ | |||
+ | {{Images_Cahier-101-03-003.png? | ||
+ | |||
+ | <WRAP column 55%> | ||
+ | < | ||
+ | < | ||
+ | |{{ Images_Cahier-201-02-011.png? | ||
+ | </ | ||
+ | <WRAP column 37%> | ||
+ | **Historique -> Supprimer l' | ||
+ | |{{ Images_Cahier-201-02-012.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | ===== Login ===== | ||
+ | |||
+ | Si ce n'est déjà fait, on se logue à notre DokuWiki **https:// | ||
+ | |||
+ | <WRAP column 30%> | ||
+ | |{{ Images_Cahier-201-04-039.png? | ||
+ | </ | ||
+ | <WRAP column 62%> | ||
+ | |{{ Images_Cahier-201-04-040.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | <WRAP column 30%> | ||
+ | On entre le justificatif du super-utilisateur **-> S' | ||
+ | </ | ||
+ | <WRAP column 40%> | ||
+ | |{{ Images_Cahier-201-04-041.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | <WRAP column 30%> | ||
+ | ===== Logo ===== | ||
+ | |||
+ | Le fichier de notre logo doit être nommé '' | ||
+ | |||
+ | **Gestionnaire Multimédia ->** onglet | ||
+ | </ | ||
+ | <WRAP column 40%> | ||
+ | |{{ Images_Cahier-201-04-042.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | <WRAP column 46%> | ||
+ | On sélectione notre logo: **logo.png -> Ouvrir**. | ||
+ | |{{ Images_Cahier-201-04-043.png? | ||
+ | </ | ||
+ | <WRAP column 46%> | ||
+ | **Envoyer**. | ||
+ | |{{ Images_Cahier-201-04-044.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | <WRAP column 22%> | ||
+ | On rafraîchit la page et notre logo apparaît. | ||
+ | </ | ||
+ | <WRAP column 70%> | ||
+ | |{{ Images_Cahier-201-04-045.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | Notre logo se trouve dans le répertoire: | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# ls -als / | ||
+ | |||
+ | 12 -rw-r--r-- 1 apache apache 9485 8 juin 15:44 / | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | \\ | ||
+ | |||
+ | ===== Relocalisation des répertoires data et conf ===== | ||
+ | |||
+ | Par mesure de sécurité, nous allons relocaliser les répertoires '' | ||
+ | |||
+ | ==== Répertoire conf ==== | ||
+ | |||
+ | On crée le répertoire de destination. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# mkdir -p / | ||
+ | |||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# chown apache: | ||
+ | |||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | On vérifie. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# ls -alsd / | ||
+ | |||
+ | 4 drwxr-xr-x 2 apache apache 4096 10 juin 15:17 / | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | On copie le __contenu__ du répertoire '' | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# cp -a / | ||
+ | |||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | On supprime le répertoire '' | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# rm -rf / | ||
+ | |||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | Pour remplacer le répertoire '' | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# ln -s / | ||
+ | |||
+ | [root@tchana ~] | ||
+ | </ | ||
+ | |||
+ | On vérifie. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# ls -als / | ||
+ | |||
+ | 0 lrwxrwxrwx 1 root apache 14 10 juin 15:06 / | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | ==== Répertoire data ==== | ||
+ | |||
+ | On crée le répertoire de destination. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# mkdir -p / | ||
+ | |||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | On vérifie. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# ls -alsd / | ||
+ | |||
+ | 0 drwxr-xr-x 3 root root 18 10 juin 15:18 / | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | On copie le __répertoire complet__ data dans le répertoire de destination. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# cp -a / | ||
+ | |||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | On supprime le répertoire '' | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# rm -rf / | ||
+ | |||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | Pour remplacer le répertoire '' | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# ln -s / | ||
+ | |||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | On vérifie. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# ls -als / | ||
+ | |||
+ | 0 lrwxrwxrwx 1 root apache 22 10 juin 15:15 / | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | ==== Ajustement des droits ==== | ||
+ | |||
+ | On renforce la sécurité de l’accès aux fichiers <wrap em> | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | < | ||
+ | [root@tchana dokuwiki]# find -L / | ||
+ | |||
+ | [root@tchana dokuwiki]# | ||
+ | </ | ||
+ | |||
+ | On répète l' | ||
+ | |||
+ | < | ||
+ | [root@tchana dokuwiki]# find -L / | ||
+ | |||
+ | [root@tchana dokuwiki]# | ||
+ | </ | ||
+ | |||
+ | On vérifie pour les fichiers, les répertoires et les fichiers cachés et de plus, " | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# ls -als / | ||
+ | |||
+ | total 132 | ||
+ | 4 drwxr-s--- | ||
+ | 0 drwxr-xr-x | ||
+ | 4 -rw-r-S--- | ||
+ | 0 drwxr-s--- | ||
+ | ... | ||
+ | 0 lrwxrwxrwx | ||
+ | ... | ||
+ | 0 lrwxrwxrwx | ||
+ | ... | ||
+ | 4 -rw-r-S--- | ||
+ | ... | ||
+ | 4 -rw-r-S--- | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | \\ | ||
+ | |||
+ | ===== Administrer ===== | ||
+ | |||
+ | <WRAP column 22%> | ||
+ | **Administrer -> Paramètres de configuration**. | ||
+ | </ | ||
+ | <WRAP column 70%> | ||
+ | |{{ Images_Cahier-201-04-046.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | === Répertoire d' | ||
+ | |||
+ | Si ce n'est déjà fait, on ajuste le chemin du répertoire '' | ||
+ | |||
+ | {{ Images_Cahier-201-04-047.png? | ||
+ | \\ | ||
+ | |||
+ | <WRAP column 30%> | ||
+ | < | ||
+ | |||
+ | < | ||
+ | </ | ||
+ | <WRAP column 30%> | ||
+ | |{{ Images_Cahier-201-04-048.png? | ||
+ | </ | ||
+ | <WRAP column 30%> | ||
+ | |{{ Images_Cahier-201-04-049.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | {{Images_Cahier-101-03-004.png? | ||
+ | |||
+ | === Mode de création des répertoires et fichiers === | ||
+ | |||
+ | En octal, commençant par <wrap em> | ||
+ | |||
+ | {{ Images_Cahier-201-04-050.png? | ||
+ | \\ | ||
+ | |||
+ | ==== Paramètres d' | ||
+ | |||
+ | === Format de date === | ||
+ | |||
+ | // | ||
+ | |||
+ | On change le format de '' | ||
+ | |||
+ | {{ Images_Cahier-201-04-051.png? | ||
+ | \\ | ||
+ | |||
+ | <WRAP column 22%> | ||
+ | ==== Paramètres de notification ==== | ||
+ | |||
+ | On peut spécifier une adresse courriel pour les notifications. | ||
+ | </ | ||
+ | <WRAP column 70%> | ||
+ | |{{ Images_Cahier-201-04-052.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | <WRAP column 30%> | ||
+ | < | ||
+ | |||
+ | < | ||
+ | </ | ||
+ | <WRAP column 30%> | ||
+ | |{{ Images_Cahier-201-04-048.png? | ||
+ | </ | ||
+ | <WRAP column 30%> | ||
+ | |{{ Images_Cahier-201-04-049.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | {{Images_Cahier-101-03-004.png? | ||
+ | \\ | ||
+ | |||
+ | ===== Création d'un nouveau compte ===== | ||
+ | |||
+ | <WRAP column 22%> | ||
+ | On crée un compte pour un usager qui n'a pas d' | ||
+ | </ | ||
+ | <WRAP column 70%> | ||
+ | |{{ Images_Cahier-201-04-055.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | <WRAP column 22%> | ||
+ | On s' | ||
+ | </ | ||
+ | <WRAP column 50%> | ||
+ | |{{ Images_Cahier-201-04-056.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | ===== Vérification de la connexion à Webmail ===== | ||
+ | |||
+ | <WRAP column 46%> | ||
+ | < | ||
+ | |||
+ | < | ||
+ | </ | ||
+ | <WRAP column 46%> | ||
+ | |{{ Images_Cahier-201-04-057.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | <WRAP column 30%> | ||
+ | Le récepteur des notifications a bien reçu le courriel lui annonçant qu'un nouvel utilisateur venait de créer un compte dans DokuWiki. | ||
+ | |||
+ | ===== Instantané VirtualBox ===== | ||
+ | |||
+ | {{Images_Cahier-101-03-004.png? | ||
+ | </ | ||
+ | <WRAP column 62%> | ||
+ | |{{ Images_Cahier-201-04-058.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | <WRAP centeralign> | ||
+ | \\ | ||
+ | |||
+ | ===== Extensions pour DokuWiki ===== | ||
+ | |||
+ | La syntaxe de DokuWiki peut être étendue par des extensions. La façon dont les extensions installées sont utilisées est décrite sur leurs pages de description appropriées. | ||
+ | |||
+ | Les extensions ci-dessous sont utilisées par le DokuWiki chez https:// | ||
+ | |||
+ | // | ||
+ | |||
+ | ACL Manager by Andreas Gohr\\ | ||
+ | Add New Page by Benjamin Santalucia, Sam Wilson, Michael Braun, Gerrit Uitslag, Albert Chern\\ | ||
+ | Plain Auth Plugin by Andreas Gohr\\ | ||
+ | Avatar by Michael Hamann, Michael Klier, Gina Haeussge\\ | ||
+ | CAPTCHA Plugin by Andreas Gohr\\ | ||
+ | Toolbar Code Button by Heiko Barth\\ | ||
+ | Configuration Manager by Christopher Smith\\ | ||
+ | Extension Manager by Michael Hamann\\ | ||
+ | Gallery Plugin by Andreas Gohr\\ | ||
+ | gh plugin by Andreas Gohr\\ | ||
+ | include plugin by Michael Hamann, Gina Häussge, Christopher Smith, Michael Klier, Esther Brunner\\ | ||
+ | Info Plugin by Andreas Gohr\\ | ||
+ | Markdowku by Julian Fagir\\ | ||
+ | Move plugin by Michael Hamann, Gary Owen, Arno Puschmann, Christoph Jähnigen\\ | ||
+ | newline by xarkam\\ | ||
+ | NoWiki Plugin by Petr Blaha\\ | ||
+ | oauth plugin by Andreas Gohr\\ | ||
+ | Pagelist Plugin by Matthias Schulte, Michael Hamann, Michael Klier, Gina Haeussge\\ | ||
+ | Popularity Feedback Plugin by Andreas Gohr\\ | ||
+ | Revert Manager by Andreas Gohr\\ | ||
+ | RestructuredText plugin by Chris Green\\ | ||
+ | safefnrecode plugin by Andreas Gohr\\ | ||
+ | styling plugin by Andreas Gohr\\ | ||
+ | Tag Plugin by Michael Hamann, Gina Häussge, Christopher Smith, Michael Klier, Esther Brunner\\ | ||
+ | Translation Plugin by Andreas Gohr\\ | ||
+ | DokuWiki Upgrade Plugin by Andreas Gohr\\ | ||
+ | User Manager by Chris Smith\\ | ||
+ | Video Sharing Site Plugin by Andreas Gohr\\ | ||
+ | Wrap Plugin by Anika Henke\\ | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | ====== Mise à jour de DokuWiki ====== | ||
+ | |||
+ | ===== Restez à jour ===== | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | ===== Mise à jour ===== | ||
+ | |||
+ | On se rend dans le répertoire racine de notre DokuWiki. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# cd / | ||
+ | |||
+ | [root@tchana dokuwiki]# | ||
+ | </ | ||
+ | |||
+ | On vérifie. | ||
+ | |||
+ | < | ||
+ | [root@tchana dokuwiki]# pwd | ||
+ | |||
+ | / | ||
+ | [root@tchana dokuwiki]# | ||
+ | </ | ||
+ | |||
+ | On met à jour. Toutes les dernières modifications concernant la branche que nous utilisons seront appliquées. | ||
+ | |||
+ | < | ||
+ | [root@tchana dokuwiki]# git pull | ||
+ | |||
+ | remote: Enumerating objects: 38, done. | ||
+ | remote: Counting objects: 100% (38/38), done. | ||
+ | remote: Total 48 (delta 38), reused 38 (delta 38), pack-reused 10 | ||
+ | Unpacking objects: 100% (48/48), done. | ||
+ | From https:// | ||
+ | | ||
+ | * [new branch] | ||
+ | Already up-to-date. | ||
+ | [root@tchana dokuwiki]# | ||
+ | </ | ||
+ | |||
+ | Si des mises à jour avaient été disponibles, | ||
+ | |||
+ | ===== Ajustement des droits ===== | ||
+ | |||
+ | Après une mise à jour, il est toujours préférable d' | ||
+ | |||
+ | On renforce la sécurité de l’accès aux fichiers <wrap em> | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | < | ||
+ | [root@tchana dokuwiki]# find -L / | ||
+ | |||
+ | [root@tchana dokuwiki]# | ||
+ | </ | ||
+ | |||
+ | On répète l' | ||
+ | |||
+ | < | ||
+ | [root@tchana dokuwiki]# find -L / | ||
+ | |||
+ | [root@tchana dokuwiki]# | ||
+ | </ | ||
+ | |||
+ | On vérifie pour les fichiers, les répertoires et les fichiers cachés et de plus, " | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# ls -als / | ||
+ | |||
+ | total 132 | ||
+ | 4 drwxr-s--- | ||
+ | 0 drwxr-xr-x | ||
+ | 4 -rw-r-S--- | ||
+ | 0 drwxr-s--- | ||
+ | ... | ||
+ | 0 lrwxrwxrwx | ||
+ | ... | ||
+ | 0 lrwxrwxrwx | ||
+ | ... | ||
+ | 4 -rw-r-S--- | ||
+ | ... | ||
+ | 4 -rw-r-S--- | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | ===== Instantané VirtualBox ===== | ||
+ | |||
+ | {{Images_Cahier-101-03-004.png? | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | ====== Mise à jour des Collections ====== | ||
+ | |||
+ | ===== Introduction ===== | ||
+ | |||
+ | Présentement, | ||
+ | |||
+ | ===== Mises à jour ===== | ||
+ | |||
+ | On lance la mise à jour de la Collection. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# yum update -y nethserver-php-scl | ||
+ | |||
+ | Modules complémentaires chargés : changelog, fastestmirror, | ||
+ | ... | ||
+ | Résumé de la transaction | ||
+ | ============================================================================================ | ||
+ | Mettre à jour 1 Paquet | ||
+ | |||
+ | Taille totale des téléchargements : 96 k | ||
+ | ... | ||
+ | Mis à jour : | ||
+ | nethserver-php-scl.x86_64 0: | ||
+ | |||
+ | Terminé ! | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | La mise à jour disponible a été installée. | ||
+ | |||
+ | {{Images_icone-201-003_Note.png? | ||
+ | {{Images_Cahier-101-03-003.png? | ||
+ | |||
+ | ===== Instantané VirtualBox ===== | ||
+ | |||
+ | {{Images_Cahier-101-03-004.png? | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | ====== Mises à jour de NethServer ====== | ||
+ | |||
+ | ===== Serveur NethServer ===== | ||
+ | |||
+ | De temps à autre, il faut mettre à jour le Serveur NethServer pour diverses raisons: suite à des mises à jour des logiciels qui composent NethServer, failles de sécurité découvertes par des utilisateurs ou des développeurs, | ||
+ | |||
+ | <WRAP column 46%> | ||
+ | < | ||
+ | < | ||
+ | |{{ Images_Cahier-201-03-160.png? | ||
+ | </ | ||
+ | <WRAP column 46%> | ||
+ | \\ | ||
+ | \\ | ||
+ | À la fin de la mise à jour, **Recharger la page**. | ||
+ | |{{ Images_Cahier-201-03-161.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | ===== Instantané VirtualBox ===== | ||
+ | |||
+ | {{Images_Cahier-101-03-004.png? | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | ====== Appendices ====== | ||
+ | |||
+ | ===== Écran conventionnel de démarrage ===== | ||
+ | |||
+ | <WRAP column 45%> | ||
+ | Si nous voulons voir l' | ||
+ | |||
+ | <WRAP centeralign> | ||
+ | ''/ | ||
+ | </ | ||
+ | |{{ Images_Cahier-101-03-368.png? | ||
+ | </ | ||
+ | <WRAP column 45%> | ||
+ | |{{ Images_Cahier-101-03-367.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | ==== Suppression du paramètre rhgb ==== | ||
+ | |||
+ | Ligne originale dans le fichier ''/ | ||
+ | |||
+ | <WRAP box> | ||
+ | < | ||
+ | GRUB_CMDLINE_LINUX=" | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | Après avoir enlevé le paramètre **rhgb**. | ||
+ | |||
+ | <WRAP box> | ||
+ | < | ||
+ | GRUB_CMDLINE_LINUX=" | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | On signale le changement en régénérant le fichier de configuration. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# grub2-mkconfig -o / | ||
+ | |||
+ | Generating grub configuration file ... | ||
+ | Found linux image: / | ||
+ | Found initrd image: / | ||
+ | Found linux image: / | ||
+ | Found initrd image: / | ||
+ | Found linux image: / | ||
+ | Found initrd image: / | ||
+ | done | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | {{Images_Cahier-101-03-005.png? | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | ===== Nom du serveur dans l' | ||
+ | |||
+ | <WRAP column 50%> | ||
+ | À l' | ||
+ | |||
+ | On peut supprimer complètement l' | ||
+ | |||
+ | Pour supprimer l' | ||
+ | |||
+ | <WRAP centeralign> | ||
+ | ''/ | ||
+ | </ | ||
+ | </ | ||
+ | <WRAP column 40%> | ||
+ | |{{ Images_Cahier-101-03-340.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | et y ajouter la ligne suivante: | ||
+ | |||
+ | Par contre, si nous modifions directement ce fichier, le prochain ré-amorçage écrasera la modification lorsque le serveur assemblera les gabarits de configuration du système. | ||
+ | |||
+ | {{Images_Cahier-101-03-003.png? | ||
+ | |||
+ | Création du répertoire pour le gabarit personnalisé. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# mkdir -p / | ||
+ | |||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | On crée le fichier **91CacherNomDuServeur** et on y insère la ligne de configuration. | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | < | ||
+ | cat > / | ||
+ | |||
+ | $config[' | ||
+ | |||
+ | EOT | ||
+ | |||
+ | |||
+ | </ | ||
+ | |||
+ | On vérifie. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# cat / | ||
+ | |||
+ | $config[' | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | On signale le changement. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# expand-template / | ||
+ | |||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | On redémarre le démon httpd. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# systemctl restart httpd | ||
+ | |||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | <WRAP column 50%> | ||
+ | On se rend à l'URL de connexion à Webmail: https:// | ||
+ | Le domaine du serveur ne s' | ||
+ | </ | ||
+ | <WRAP column 40%> | ||
+ | |{{ Images_Cahier-101-03-341.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | ==== Sauvegarde ==== | ||
+ | |||
+ | On vérifie si le nom du fichier ''/ | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | < | ||
+ | NouvelleInclusion="/ | ||
+ | if grep -Fxq " | ||
+ | then | ||
+ | # L' | ||
+ | echo -e "\nLe fichier custom.include contient déjà l' | ||
+ | else | ||
+ | # L' | ||
+ | echo -e " | ||
+ | echo -e " | ||
+ | fi | ||
+ | |||
+ | |||
+ | </ | ||
+ | |||
+ | On vérifie. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# cat / | ||
+ | |||
+ | / | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | Ci-dessus, il n'y a pas de ligne vide avant __/ | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | ===== Langue à la console du serveur ===== | ||
+ | |||
+ | On affiche les langues offertes à la console du serveur. | ||
+ | |||
+ | [root@tchana ~]# localectl list-locales | grep fr_ | ||
+ | | ||
+ | fr_BE | ||
+ | fr_BE.iso88591 | ||
+ | fr_BE.iso885915@euro | ||
+ | fr_BE.utf8 | ||
+ | fr_BE@euro | ||
+ | fr_CA | ||
+ | fr_CA.iso88591 | ||
+ | fr_CA.utf8 | ||
+ | fr_CH | ||
+ | fr_CH.iso88591 | ||
+ | fr_CH.utf8 | ||
+ | fr_FR | ||
+ | fr_FR.iso88591 | ||
+ | fr_FR.iso885915@euro | ||
+ | fr_FR.utf8 | ||
+ | fr_FR@euro | ||
+ | fr_LU | ||
+ | fr_LU.iso88591 | ||
+ | fr_LU.iso885915@euro | ||
+ | fr_LU.utf8 | ||
+ | fr_LU@euro | ||
+ | [root@tchana ~]# | ||
+ | |||
+ | On ajuste la langue désirée pour l' | ||
+ | |||
+ | [root@tchana ~]# localectl set-locale LANG=fr_FR.utf8 | ||
+ | | ||
+ | [root@tchana ~]# | ||
+ | |||
+ | Les modifications entreront en vigueur après le prochain redémarrage.\\ | ||
+ | {{Images_Cahier-101-03-005.png? | ||
+ | |||
+ | À la console du serveur, __après le prochain redémarrage__, | ||
+ | |||
+ | [root@tchana ~]# ls -als toto | ||
+ | | ||
+ | ls: impossible d' | ||
+ | [root@tchana ~]# | ||
+ | \\ | ||
+ | |||
+ | ===== Langue de l' | ||
+ | |||
+ | On change la langue de l' | ||
+ | |||
+ | <WRAP column 30%> | ||
+ | **Administration | ||
+ | |{{ Images_Cahier-101-03-112.png? | ||
+ | </ | ||
+ | <WRAP column 30%> | ||
+ | \\ | ||
+ | \\ | ||
+ | **ADD**. | ||
+ | |{{ Images_Cahier-101-03-113.png? | ||
+ | </ | ||
+ | <WRAP column 30%> | ||
+ | \\ | ||
+ | \\ | ||
+ | **APPLY CHANGES**. | ||
+ | |{{ Images_Cahier-101-03-114.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | <WRAP column 22%> | ||
+ | \\ | ||
+ | Le RPM // | ||
+ | |{{ Images_Cahier-101-03-115.png? | ||
+ | </ | ||
+ | <WRAP column 22%> | ||
+ | \\ | ||
+ | \\ | ||
+ | **Reload page**. | ||
+ | |{{ Images_Cahier-101-03-116.png? | ||
+ | </ | ||
+ | <WRAP column 22%> | ||
+ | On se __déconnecte/ | ||
+ | |{{ Images_Cahier-101-03-117.png? | ||
+ | </ | ||
+ | <WRAP column 22%> | ||
+ | < | ||
+ | < | ||
+ | |{{ Images_Cahier-101-03-118.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | ===== Table de mappe de clavier ===== | ||
+ | |||
+ | On affiche les différentes mappes de clavier(( **Table de mappe de clavier**: n.f. Disposition des touches d'un clavier.\\ // | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# localectl list-keymaps | grep ca | ||
+ | |||
+ | ca | ||
+ | ca-eng | ||
+ | ca-fr-dvorak | ||
+ | ca-fr-legacy | ||
+ | ca-multi | ||
+ | ca-multix | ||
+ | dvorak-ca-fr | ||
+ | es-cat | ||
+ | ph-capewell-dvorak | ||
+ | ph-capewell-qwerf2k6 | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | On active le clavier // | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# localectl set-keymap ca-multi | ||
+ | |||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | On vérifie. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# localectl | ||
+ | |||
+ | | ||
+ | VC Keymap: ca-multi | ||
+ | X11 Layout: us | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | \\ | ||
+ | |||
+ | ===== Fermeture automatique de session (session timeout) ===== | ||
+ | |||
+ | // | ||
+ | Par défaut //(à partir de NethServer 7.5.1804)//, | ||
+ | |||
+ | La commande ci-dessous définit **2** heures de délai d' | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# config setprop httpd-admin MaxSessionIdleTime 7200 MaxSessionLifeTime 57600 | ||
+ | |||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | Désactivation des délais. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# config setprop httpd-admin MaxSessionIdleTime '' | ||
+ | |||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | |||
+ | ===== Fuseau horaire ===== | ||
+ | |||
+ | Pour le fuseau horaire, il existe un fichier pour // | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# ls -ls / | ||
+ | |||
+ | 4 -rw-r--r-- | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | ==== Changement du fuseau horaire ==== | ||
+ | |||
+ | On affiche le fuseau horaire actuel. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# ls -l / | ||
+ | |||
+ | lrwxrwxrwx 1 root root 37 19 mai 23:48 / | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | On change le fuseau horaire pour celui de Montréal. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# timedatectl set-timezone America/ | ||
+ | |||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | On vérifie. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# ls -l / | ||
+ | |||
+ | lrwxrwxrwx 1 root root 38 22 mai 14:02 / | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | Voilà! Le fuseau horaire // | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | ===== Certificat Let's Encrypt ===== | ||
+ | |||
+ | ==== Description ==== | ||
+ | |||
+ | Un certificat émis par l' | ||
+ | |||
+ | // | ||
+ | Let's Encrypt est une autorité de certification //(CA)// lancée le 3 décembre 2015 //(Bêta Version Publique)// | ||
+ | |||
+ | === Examen du certificat === | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | Si la demande de certificat a fonctionnée sans erreur, essayez de vous connecter à la page de l' | ||
+ | |||
+ | On se connecte à l' | ||
+ | |||
+ | <WRAP column 30%> | ||
+ | < | ||
+ | < | ||
+ | |{{ Images_Cahier-101-03-369.png? | ||
+ | </ | ||
+ | <WRAP column 30%> | ||
+ | < | ||
+ | < | ||
+ | |{{ Images_Cahier-101-03-370.png? | ||
+ | </ | ||
+ | <WRAP column 30%> | ||
+ | \\ | ||
+ | **Plus d' | ||
+ | |{{ Images_Cahier-101-03-371.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | <WRAP center> | ||
+ | <WRAP column 45%> | ||
+ | \\ | ||
+ | \\ | ||
+ | < | ||
+ | < | ||
+ | |{{ Images_Cahier-101-03-372.png? | ||
+ | </ | ||
+ | <WRAP column 45%> | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | |{{ Images_Cahier-101-03-373.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | <WRAP center> | ||
+ | <WRAP column 45%> | ||
+ | \\ | ||
+ | \\ | ||
+ | < | ||
+ | < | ||
+ | |{{ Images_Cahier-101-03-374.png? | ||
+ | </ | ||
+ | <WRAP column 45%> | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | |{{ Images_Cahier-101-03-375.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | ==== Vérification par Qualsys SSLLabs ==== | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | Une fois que vous avez obtenu votre certificat, testez-le en vous rendant chez Qualsys SSLLabs, [[https:// | ||
+ | Soumettez le nom FQDN de votre domaine pour vérifier que le certificat fonctionne correctement. | ||
+ | |||
+ | <WRAP center> | ||
+ | <WRAP column 45%> | ||
+ | // | ||
+ | **micronator-101.org | ||
+ | |{{ Images_Cahier-101-03-376.png? | ||
+ | </ | ||
+ | <WRAP column 45%> | ||
+ | < | ||
+ | < | ||
+ | |{{ Images_Cahier-101-03-377.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | ===== Changement du mot de passe de root ===== | ||
+ | |||
+ | // | ||
+ | Réinitialiser le mot de passe de root est normalement une tâche simple si vous êtes déjà connecté avec les privilèges de root. Toutefois, si vous oubliez le mot de passe et devez le changer, les choses deviennent un peu plus difficiles.\\ | ||
+ | Le processus a changé de la version 6 de CentOS/RHEL //(Red Hat Enterprise Linux)// à la version 7. Auparavant, vous démarriez en **mode mono-utilisateur**, | ||
+ | |||
+ | {{Images_Cahier-101-03-003.png? | ||
+ | |||
+ | Si votre système Linux est en cours d' | ||
+ | |||
+ | Pour **CentOS 7**, le menu de démarrage vous laissera 5 secondes pour sélectionner le noyau du système d’exploitation à démarrer. Ces 5 secondes sont importantes, | ||
+ | |||
+ | Dans le menu de démarrage, appuyez sur " | ||
+ | |||
+ | {{ Images_Cahier-101-03-378.png? | ||
+ | \\ | ||
+ | |||
+ | Dans les options de // | ||
+ | |||
+ | < | ||
+ | rd.break | ||
+ | </ | ||
+ | |||
+ | {{ Images_Cahier-101-03-379.png? | ||
+ | \\ | ||
+ | |||
+ | Appuyez sur **[Ctrl]** + **[x]** pour démarrer avec ces options qui vous amèneront à l' | ||
+ | |||
+ | {{ Images_Cahier-101-03-380.png? | ||
+ | \\ | ||
+ | |||
+ | À ce stade, le système de fichiers racine est monté en mode lecture seule //(ro)// dans le répertoire ''/ | ||
+ | |||
+ | < | ||
+ | switch_root:/# | ||
+ | |||
+ | switch_root:/# | ||
+ | </ | ||
+ | |||
+ | {{ Images_Cahier-101-03-381.png? | ||
+ | \\ | ||
+ | |||
+ | Une fois le système de fichiers remonté, changez-le en une //**prison chroot**// afin que le répertoire ''/ | ||
+ | |||
+ | < | ||
+ | switch_root:/# | ||
+ | |||
+ | sh-4.2# | ||
+ | </ | ||
+ | |||
+ | {{ Images_Cahier-101-03-382.png? | ||
+ | \\ | ||
+ | |||
+ | À partir d'ici, le mot de passe de root peut être réinitialisé à l’aide de la commande '' | ||
+ | |||
+ | < | ||
+ | sh-4.2# passwd | ||
+ | |||
+ | Changing password for user root. | ||
+ | New password: Nouveau-mot-de-passe-de-root | ||
+ | Retype new passwd: Nouveau-mot-de-passe-de-root | ||
+ | passwd: all authentification tokens updated successfully. | ||
+ | sh-4.2# | ||
+ | </ | ||
+ | |||
+ | {{ Images_Cahier-101-03-383.png? | ||
+ | \\ | ||
+ | |||
+ | Si vous n' | ||
+ | |||
+ | On crée le fichier ''/ | ||
+ | |||
+ | < | ||
+ | sh-4.2# touch / | ||
+ | |||
+ | sh-4.2# | ||
+ | </ | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | On quitte l' | ||
+ | |||
+ | < | ||
+ | sh-4.2# exit | ||
+ | |||
+ | exit | ||
+ | sh-4.2# | ||
+ | </ | ||
+ | |||
+ | On quitte le shell racine initramfs //(peut prendre un certain temps, être patient...)// | ||
+ | |||
+ | < | ||
+ | sh-4.2# exit | ||
+ | |||
+ | logout | ||
+ | ... | ||
+ | </ | ||
+ | |||
+ | ==== Vérification ==== | ||
+ | |||
+ | __À la console du serveur__, vous devriez pouvoir vous connecter et utiliser le système avec le nouveau mot de passe que vous avez créé. | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | ===== ERROR Failed to send host log message ===== | ||
+ | |||
+ | Cette erreur s' | ||
+ | |||
+ | {{ Images_Cahier-101-03-384.png? | ||
+ | \\ | ||
+ | |||
+ | <WRAP center> | ||
+ | <WRAP column 45%> | ||
+ | < | ||
+ | < | ||
+ | |{{ Images_Cahier-101-03-385.png? | ||
+ | \\ | ||
+ | Au retour, on amorce le Serveur NethServer et le message ne s' | ||
+ | </ | ||
+ | <WRAP column 45%> | ||
+ | \\ | ||
+ | **Affichage | ||
+ | |{{ Images_Cahier-101-03-386.png? | ||
+ | </ | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | ===== Martian source ===== | ||
+ | |||
+ | Si dans le fichier journal ''/ | ||
+ | |||
+ | < | ||
+ | ...IPv4: martian source 192.168.1.1... | ||
+ | ...IPv4: martian source 192.168.1.1... | ||
+ | ...IPv4: martian source 192.168.1.1... | ||
+ | </ | ||
+ | |||
+ | ==== Passerelle du réseau de la carte enp0s3 ==== | ||
+ | |||
+ | On trouve notre passerelle en lançant un '' | ||
+ | |||
+ | < | ||
+ | [root@dorgee ~]# traceroute google.com | ||
+ | |||
+ | traceroute to google.com (172.217.165.14), | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | [root@dorgee ~]# | ||
+ | </ | ||
+ | L' | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | <WRAP column 45%> | ||
+ | **Configuration | ||
+ | |||
+ | On change l'IP de la passerelle pour l'IP de l' | ||
+ | |||
+ | **SOUMETTRE**. | ||
+ | </ | ||
+ | <WRAP column 45%> | ||
+ | |{{ Images_Cahier-101-03-395.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | ==== Serveurs DNS ==== | ||
+ | |||
+ | // | ||
+ | ... Le **DNS de Cloudflare** est un bon DNS, car il est le plus rapide, mais aussi parce qu'ils ont pris les devants et s' | ||
+ | Le principal avantage bien sûr, c'est que contrairement au DNS de Google qui permet de mieux vous profiler pour vous balancer de la pub, on sait que Cloudflare ne trempe pas là dedans. Cela reste une boîte américaine, | ||
+ | |||
+ | // | ||
+ | |||
+ | //Autre référence:// | ||
+ | | ||
+ | |||
+ | // | ||
+ | |||
+ | <WRAP center> | ||
+ | <WRAP column 45%> | ||
+ | |{{ Images_Cahier-101-03-396.png? | ||
+ | </ | ||
+ | <WRAP column 45%> | ||
+ | |{{ Images_Cahier-101-03-397.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | <WRAP column 45%> | ||
+ | **Configuration | ||
+ | |||
+ | On ajuste le //**DNS Primaire**// | ||
+ | |||
+ | {{Images_Cahier-101-03-005.png? | ||
+ | |||
+ | Le serveur //**DNS secondaire**// | ||
+ | |||
+ | **Soumettre**. | ||
+ | </ | ||
+ | <WRAP column 45%> | ||
+ | |{{ Images_Cahier-101-03-398.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | Si votre FAI filtre l' | ||
+ | [[https:// | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | ===== Serveur de production ===== | ||
+ | |||
+ | {{ Images_Cahier-201-04-102.png? | ||
+ | Une fois que vous maîtrisez tous les aspects de: DokuWiki, Let's Encrypt, Fail2ban, ClamAV et de BackupPC, vous pouvez créer un réseau de Production incluant un serveur DokuWiki, un serveur de sauvegardes et un serveur de développement; | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | \\ | ||
+ | {{NS-101_002_Banniere_Victoire.png? | ||
+ | \\ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ====== Crédits ====== | ||
+ | |||
+ | © 2019 RF-232\\ | ||
+ | Auteur: Michel-André\\ | ||
+ | Remerciement: | ||
+ | Intégré par: Michel-André Robillard CLP\\ | ||
+ | Contact: michelandre at micronator.org\\ | ||
+ | |||
+ | Répertoire de ce document: < | ||
+ | |||
+ | Historique des modifications: | ||
+ | |||
+ | ^Version^Date^Commentaire^Auteur| | ||
+ | |RC-0.0.1|2019-06-07|Début.|Michel-André| | ||
+ | |0.1.0|2019-08-15|Ajustements pour DokuWiki.|Michel-André| | ||
+ | |0.1.1|2019-08-19|Suppression du " | ||
+ | |12345678901| | |12345678901| | ||
+ | |||
+ | |||
+ | < | ||
+ | |||
+ | ===== AVIS DE NON-RESPONSABILITÉ ===== | ||
+ | |||
+ | Ce document est uniquement destiné à informer. Les informations, | ||
+ | |||
+ | RF‑232 ne peut être tenu pour responsable de dommages de quelque nature que ce soit, y compris des dommages directs ou indirects, ainsi que des dommages consécutifs résultant de l' | ||
+ | |||
+ | Chaque internaute doit prendre toutes les mesures appropriées //(mettre à jour régulièrement son logiciel antivirus, ne pas ouvrir des documents suspects de source douteuse ou non connue)// de façon à protéger le contenu de son ordinateur de la contamination d' | ||
+ | |||
+ | Toute reproduction interdite | ||
+ | Vous reconnaissez et acceptez que tout le contenu de ce document, incluant mais sans s’y limiter, le texte et les images, sont protégés par le droit d’auteur, les marques de commerce, les marques de service, les brevets, les secrets industriels et les autres droits de propriété intellectuelle. Sauf autorisation expresse de RF-232, vous acceptez de ne pas vendre, délivrer une licence, louer, modifier, distribuer, copier, reproduire, transmettre, | ||
+ | |||
+ | ==== Avertissement==== | ||
+ | |||
+ | Bien que nous utilisions ici un vocabulaire issu des techniques informatiques, | ||
+ | \\ | ||
+ | \\ |