nethserver_201_cahier_05_moodle
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_05_moodle [2019-08-29 13:53] – michelandre | nethserver_201_cahier_05_moodle [2025-01-12 19:30] (Version actuelle) – modification externe 127.0.0.1 | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
+ | \\ | ||
+ | [[cours_nethserver_101|{{ Images_Cahier-201-05-000.png? | ||
+ | \\ | ||
+ | ====== Description générale ====== | ||
+ | Le **Cahier-05** du cours **NethServer-201** décrit: l' | ||
+ | |||
+ | // | ||
+ | Moodle est une plateforme d' | ||
+ | |||
+ | Outre la création de cours à l'aide d' | ||
+ | |||
+ | À un système de gestion de contenu //(SGC - Content Management System ou CMS)//, Moodle ajoute aussi de nombreux outils d' | ||
+ | |||
+ | Grâce à son architecture modulaire, Moodle profite d' | ||
+ | |||
+ | //Page d' | ||
+ | // | ||
+ | // | ||
+ | |||
+ | ==== Version LTS ==== | ||
+ | |||
+ | Les versions LTS sont une version spéciale de Moodle qui paraît tous les deux ans en mai. Si vous souhaitez réduire vos coûts de maintenance, | ||
+ | |||
+ | Pour les organisations disposant de ressources techniques limitées, d'une utilisation intensive et de cas d' | ||
+ | \\ | ||
+ | |||
+ | ===== But final de ce cahier ===== | ||
+ | |||
+ | {{ Images_Cahier-201-05-002.png? | ||
+ | \\ | ||
+ | |||
+ | ===== 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-05-003.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.org ==== | ||
+ | |||
+ | Serveur passerelle pour les connexions à l' | ||
+ | Serveur DHCP pour tout le réseau LOCAL. | ||
+ | |||
+ | ==== tchana.micronator-dev.org ==== | ||
+ | |||
+ | Serveur virtuel sous VirtualBox Version 6.0.4 r128413 (Qt5.6.2). | ||
+ | |||
+ | ==== Répertoire d' | ||
+ | |||
+ | Nous installerons Moodle 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 Moodle.\\ | ||
+ | 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 46%> | ||
+ | '' | ||
+ | |||
+ | Les CNAME de notre Serveur NethServer virtuel LOCAL sont présents. | ||
+ | </ | ||
+ | <WRAP column 46%> | ||
+ | |{{ 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 72%> | ||
+ | |{{ 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-05-004.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-05-005.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 ====== | ||
+ | |||
+ | ===== ClamAV ===== | ||
+ | |||
+ | // | ||
+ | Il n'y a pas beaucoup de virus conçus pour les distributions Linux et, par conséquent, | ||
+ | // | ||
+ | |||
+ | ==== Installation du référentiel stephdl ==== | ||
+ | |||
+ | // | ||
+ | |||
+ | Si ce n'est déjà fait, vous devez installer le 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. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# rpm -qa | grep stephdl | ||
+ | |||
+ | nethserver-stephdl-1.0.7-1.ns7.sdl.noarch | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | ==== Installation de ClamAV ==== | ||
+ | |||
+ | Si ce n'est déjà fait, on installe ClamAV. | ||
+ | |||
+ | <WRAP box> | ||
+ | < | ||
+ | [root@tchana ~]# yum install -y nethserver-clamscan --enablerepo=stephdl | ||
+ | |||
+ | ... | ||
+ | Transaction Summary | ||
+ | ============================================================================================ | ||
+ | Install | ||
+ | Upgrade | ||
+ | |||
+ | Total download size: 60 k | ||
+ | ... | ||
+ | Installed: | ||
+ | nethserver-clamscan.noarch 0: | ||
+ | |||
+ | Dependency Installed: | ||
+ | clamav-scanner-systemd.x86_64 0: | ||
+ | |||
+ | Complete! | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | |||
+ | ==== Mise à jour ==== | ||
+ | |||
+ | On peut manuellement mettre à jour la BD des virus. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# freshclam | ||
+ | |||
+ | ClamAV update process started at Sat Aug 17 20:51:45 2019 | ||
+ | main.cvd is up to date (version: 58, sigs: 4566249, f-level: 60, builder: sigmgr) | ||
+ | nonblock_connect: | ||
+ | Can't connect to port 80 of host database.clamav.net (IP: 2606: | ||
+ | WARNING: getfile: daily-25425.cdiff not found on database.clamav.net (IP: 104.16.218.84) | ||
+ | WARNING: getpatch: Can't download daily-25425.cdiff from database.clamav.net | ||
+ | WARNING: getfile: daily-25425.cdiff not found on database.clamav.net (IP: 104.16.218.84) | ||
+ | WARNING: getpatch: Can't download daily-25425.cdiff from database.clamav.net | ||
+ | WARNING: getfile: daily-25425.cdiff not found on database.clamav.net (IP: 104.16.218.84) | ||
+ | WARNING: getpatch: Can't download daily-25425.cdiff from database.clamav.net | ||
+ | WARNING: Incremental update failed, trying to download daily.cvd | ||
+ | nonblock_connect: | ||
+ | Can't connect to port 80 of host database.clamav.net (IP: 2606: | ||
+ | Downloading daily.cvd [100%] | ||
+ | daily.cvd updated (version: 25544, sigs: 1725545, f-level: 63, builder: raynman) | ||
+ | Downloading bytecode-329.cdiff [100%] | ||
+ | Downloading bytecode-330.cdiff [100%] | ||
+ | bytecode.cld updated (version: 330, sigs: 94, f-level: 63, builder: neo) | ||
+ | Database updated (6291888 signatures) from database.clamav.net (IP: 104.16.219.84) | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | ==== Configuration ==== | ||
+ | |||
+ | Si ce n'est déjà fait, on configure Clamscan. | ||
+ | |||
+ | On se logue à l' | ||
+ | |||
+ | // | ||
+ | |||
+ | {{ Images_Cahier-201-01-005.png? | ||
+ | |||
+ | ☑ //**Activer l' | ||
+ | On coche cette option. | ||
+ | |||
+ | On choisit l' | ||
+ | |||
+ | ☑ // | ||
+ | On coche cette option. | ||
+ | |||
+ | ☑ //**Oui, je suis totalement sûr**// | ||
+ | On coche cette option. | ||
+ | |||
+ | Comme on le voit, la BD des virus est à jour. | ||
+ | |||
+ | **SOUMETTRE**. | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | <WRAP column 30%> | ||
+ | Onglet // | ||
+ | |{{ Images_Cahier-201-01-006.png? | ||
+ | </ | ||
+ | <WRAP column 30%> | ||
+ | Onglet // | ||
+ | |{{ Images_Cahier-201-01-007.png? | ||
+ | </ | ||
+ | <WRAP column 30%> | ||
+ | Onglet // | ||
+ | |{{ Images_Cahier-201-01-008.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | <WRAP column 30%> | ||
+ | < | ||
+ | |||
+ | < | ||
+ | </ | ||
+ | <WRAP column 30%> | ||
+ | |{{ Images_Cahier-201-01-009.png? | ||
+ | </ | ||
+ | <WRAP column 30%> | ||
+ | |{{ Images_Cahier-201-01-010.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | ==== Lancement manuel d'un balayage ==== | ||
+ | |||
+ | À la console du Serveur NethServer, on peut lancer un balayage en __arrière-plan__ en ajoutant **<wrap em>&</ | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# / | ||
+ | |||
+ | [1] 25238 | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | On vérifie. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# ps aux | grep -i nethserver-clamscan | ||
+ | |||
+ | root | ||
+ | root | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | <WRAP column 55%> | ||
+ | L' | ||
+ | </ | ||
+ | <WRAP column 35%> | ||
+ | |{{ Images_Cahier-201-01-011.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | Lorsque le balayage est terminé, le message ci-dessous apparaît à la console du Serveur NethServer. | ||
+ | |||
+ | <WRAP box> | ||
+ | < | ||
+ | [root@tchana ~]# | ||
+ | [1]+ Done / | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | <WRAP column 46%> | ||
+ | On peut examiner le résultat du balayage en allant à: | ||
+ | |||
+ | // | ||
+ | |||
+ | {{Images_icone-201-003_Note.png? | ||
+ | </ | ||
+ | <WRAP column 46%> | ||
+ | |{{ Images_Cahier-201-01-012.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | ===== 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.6-1.ns7.sdl.x86_64 | ||
+ | ... | ||
+ | Vérification : php72-php-xml-7.2.21-1.el7.remi.x86_64 | ||
+ | ... | ||
+ | Vérification : php73-php-json-7.3.8-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? | ||
+ | |||
+ | On vérifie la présence du référentiel // | ||
+ | |||
+ | < | ||
+ | [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 17 août 21:00 php56 | ||
+ | 0 dr-xr-xr-x 3 root root 32 17 août 21:00 php70 | ||
+ | 0 dr-xr-xr-x 3 root root 32 17 août 21:00 php71 | ||
+ | 0 dr-xr-xr-x 3 root root 32 17 août 21:00 php72 | ||
+ | 0 dr-xr-xr-x 3 root root 32 17 août 21:00 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 17 août 21:05 / | ||
+ | [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- | ||
+ | |||
+ | scl-utils-20130529-19.el7.x86_64 | ||
+ | nethserver-php-scl-1.2.6-1.ns7.sdl.x86_64 | ||
+ | centos-release-scl-rh-2-3.el7.centos.noarch | ||
+ | centos-release-scl-2-3.el7.centos.noarch | ||
+ | [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.21 (cli) (built: Jul 30 2019 14:10:18) ( NTS ) | ||
+ | Copyright (c) 1997-2018 The PHP Group | ||
+ | Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies | ||
+ | with Zend OPcache v7.2.21, Copyright (c) 1999-2018, by 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? | ||
+ | \\ | ||
+ | |||
+ | Ci-dessous, le caractère <wrap em>></ | ||
+ | {{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? | ||
+ | \\ | ||
+ | |||
+ | On vérifie la configuration de // | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# config show php72 | ||
+ | |||
+ | php72=configuration | ||
+ | AllowUrlFopen=Off | ||
+ | ExposePhp=0 | ||
+ | MaxExecutionTime=30 | ||
+ | MaxFileUpload=20 | ||
+ | MaxInputTime=60 | ||
+ | MemoryLimit=250 | ||
+ | PostMaxSize=100 | ||
+ | UploadMaxFilesize=75 | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | \\ | ||
+ | |||
+ | ===== Collection MariaDB 10.2 ===== | ||
+ | |||
+ | // | ||
+ | |||
+ | La Collection // | ||
+ | |||
+ | ==== Fin de vie ==== | ||
+ | |||
+ | // | ||
+ | |||
+ | La Foundation MariaDB peut décider de maintenir les versions sélectionnées au-delà de la période normale de 5 ans (//fin de vie//(( **Fin de vie**// | ||
+ | // | ||
+ | \\ \\ ))//)// si leur utilisation est exceptionnellement répandue. Vu que la version //MariaDB 5.5//, incluse dans plusieurs distributions Linux importantes, | ||
+ | |||
+ | <WRAP column 50%> | ||
+ | Vu que la version //MariaDB 10.2// est assurée d'une durée de vie __jusqu' | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# rpm -qa | grep mariadb | ||
+ | |||
+ | mariadb-server-5.5.60-1.el7_5.x86_64 | ||
+ | mariadb-5.5.60-1.el7_5.x86_64 | ||
+ | mariadb-libs-5.5.60-1.el7_5.x86_64 | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | </ | ||
+ | <WRAP column 40%> | ||
+ | |{{ Images_Cahier-201-01-016.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | ==== Prérequis pour l' | ||
+ | |||
+ | L' | ||
+ | [[nethserver_201_cahier_05_moodle# | ||
+ | . | ||
+ | |||
+ | ==== Installation de la Collection ==== | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# yum install -y --enablerepo=stephdl nethserver-rh-mariadb102 | ||
+ | |||
+ | ... | ||
+ | Résumé de la transaction | ||
+ | ============================================================================================ | ||
+ | Installation | ||
+ | |||
+ | Taille totale des téléchargements : 27 M | ||
+ | Taille d' | ||
+ | ... | ||
+ | Installé : | ||
+ | nethserver-rh-mariadb102.noarch 0: | ||
+ | |||
+ | Dépendances installées : | ||
+ | rh-mariadb102.x86_64 0:3.0-5.el7 | ||
+ | rh-mariadb102-mariadb.x86_64 1: | ||
+ | ... | ||
+ | rh-mariadb102-runtime.x86_64 0:3.0-5.el7 | ||
+ | |||
+ | Terminé ! | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | Vérification | ||
+ | |||
+ | On affiche les Collections installées. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# scl -l | ||
+ | |||
+ | php56 | ||
+ | php70 | ||
+ | php71 | ||
+ | php72 | ||
+ | php73 | ||
+ | rh-mariadb102 | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | La Collection a été installée dans le répertoire ''/ | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# ls -als /opt/rh | ||
+ | |||
+ | total 0 | ||
+ | 0 drwxr-xr-x | ||
+ | 0 drwxr-xr-x. 5 root root 46 17 août 21:00 .. | ||
+ | 0 dr-xr-xr-x | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | Les propriétés de la Collection. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# config show rh-mariadb102-mariadb | ||
+ | |||
+ | rh-mariadb102-mariadb=configuration | ||
+ | LocalNetworkingOnly=no | ||
+ | MaxAllowedPacket=16M | ||
+ | TCPPort=3312 | ||
+ | access=private | ||
+ | status=enabled | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | {{Images_icone-201-003_Note.png? | ||
+ | |||
+ | On vérifie que le démon soit activé. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# systemctl list-unit-files | grep mariadb | ||
+ | |||
+ | mariadb.service | ||
+ | rh-mariadb102-mariadb.service | ||
+ | rh-mariadb102-mariadb@.service | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | On vérifie que le démon soit en exécution. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# ps aux | grep mariadb102 | ||
+ | |||
+ | mysql | ||
+ | root 5716 0.0 0.0 112736 | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | ==== Journal ==== | ||
+ | |||
+ | Le journal pour cette Collection est situé dans le fichier ''/ | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# ls -ls / | ||
+ | |||
+ | 12 -rw-rw---- 1 mysql mysql 7248 17 août 21:17 / | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | ==== Usage ==== | ||
+ | |||
+ | {{Images_icone-201-002_Lumiere.png? | ||
+ | |||
+ | Stéphane a créé plusieurs raccourcis pour faciliter l' | ||
+ | |||
+ | <WRAP box> | ||
+ | < | ||
+ | mysql102 | ||
+ | mysqladmin102 | ||
+ | mysqlbinlog102 | ||
+ | mysqlcheck102 | ||
+ | mysql_config_editor102 | ||
+ | mysqld_multi102 | ||
+ | mysqldump102 | ||
+ | mysqlimport102 | ||
+ | mysql_plugin102 | ||
+ | mysqlshow102 | ||
+ | mysqlslap102 | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | Si vous voulez lancer MariaDB 10.2 depuis votre terminal, utilisez la commande suivante. | ||
+ | |||
+ | <WRAP box> | ||
+ | < | ||
+ | | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | ==== Mise à jour de la Collection ==== | ||
+ | |||
+ | Nous utilisons pour NS7, le référentiel // | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# yum update -y rh-mariadb102-mariadb --enablerepo=stephdl | ||
+ | |||
+ | Modules complémentaires chargés : changelog, fastestmirror, | ||
+ | Loading mirror speeds from cached hostfile | ||
+ | * ce-base: mirror.net.cen.ct.gov | ||
+ | * ce-extras: mirror.net.cen.ct.gov | ||
+ | * ce-sclo-rh: mirror.net.cen.ct.gov | ||
+ | * ce-sclo-sclo: | ||
+ | * ce-updates: mirror.net.cen.ct.gov | ||
+ | * epel: mirror.siena.edu | ||
+ | * nethforge: mirror.nethserver.org | ||
+ | * nethserver-base: | ||
+ | * nethserver-updates: | ||
+ | * remi-safe: mirror.team-cymru.com | ||
+ | No packages marked for update | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | {{Images_icone-201-004_Triangle.png? | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | ===== Installation de git ===== | ||
+ | |||
+ | On installe git qui nous aidera pour les mises à jour de notre version Moodle. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# yum install -y git | ||
+ | |||
+ | ... | ||
+ | Installation | ||
+ | |||
+ | Taille totale des téléchargements : 4.5 M | ||
+ | Taille d' | ||
+ | ... | ||
+ | Installé: | ||
+ | git.x86_64 0: | ||
+ | |||
+ | Dépendance(s) installée(s) : | ||
+ | perl-Error.noarch 1: | ||
+ | perl-TermReadKey.x86_64 0: | ||
+ | |||
+ | Terminé ! | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | \\ | ||
+ | |||
+ | ===== Création de l' | ||
+ | |||
+ | **Gestion -> Hôtes virtuels -> CRÉER NOUVEAU ->** onglet | ||
+ | |||
+ | <WRAP column 46%> | ||
+ | |{{ Images_Cahier-201-05-006.png? | ||
+ | |||
+ | // | ||
+ | On peut utiliser n' | ||
+ | |||
+ | C'est dans ce répertoire qu'on installera Moodle. | ||
+ | |||
+ | On entre les informations demandées. | ||
+ | |||
+ | **-> SOUMETTRE**. | ||
+ | </ | ||
+ | <WRAP column 46%> | ||
+ | |{{ Images_Cahier-201-05-007.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | <WRAP column 46%> | ||
+ | \\ | ||
+ | \\ | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | |{{ Images_Cahier-201-05-008.png? | ||
+ | </ | ||
+ | <WRAP column 46%> | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | |{{ Images_Cahier-201-05-009.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | <WRAP column 20%> | ||
+ | On vérifie le résultat. | ||
+ | </ | ||
+ | <WRAP column 72%> | ||
+ | |{{ Images_Cahier-201-05-010.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | ==== Vérification du répertoire moodle ==== | ||
+ | |||
+ | La création de l' | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# ls -alsd / | ||
+ | |||
+ | 0 drwxr-sr-x 2 ftp apache 6 17 août 21:31 / | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | {{Images_icone-201-003_Note.png? | ||
+ | |||
+ | On change le propriétaire du répertoire. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# chown apache / | ||
+ | |||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | On vérifie. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# ls -alsd / | ||
+ | |||
+ | 0 drwxr-sr-x 2 apache apache 6 17 août 21:31 / | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | \\ | ||
+ | |||
+ | ==== Création d'une entrée DNS pour l' | ||
+ | |||
+ | <WRAP column 30%> | ||
+ | **Configuration -> DNS ->** onglet **Hôtes -> CRÉER NOUVEAU**. | ||
+ | </ | ||
+ | <WRAP column 62%> | ||
+ | |{{ Images_Cahier-201-05-011.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | <WRAP column 46%> | ||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | Le //**Nom d' | ||
+ | |||
+ | L'// | ||
+ | |||
+ | **-> SOUMETTRE**. | ||
+ | </ | ||
+ | <WRAP column 46%> | ||
+ | |{{ Images_Cahier-201-05-012.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | <WRAP column 20%> | ||
+ | On vérifie le résultat. | ||
+ | |||
+ | Si on utilise une machine virtuelle d'un Cahier précédent, | ||
+ | </ | ||
+ | <WRAP column 72%> | ||
+ | |{{ Images_Cahier-201-05-013.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | ==== Configuration de la messagerie électronique ==== | ||
+ | |||
+ | Si on veut que Moodle puisse envoyer et recevoir des courriels, il faut configurer le domaine de l' | ||
+ | |||
+ | <WRAP column 46%> | ||
+ | **Configuration -> Messagerie électronique ->** onglet | ||
+ | |{{ Images_Cahier-201-05-014.png? | ||
+ | </ | ||
+ | <WRAP column 46%> | ||
+ | < | ||
+ | < | ||
+ | |{{ Images_Cahier-201-05-015.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | <WRAP column 20%> | ||
+ | On vérifie le résultat. | ||
+ | </ | ||
+ | <WRAP column 72%> | ||
+ | |{{ Images_Cahier-201-05-016.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | ==== Création d'un alias pour l' | ||
+ | |||
+ | Il nous faut créer un alias de messagerie pour l' | ||
+ | |||
+ | <WRAP column 46%> | ||
+ | \\ | ||
+ | \\ | ||
+ | **Gestion -> Adresse mail ->** onglet | ||
+ | |{{ Images_Cahier-201-05-017.png? | ||
+ | </ | ||
+ | <WRAP column 46%> | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | |{{ Images_Cahier-201-05-018.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | <WRAP column 20%> | ||
+ | On vérifie le résultat. | ||
+ | </ | ||
+ | <WRAP column 72%> | ||
+ | |{{ Images_Cahier-201-05-019.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | L' | ||
+ | <WRAP centeralign> | ||
+ | https:// | ||
+ | ou\\ | ||
+ | https:// | ||
+ | </ | ||
+ | \\ | ||
+ | |||
+ | ===== Redirection par le module Proxy inverse ===== | ||
+ | |||
+ | // | ||
+ | |||
+ | On installe le module //Proxy Inverse// qui s' | ||
+ | |||
+ | <WRAP column 30%> | ||
+ | **Administration -> Gestionnaire des logiciels ->** onglet **Disponible ->** cocher **Proxy inverse -> AJOUTER**. | ||
+ | </ | ||
+ | <WRAP column 62%> | ||
+ | |{{ Images_Cahier-201-05-020.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | <WRAP column 30%> | ||
+ | \\ | ||
+ | **APPLIQUER LES CHANGEMENTS**. | ||
+ | |{{ Images_Cahier-201-05-021.png? | ||
+ | </ | ||
+ | <WRAP column 30%> | ||
+ | \\ | ||
+ | **Recharger la page**. | ||
+ | |{{ Images_Cahier-201-05-022.png? | ||
+ | </ | ||
+ | <WRAP column 30%> | ||
+ | Le nouveau menu //**Proxy inverse**// est disponible. | ||
+ | |{{ Images_Cahier-201-05-023.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | ==== Configuration du mandataire inversé ==== | ||
+ | |||
+ | <WRAP column 46%> | ||
+ | **Passerelle -> Mandataire inverse ->** onglet **Hôtes virtuels -> CRÉER NOUVEAU**. | ||
+ | {{ Images_Cahier-201-05-024.png? | ||
+ | \\ | ||
+ | On configure le Serveur NethServer en tant que // | ||
+ | <WRAP centeralign> | ||
+ | **moodle.micronator-dev.org**. | ||
+ | </ | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | <WRAP column 46%> | ||
+ | |{{ Images_Cahier-201-05-025.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | <WRAP column 20%> | ||
+ | On vérifie le résultat. | ||
+ | </ | ||
+ | <WRAP column 72%> | ||
+ | |{{ Images_Cahier-201-05-026.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | ==== Vérification de la connexion redirigée et sécurisée ==== | ||
+ | |||
+ | {{Images_Cahier-101-03-003.png? | ||
+ | On se rend à l' | ||
+ | {{Images_icone-201-003_Note.png? | ||
+ | |||
+ | <WRAP column 30%> | ||
+ | C'est la page Web par défaut de NethServer qui s' | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | </ | ||
+ | <WRAP column 62%> | ||
+ | |{{ Images_Cahier-201-05-027.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | ===== 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** du "Cours NethServer-101" | ||
+ | |||
+ | <WRAP column 46%> | ||
+ | On clique **micronator-dev.org**. | ||
+ | |{{ Images_Cahier-201-05-028.png? | ||
+ | </ | ||
+ | <WRAP column 46%> | ||
+ | **DNS**. | ||
+ | |{{ Images_Cahier-201-05-029.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | <WRAP column 20%> | ||
+ | On ajoute les CNAME: | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | **moodle**, | ||
+ | \\ | ||
+ | \\ | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | **www.moodle** | ||
+ | \\ | ||
+ | \\ | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | et **mail.moodle**. | ||
+ | </ | ||
+ | <WRAP column 72%> | ||
+ | |{{ Images_Cahier-201-05-030.png? | ||
+ | |||
+ | |{{ Images_Cahier-201-05-031.png? | ||
+ | |||
+ | |{{ Images_Cahier-201-05-032.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | <WRAP column 20%> | ||
+ | On rafraîchit la page, on vérifie et on quitte [[https:// | ||
+ | </ | ||
+ | <WRAP column 72%> | ||
+ | |{{ Images_Cahier-201-05-033.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | ===== Clé API ===== | ||
+ | |||
+ | Il nous faut maintenant récupérer notre //clé API Globale//. | ||
+ | |||
+ | <WRAP column 30%> | ||
+ | \\ | ||
+ | \\ | ||
+ | \\ | ||
+ | < | ||
+ | < | ||
+ | |{{ Images_Cahier-201-05-034.png? | ||
+ | </ | ||
+ | <WRAP column 30%> | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | |{{ Images_Cahier-201-05-035.png? | ||
+ | |||
+ | |{{ Images_Cahier-201-05-036.png? | ||
+ | </ | ||
+ | <WRAP column 30%> | ||
+ | \\ | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | |{{ Images_Cahier-201-05-037.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | ===== Installation du script acme.sh ===== | ||
+ | |||
+ | Si ce n'est déjà fait, on installe le script '' | ||
+ | |||
+ | La commande ci-dessous téléchargera les fichiers accompagnant '' | ||
+ | |||
+ | <WRAP box round> | ||
+ | < | ||
+ | [root@tchana ~]# curl https:// | ||
+ | |||
+ | % Total % Received % Xferd Average Speed | ||
+ | | ||
+ | 100 | ||
+ | % Total % Received % Xferd Average Speed | ||
+ | | ||
+ | 100 174k 100 174k 0 | ||
+ | [mer. mars 13 15:34:08 EDT 2019] Installing from online archive. | ||
+ | [mer. mars 13 15:34:08 EDT 2019] Downloading https:// | ||
+ | [mer. mars 13 15:34:09 EDT 2019] Extracting master.tar.gz | ||
+ | [mer. mars 13 15:34:09 EDT 2019] It is recommended to install socat first. | ||
+ | [mer. mars 13 15:34:09 EDT 2019] We use socat for standalone server if you use standalone mode. | ||
+ | [mer. mars 13 15:34:09 EDT 2019] If you don't use standalone mode, just ignore this warning. | ||
+ | [mer. mars 13 15:34:09 EDT 2019] Installing to / | ||
+ | [mer. mars 13 15:34:09 EDT 2019] Installed to / | ||
+ | [mer. mars 13 15:34:09 EDT 2019] Installing alias to '/ | ||
+ | [mer. mars 13 15:34:09 EDT 2019] OK, Close and reopen your terminal to start using acme.sh | ||
+ | [mer. mars 13 15:34:09 EDT 2019] Installing alias to '/ | ||
+ | [mer. mars 13 15:34:09 EDT 2019] Installing alias to '/ | ||
+ | [mer. mars 13 15:34:09 EDT 2019] Installing cron job | ||
+ | 56 0 * * * "/ | ||
+ | [mer. mars 13 15:34:09 EDT 2019] Good, bash is found, so change the shebang to use bash as preferred. | ||
+ | [mer. mars 13 15:34:10 EDT 2019] OK | ||
+ | [mer. mars 13 15:34:10 EDT 2019] Install success! | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | On vérifie le chemin du script '' | ||
+ | |||
+ | < | ||
+ | root@tchana ~]# which acme.sh | ||
+ | |||
+ | alias acme.sh='/ | ||
+ | / | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | ==== Configuration ==== | ||
+ | |||
+ | === Chemin des fichiers du certificat === | ||
+ | |||
+ | Si ce n'est déjà fait, on doit définir certaines entrées de la base de données de configuration: | ||
+ | |||
+ | ● Chemin de la clé publique du certificat. | ||
+ | |||
+ | <WRAP box round> | ||
+ | < | ||
+ | [root@tchana ~]# config setprop pki CrtFile / | ||
+ | |||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | ● Chemin de la chaîne de certification. | ||
+ | |||
+ | <WRAP box round> | ||
+ | < | ||
+ | [root@tchana ~]# config setprop pki ChainFile / | ||
+ | |||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | ● Chemin de la clé privée du certificat. | ||
+ | |||
+ | <WRAP box round> | ||
+ | < | ||
+ | [root@tchana ~]# config setprop pki KeyFile / | ||
+ | |||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | === Variables d' | ||
+ | |||
+ | On doit définir certaines variables d’environnement correspondant à nos informations d’identification et à notre validateur DNS c.-à-d. Cloudflare.\\ | ||
+ | {{Images_Cahier-101-03-003.png? | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | Si ce n'est déjà fait, on exporte dans l' | ||
+ | |||
+ | <WRAP box round> | ||
+ | < | ||
+ | [root@tchana ~]# export CF_Key=" | ||
+ | |||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | On exporte notre adresse courriel utilisée pour notre enregistrement chez Cloudflare. | ||
+ | |||
+ | <WRAP box round> | ||
+ | < | ||
+ | |||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | On vérifie les exportations. | ||
+ | |||
+ | <WRAP box round> | ||
+ | < | ||
+ | [root@tchana ~]# env | grep -i CF_ | ||
+ | |||
+ | CF_Email= VotreAdresseCourrielDEnregistrementChezCloudflare | ||
+ | CF_Key= VotreCléGlobaleDeCloudflare | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | {{Images_Cahier-101-03-003.png? | ||
+ | |||
+ | === Vérification de la configuration PKI === | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# config show pki | ||
+ | |||
+ | pki=configuration | ||
+ | CertificateDuration=3650 | ||
+ | ChainFile=/ | ||
+ | CommonName=Micronator | ||
+ | CountryCode=CA | ||
+ | CrtFile=/ | ||
+ | EmailAddress=VotreAdresseCourriel | ||
+ | KeyFile=/ | ||
+ | LetsEncrypt=disabled | ||
+ | LetsEncryptDomains= | ||
+ | LetsEncryptMail= | ||
+ | LetsEncryptRenewDays=30 | ||
+ | Locality=Montreal | ||
+ | Organization=RF-232 | ||
+ | OrganizationalUnitName=Service informatique | ||
+ | State=Qc | ||
+ | SubjectAltName=*.micronator-dev.org | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | La propriété // | ||
+ | |||
+ | ===== Demande d'un certificat de TEST ===== | ||
+ | |||
+ | On force // | ||
+ | |||
+ | {{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 moodle.micronator-dev.org | ||
+ | -d www.moodle.micronator-dev.org | ||
+ | -d mail.moodle.micronator-dev.org | ||
+ | --cert-file / | ||
+ | --ca-file / | ||
+ | --key-file / | ||
+ | --reloadcmd "/ | ||
+ | --force | ||
+ | --test | ||
+ | |||
+ | ... | ||
+ | [sam. août 17 22:06:44 EDT 2019] Installing cert to:/ | ||
+ | [sam. août 17 22:06:44 EDT 2019] Installing CA to:/ | ||
+ | [sam. août 17 22:06:44 EDT 2019] Installing key to:/ | ||
+ | [sam. août 17 22:06:44 EDT 2019] Run reload cmd: / | ||
+ | [sam. août 17 22:06:47 EDT 2019] Reload success | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | La demande d'un certificat de TEST a été couronnée de succès. | ||
+ | |||
+ | ===== Demande d'un certificat officiel ===== | ||
+ | |||
+ | On force le renouvellement pour l' | ||
+ | |||
+ | < | ||
+ | [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 moodle.micronator-dev.org | ||
+ | -d www.moodle.micronator-dev.org | ||
+ | -d mail.moodle.micronator-dev.org | ||
+ | --cert-file / | ||
+ | --ca-file / | ||
+ | --key-file / | ||
+ | --reloadcmd "/ | ||
+ | --force | ||
+ | |||
+ | ... | ||
+ | [sam. août 17 22:09:30 EDT 2019] Installing cert to:/ | ||
+ | [sam. août 17 22:09:30 EDT 2019] Installing CA to:/ | ||
+ | [sam. août 17 22:09:30 EDT 2019] Installing key to:/ | ||
+ | [sam. août 17 22:09:30 EDT 2019] Run reload cmd: / | ||
+ | [sam. août 17 22:09:32 EDT 2019] Reload success | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | La demande d'un certificat officiel a été couronnée de succès. | ||
+ | \\ | ||
+ | |||
+ | ===== Vérification de la connexion sécurisée ===== | ||
+ | |||
+ | ● On se rend à: https:// | ||
+ | ● On peut aussi utiliser **http: | ||
+ | |||
+ | <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 // | ||
+ | |||
+ | 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-05-038.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | {{Images_Cahier-101-03-003.png? | ||
+ | |||
+ | <WRAP column 55%> | ||
+ | < | ||
+ | < | ||
+ | |{{ Images_Cahier-201-05-039.png? | ||
+ | </ | ||
+ | <WRAP column 37%> | ||
+ | **Historique -> Supprimer l' | ||
+ | |{{ Images_Cahier-201-05-040.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | ===== Instantané VirtualBox ===== | ||
+ | |||
+ | {{Images_Cahier-101-03-004.png? | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | ====== Préparation de l' | ||
+ | |||
+ | ===== Répertoire de données (moodledata) ===== | ||
+ | |||
+ | - Moodle nécessite un répertoire pour emmagasiner tous ses fichiers: //(les fichiers qui y seront chargés, les données temporaires, | ||
+ | - Ce répertoire __ne doit pas__ se trouver dans le répertoire racine ''/ | ||
+ | - Sur les installations importantes, | ||
+ | |||
+ | Nous allons créer un répertoire qui servira uniquement pour les données de Moodle. | ||
+ | |||
+ | On se rend dans le répertoire ''/ | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# cd / | ||
+ | |||
+ | [root@tchana vhost]# | ||
+ | </ | ||
+ | |||
+ | On vérifie. | ||
+ | |||
+ | < | ||
+ | [root@tchana vhost]# pwd | ||
+ | |||
+ | / | ||
+ | [root@tchana vhost]# | ||
+ | </ | ||
+ | |||
+ | On affiche le contenu du répertoire. | ||
+ | |||
+ | < | ||
+ | [root@tchana vhost]# ls -als | ||
+ | |||
+ | total 0 | ||
+ | 0 drwxr-xr-x | ||
+ | 0 drwxr-xr-x. 12 root | ||
+ | 0 drwxr-sr-x | ||
+ | [root@tchana vhost]# | ||
+ | </ | ||
+ | |||
+ | On crée le répertoire '' | ||
+ | |||
+ | < | ||
+ | [root@tchana vhost]# mkdir / | ||
+ | |||
+ | [root@tchana vhost]# | ||
+ | </ | ||
+ | |||
+ | ==== Sécurité ==== | ||
+ | |||
+ | === Fichier .htaccess === | ||
+ | |||
+ | // | ||
+ | Les fichiers '' | ||
+ | |||
+ | //Principe des fichiers htaccess// | ||
+ | |||
+ | Le fichier '' | ||
+ | |||
+ | Pour la sécurité, on crée le fichier '' | ||
+ | |||
+ | < | ||
+ | [root@tchana vhost]# touch / | ||
+ | |||
+ | [root@tchana vhost]# | ||
+ | </ | ||
+ | |||
+ | On entre les deux lignes de paramètres requis dans le fichier '' | ||
+ | |||
+ | ● Ajout de la première ligne. | ||
+ | |||
+ | < | ||
+ | [root@tchana vhost]# echo order deny,allow > moodledata/ | ||
+ | |||
+ | [root@tchana vhost]# | ||
+ | </ | ||
+ | |||
+ | ● Ajout de la deuxième ligne. | ||
+ | |||
+ | < | ||
+ | [root@tchana vhost]# echo deny from all >> moodledata/ | ||
+ | |||
+ | [root@tchana vhost]# | ||
+ | </ | ||
+ | |||
+ | On vérifie. | ||
+ | |||
+ | < | ||
+ | [root@tchana vhost]# cat / | ||
+ | |||
+ | order deny,allow | ||
+ | deny from all | ||
+ | [root@tchana vhost]# | ||
+ | </ | ||
+ | |||
+ | === AllowOverride === | ||
+ | |||
+ | {{Images_icone-201-003_Note.png? | ||
+ | |||
+ | La directive d'un fichier de configuration d' | ||
+ | |||
+ | Nous allons donc ajouter un nouveau fichier de configuration '' | ||
+ | |||
+ | // | ||
+ | Référence:// | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | < | ||
+ | cat > / | ||
+ | < | ||
+ | # | ||
+ | # Modification par Michel-André le 18 août 2019 | ||
+ | # Afin que le démon httpd traite les fichers .htacces dans les répertoires et | ||
+ | # sous-répertoires de / | ||
+ | AllowOverride All | ||
+ | </ | ||
+ | |||
+ | EOT | ||
+ | |||
+ | </ | ||
+ | |||
+ | On vérifie. | ||
+ | |||
+ | < | ||
+ | [root@tchana vhost]# ls -als / | ||
+ | |||
+ | 4 -rw-r--r-- 1 root root 296 18 août 14:24 / | ||
+ | [root@tchana vhost]# | ||
+ | </ | ||
+ | |||
+ | On affiche le contenu du fichier. | ||
+ | |||
+ | < | ||
+ | [root@tchana vhost]# cat / | ||
+ | |||
+ | < | ||
+ | # | ||
+ | # Modification par Michel-André le 18 août 2019 | ||
+ | # Afin que le démon httpd traite les fichers .htacces dans les répertoires et | ||
+ | # sous-répertoires de / | ||
+ | AllowOverride All | ||
+ | </ | ||
+ | |||
+ | [root@tchana vhost]# | ||
+ | </ | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | {{Images_icone-201-003_Note.png? | ||
+ | |||
+ | === Redémarrage du démon httpd === | ||
+ | |||
+ | On redémarre le démon Apache afin qu'il relise son fichier de configuration. | ||
+ | |||
+ | < | ||
+ | [root@tchana vhost]# systemctl restart httpd | ||
+ | |||
+ | [root@tchana vhost]# | ||
+ | </ | ||
+ | |||
+ | === 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 vhost]# cat / | ||
+ | |||
+ | / | ||
+ | [root@tchana vhost]# | ||
+ | </ | ||
+ | |||
+ | Ci-dessus, il n'y a pas de ligne vide avant __< | ||
+ | |||
+ | === Fureteur === | ||
+ | |||
+ | Pour encore plus de sécurité, on enlève l' | ||
+ | |||
+ | < | ||
+ | [root@tchana vhost]# echo "< | ||
+ | |||
+ | [root@tchana vhost]# | ||
+ | </ | ||
+ | |||
+ | On vérifie le contenu du fichier. | ||
+ | |||
+ | < | ||
+ | [root@tchana vhost]# cat / | ||
+ | |||
+ | < | ||
+ | [root@tchana vhost]# | ||
+ | </ | ||
+ | |||
+ | === Propriétaire, | ||
+ | |||
+ | On sécurise le répertoire en changeant le propriétaire et le groupe. | ||
+ | |||
+ | < | ||
+ | [root@tchana vhost]# chown -R apache: | ||
+ | |||
+ | [root@tchana vhost]# | ||
+ | </ | ||
+ | |||
+ | On enlève tous les droits à " | ||
+ | |||
+ | < | ||
+ | [root@tchana vhost]# chmod -R o-rwx moodledata/ | ||
+ | |||
+ | [root@tchana vhost]# | ||
+ | </ | ||
+ | |||
+ | On répète pour les fichiers cachés. | ||
+ | |||
+ | < | ||
+ | [root@tchana vhost]# chmod -R o-rwx moodledata/ | ||
+ | |||
+ | [root@tchana vhost]# | ||
+ | </ | ||
+ | |||
+ | On vérifie. | ||
+ | |||
+ | < | ||
+ | [root@tchana vhost]# ls -alsd moodledata/ ; ls -als moodledata | ||
+ | |||
+ | 0 drwxr-s--- 2 apache apache 40 18 août 14:26 moodledata/ | ||
+ | total 8 | ||
+ | 0 drwxr-s--- 2 apache apache 40 18 août 14:26 . | ||
+ | 0 drwxr-xr-x 4 root | ||
+ | 4 -rw-r----- 1 apache apache 31 18 août 14:24 .htaccess | ||
+ | 4 -rw-r----- 1 apache apache 33 18 août 14:26 index.htm | ||
+ | [root@tchana vhost]# | ||
+ | </ | ||
+ | |||
+ | L' | ||
+ | |||
+ | < | ||
+ | [root@tchana vhost]# cd | ||
+ | |||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | \\ | ||
+ | |||
+ | ===== Extensions PHP ===== | ||
+ | |||
+ | On installe quelques extensions requises par Moodle pour PHP-7.2. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# yum -y install php72-php-opcache php72-php-xmlrpc php72-php-intl | ||
+ | |||
+ | ... | ||
+ | ============================================================================================ | ||
+ | Installation | ||
+ | |||
+ | Taille totale des téléchargements : 9.1 M | ||
+ | Taille d' | ||
+ | ... | ||
+ | Installé : | ||
+ | php72-php-intl.x86_64 0: | ||
+ | |||
+ | Dépendances installées : | ||
+ | libicu62.x86_64 0: | ||
+ | |||
+ | Terminé ! | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | On crée un répertoire pour un gabarit personnalisé afin d' | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# mkdir -p / | ||
+ | |||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | < | ||
+ | cat << EOF > / | ||
+ | [opcache] | ||
+ | |||
+ | ; Référence: | ||
+ | ; Référence: | ||
+ | |||
+ | opcache.enable = 1 | ||
+ | ; Booléen | ||
+ | ; OPcache est un moteur de cache intégré à PHP. Lorsqu' | ||
+ | ; considérablement les performances des sites Web utilisant PHP. Depuis php.net: OPcache | ||
+ | ; améliore les performances de PHP en stockant le bytecode de script précompilé dans la | ||
+ | ; mémoire partagée, évitant ainsi à PHP de charger et d’analyser les scripts à chaque | ||
+ | ; requête. | ||
+ | |||
+ | opcache.memory_consumption = 128 | ||
+ | ; Nombre entier | ||
+ | ; La taille de la mémoire partagée utilisée par OPcache, en megabytes. | ||
+ | |||
+ | opcache.max_accelerated_files = 8000 | ||
+ | ; ; Nombre entier | ||
+ | ; Le nombre maximal de clés (et donc, de scripts) dans la table de hashage d' | ||
+ | ; valeur actuellement utilisée sera le premier nombre du jeux des nombres premiers { 223, | ||
+ | ; 463, 983, 1979, 3907, 7963, 16229, 32531, 65407, 130987 } qui est plus grand ou égal que | ||
+ | ; la valeur configurée. La valeur minimale est 200. La valeur maximale est 100000 dans PHP | ||
+ | ; < 5.5.6, et 1000000 dans les versions ultérieur. | ||
+ | |||
+ | opcache.revalidate_freq = 60 | ||
+ | ; Nombre entier | ||
+ | ; La fréquence de vérification du timestamps du script afin de détecter les possibles mises | ||
+ | ; à jour, en secondes. La valeur 0 fera qu' | ||
+ | ; requête. | ||
+ | |||
+ | ; Requis par Moodle | ||
+ | |||
+ | opcache.use_cwd = 1 | ||
+ | ; Booléen | ||
+ | ; Si activé, OPcache ajoute le dossier de travail courant à la clé du script, éliminant | ||
+ | ; ainsi les collisions possibles entre les fichiers dont le nom de base est identique. Le | ||
+ | ; fait de désactiver cette fonctionalité améliore les performances, | ||
+ | ; applications existantes. | ||
+ | |||
+ | opcache.validate_timestamps = 1 | ||
+ | ; Booléen | ||
+ | ; Si activé, OPcache va vérifier les mises à jour des scripts toutes les | ||
+ | ; opcache.revalidate_freq secondes. Lorsque cette directive est désactivée, | ||
+ | ; réinitialiser OPcache manuellement via la fonction opcache_reset(), | ||
+ | ; opcache_invalidate() ou en redémarrant le serveur Web pour que les modifications du | ||
+ | ; système de fichiers ne prennent effet. | ||
+ | |||
+ | opcache.save_comments = 1 | ||
+ | ; Booléen | ||
+ | ; Si désactivé, | ||
+ | ; de réduire la taille du code optimisé. La désactivation de cette directive peut casser des | ||
+ | ; applications et des frameworks qui s' | ||
+ | ; annotations, | ||
+ | |||
+ | opcache.enable_file_override = 0 | ||
+ | ; Booléen | ||
+ | ; Lorsqu' | ||
+ | ; cache lorsque les fonctions file_exists(), | ||
+ | ; peut accroître les performances des applications qui vérifient l' | ||
+ | ; lisibilité des scripts PHP, mais risque de retourner des données périmées si | ||
+ | ; opcache.validate_timestamps est désactivé. | ||
+ | |||
+ | [intl] | ||
+ | ; L' | ||
+ | ; bibliothèque ICU, qui permet aux développeurs PHP d' | ||
+ | ; avec les paramètres régionaux incluant, mais non limité à cette liste, le formatage, la | ||
+ | ; translittération, | ||
+ | ; UCA-conforme, | ||
+ | ; paramètres régionaux, des fuseaux horaires et des graphèmes. | ||
+ | |||
+ | intl.default_locale = en_utf8 | ||
+ | ; Chaîne de caractères | ||
+ | ; La locale à utiliser avec les fonctions intl lorsqu' | ||
+ | ; est omis dans l' | ||
+ | ; locales ICU, et non des locales système. Les locales ICU internes ainsi que leurs données | ||
+ | ; peuvent être explorées ici » http:// | ||
+ | ; Par défaut, vaut vide, ce qui force l' | ||
+ | ; définie, la configuration ini ne peut être réinitialisée par cette valeur par défaut. Il | ||
+ | ; n'est pas recommandé d' | ||
+ | ; l' | ||
+ | |||
+ | EOF | ||
+ | |||
+ | </ | ||
+ | |||
+ | On vérifie en affichant quelques lignes du fichier. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# head / | ||
+ | |||
+ | [opcache] | ||
+ | |||
+ | ; Référence: | ||
+ | ; Référence: | ||
+ | |||
+ | opcache.enable = 1 | ||
+ | ; Booléen | ||
+ | ; OPcache est un moteur de cache intégré à PHP. Lorsqu' | ||
+ | ; considérablement les performances des sites Web utilisant PHP. Depuis php.net: OPcache | ||
+ | ; améliore les performances de PHP en stockant le bytecode de script précompilé dans la | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | === Sauvegarde répertoire du gabarit === | ||
+ | |||
+ | On vérifie si le nom du répertoire ''/ | ||
+ | |||
+ | {{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 __< | ||
+ | |||
+ | On signale le changement. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# signal-event nethserver-php-scl-update | ||
+ | |||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | On redémarre le démon Apache. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# systemctl restart httpd | ||
+ | |||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | On redémarre le démon MySQL. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# systemctl restart mysqld | ||
+ | |||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | \\ | ||
+ | |||
+ | ===== Création de la base de données pour Moodle ===== | ||
+ | |||
+ | ==== InnoDB ==== | ||
+ | // | ||
+ | Référence:// | ||
+ | Depuis MariaDB 10.2 et les versions ultérieures, | ||
+ | |||
+ | ==== Jeux de caractères ==== | ||
+ | |||
+ | Moodle requiert le jeu de caractères '' | ||
+ | |||
+ | ==== Création de la BD ==== | ||
+ | |||
+ | On entre dans la console de MariaDB 102. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# mysql102 | ||
+ | |||
+ | Welcome to the MariaDB monitor. | ||
+ | Your MariaDB connection id is 12 | ||
+ | Server version: 10.2.22-MariaDB MariaDB Server | ||
+ | |||
+ | Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others. | ||
+ | |||
+ | Type ' | ||
+ | |||
+ | MariaDB [(none)]> | ||
+ | </ | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | On crée la table <wrap em> | ||
+ | |||
+ | < | ||
+ | MariaDB [(none)]> | ||
+ | |||
+ | Query OK, 1 row affected (0,00 sec) | ||
+ | |||
+ | MariaDB [(none)]> | ||
+ | </ | ||
+ | |||
+ | On vérifie. | ||
+ | |||
+ | < | ||
+ | MariaDB [(none)]> | ||
+ | |||
+ | +--------------------+ | ||
+ | | Database | ||
+ | +--------------------+ | ||
+ | | MoodleBD | ||
+ | | information_schema | | ||
+ | | mysql | | ||
+ | | performance_schema | | ||
+ | | phpmyadmin | ||
+ | +--------------------+ | ||
+ | 5 rows in set (0,00 sec) | ||
+ | |||
+ | MariaDB [(none)]> | ||
+ | </ | ||
+ | |||
+ | === Grant === | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | On lui accorde des droits en créant l' | ||
+ | |||
+ | < | ||
+ | MariaDB [(none)]> | ||
+ | |||
+ | Query OK, 0 rows affected (0,00 sec) | ||
+ | |||
+ | MariaDB [(none)]> | ||
+ | </ | ||
+ | |||
+ | On vérifie. | ||
+ | |||
+ | < | ||
+ | MariaDB [(none)]> | ||
+ | |||
+ | +--------------------------------------------------------------------------------------------------------------------------+ | ||
+ | | Grants for usager_MoodleBD@localhost | ||
+ | +--------------------------------------------------------------------------------------------------------------------------+ | ||
+ | | GRANT USAGE ON *.* TO ' | ||
+ | | GRANT ALL PRIVILEGES ON `MoodleBD`.* TO ' | ||
+ | +--------------------------------------------------------------------------------------------------------------------------+ | ||
+ | 3 rows in set (0,00 sec) | ||
+ | |||
+ | MariaDB [(none)]> | ||
+ | </ | ||
+ | |||
+ | On indique à MariaDB 102 de relire les droits //(cette commande n'est pas réellement obligatoire après un '' | ||
+ | |||
+ | < | ||
+ | MariaDB [(none)]> | ||
+ | |||
+ | Query OK, 0 rows affected (0,00 sec) | ||
+ | |||
+ | MariaDB [(none)]> | ||
+ | </ | ||
+ | |||
+ | On quitte la console de MariaDB 10.2. | ||
+ | |||
+ | < | ||
+ | MariaDB [(none)]> | ||
+ | |||
+ | Bye | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | === Paramètres de la BD de Moodle === | ||
+ | |||
+ | Notez le nom de la base de données: <wrap em> | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | ===== Téléchargement de Moodle ===== | ||
+ | |||
+ | On se substitue à l' | ||
+ | |||
+ | < | ||
+ | [root@tchana moodle]# su apache -s /bin/bash | ||
+ | |||
+ | bash-4.2$ | ||
+ | </ | ||
+ | |||
+ | On vérifie. | ||
+ | |||
+ | < | ||
+ | bash-4.2$ whoami | ||
+ | |||
+ | apache | ||
+ | bash-4.2$ | ||
+ | </ | ||
+ | |||
+ | On se rend dans le répertoire racine de notre site Moodle. | ||
+ | |||
+ | < | ||
+ | bash-4.2$ cd / | ||
+ | |||
+ | bash-4.2$ | ||
+ | </ | ||
+ | |||
+ | On vérifie. | ||
+ | |||
+ | < | ||
+ | bash-4.2$ pwd | ||
+ | |||
+ | / | ||
+ | bash-4.2$ | ||
+ | </ | ||
+ | |||
+ | |||
+ | On utilise **git** pour télécharger la version LTS(( **Long-term**** support:** En informatique, | ||
+ | // | ||
+ | |||
+ | Voir la page qui définit les versions LTS: [[https:// | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | < | ||
+ | bash-4.2$ git clone -b MOODLE_35_STABLE git:// | ||
+ | |||
+ | Cloning into ' | ||
+ | remote: Counting objects: 1112306, done. | ||
+ | remote: Compressing objects: 100% (250892/ | ||
+ | remote: Total 1112306 (delta 828344), reused 1112183 (delta 828221) | ||
+ | Receiving objects: 100% (1112306/ | ||
+ | Resolving deltas: 100% (828344/ | ||
+ | Checking out files: 100% (18688/ | ||
+ | bash-4.2$ | ||
+ | </ | ||
+ | |||
+ | On vérifie. | ||
+ | |||
+ | < | ||
+ | [root@tchana moodle]# ls -als | ||
+ | |||
+ | total 652 | ||
+ | 4 drwxr-sr-x 52 apache apache | ||
+ | 0 drwxr-xr-x | ||
+ | 4 drwxr-sr-x 13 apache apache | ||
+ | ... | ||
+ | |||
+ | 4 -rw-r--r-- | ||
+ | 0 drwxr-sr-x | ||
+ | [root@tchana moodle]# | ||
+ | </ | ||
+ | |||
+ | On retourne à l' | ||
+ | |||
+ | < | ||
+ | bash-4.2$ exit | ||
+ | |||
+ | exit | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | <WRAP centeralign> | ||
+ | |||
+ | ===== Instantané VirtualBox ===== | ||
+ | |||
+ | {{Images_Cahier-101-03-004.png? | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | ====== Installation de Moodle ====== | ||
+ | |||
+ | ===== Lancement de l' | ||
+ | |||
+ | On se rend à l'URL: https:// | ||
+ | |||
+ | <WRAP column 22%> | ||
+ | ===== Langue ===== | ||
+ | |||
+ | On choisit la langue **-> Suivant**. | ||
+ | </ | ||
+ | <WRAP column 70%> | ||
+ | |{{ Images_Cahier-201-05-041.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | <WRAP column 46%> | ||
+ | ===== Confirmer les chemins d' | ||
+ | |||
+ | On vérifie les données trouvées par l' | ||
+ | |||
+ | Il a trouvé notre répertoire de données. | ||
+ | |||
+ | **Suivant**. | ||
+ | </ | ||
+ | <WRAP column 46%> | ||
+ | |{{ Images_Cahier-201-05-042.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | <WRAP column 46%> | ||
+ | ===== Base de données ===== | ||
+ | |||
+ | ==== Pilote ==== | ||
+ | |||
+ | // | ||
+ | </ | ||
+ | <WRAP column 46%> | ||
+ | |{{ Images_Cahier-201-05-043.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | <WRAP column 46%> | ||
+ | ===== Réglages de la base de données ===== | ||
+ | |||
+ | //**Serveur de base de données**// | ||
+ | Il faut absolument choisir **127.0.0.1**< | ||
+ | |||
+ | //**Nom de la base de données**// | ||
+ | <wrap em> | ||
+ | |||
+ | // | ||
+ | <wrap em> | ||
+ | |||
+ | //**Mot de passe de la base de données**// | ||
+ | <wrap em> | ||
+ | |||
+ | // | ||
+ | On prend le défaut. | ||
+ | |||
+ | //**-> Suivant**// | ||
+ | </ | ||
+ | <WRAP column 46%> | ||
+ | |{{ Images_Cahier-201-05-044.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | <WRAP column 46%> | ||
+ | ===== Copyright ===== | ||
+ | |||
+ | __Si on a lu, compris et qu'on accepte les conditions__, | ||
+ | </ | ||
+ | <WRAP column 46%> | ||
+ | |{{ Images_Cahier-201-05-045.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | <WRAP column 46%> | ||
+ | ===== Contrôle serveur ===== | ||
+ | |||
+ | < | ||
+ | |||
+ | < | ||
+ | |||
+ | **-> Continuer**. | ||
+ | </ | ||
+ | <WRAP column 46%> | ||
+ | |{{ Images_Cahier-201-05-046.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | <WRAP column 46%> | ||
+ | La page ci-contre prend un certain à s' | ||
+ | |||
+ | À la fin de page, **Continuer**. | ||
+ | </ | ||
+ | <WRAP column 46%> | ||
+ | |{{ Images_Cahier-201-05-047.png? | ||
+ | ... ... ... | ||
+ | |{{ Images_Cahier-201-05-048.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | <WRAP column 46%> | ||
+ | ===== Général ===== | ||
+ | |||
+ | < | ||
+ | |||
+ | **-> | ||
+ | </ | ||
+ | <WRAP column 46%> | ||
+ | |{{ Images_Cahier-201-05-049.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | ===== Nouveaux réglages ===== | ||
+ | |||
+ | On entre les informations demandées, **-> Enregistrer les modifications**. | ||
+ | |||
+ | <WRAP column 46%> | ||
+ | |{{ Images_Cahier-201-05-050.png? | ||
+ | </ | ||
+ | <WRAP column 46%> | ||
+ | |{{ Images_Cahier-201-05-051.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | <WRAP column 46%> | ||
+ | L' | ||
+ | |||
+ | Si on le désire, on peut //Effectuer l' | ||
+ | </ | ||
+ | <WRAP column 46%> | ||
+ | |{{ Images_Cahier-201-05-052.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | ===== Accueil ===== | ||
+ | <WRAP column 22%> | ||
+ | On clique **Accueil du site**. | ||
+ | |{{ Images_Cahier-201-05-053.png? | ||
+ | </ | ||
+ | <WRAP column 22%> | ||
+ | **Suivant**. | ||
+ | |{{ Images_Cahier-201-05-054.png? | ||
+ | </ | ||
+ | <WRAP column 22%> | ||
+ | **Suivant**. | ||
+ | |{{ Images_Cahier-201-05-055.png? | ||
+ | </ | ||
+ | <WRAP column 22%> | ||
+ | **Terminer la visite guidée**. | ||
+ | |{{ Images_Cahier-201-05-056.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | ===== Instantané VirtualBox ===== | ||
+ | |||
+ | {{Images_Cahier-101-03-004.png? | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | ===== Sécurité Moodle ===== | ||
+ | |||
+ | On vérifie le rapport de sécurité. | ||
+ | |||
+ | **Tableau de bord -> Administration du site -> Rapports -> Panorama de sécurité**. | ||
+ | |||
+ | ==== Filtre .swf ==== | ||
+ | |||
+ | {{ Images_Cahier-201-05-057.png? | ||
+ | |||
+ | {{Images_Cahier-101-03-008.png? | ||
+ | |||
+ | === Désactivation === | ||
+ | |||
+ | <WRAP column 35%> | ||
+ | Clac //(clic droit)// sur **Filtre .swf activé -> Ouvrir le lien dans un nouvel onglet**. | ||
+ | |{{ Images_Cahier-201-05-058.png? | ||
+ | </ | ||
+ | <WRAP column 57%> | ||
+ | \\ | ||
+ | **Gérer les lecteurs média**. | ||
+ | |{{ Images_Cahier-201-05-059.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | <WRAP column 20%> | ||
+ | Cliquer l' | ||
+ | </ | ||
+ | <WRAP column 72%> | ||
+ | |{{ Images_Cahier-201-05-060.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | <WRAP column 20%> | ||
+ | Le //**Filtre .swf**// est désactivé. | ||
+ | </ | ||
+ | <WRAP column 72%> | ||
+ | |{{ Images_Cahier-201-05-061.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | <WRAP column 30%> | ||
+ | **Enregistrer les modifications** et fermer l' | ||
+ | </ | ||
+ | <WRAP column 30%> | ||
+ | |{{Images_Cahier-201-05-062.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | <WRAP column 20%> | ||
+ | De retour à **Tableau de bord -> Administration du site du site** **-> Rapports -> Panorama de sécurité ->** on rafraîchit la page. | ||
+ | </ | ||
+ | <WRAP column 72%> | ||
+ | |{{ Images_Cahier-201-05-063.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | ==== Config.php ==== | ||
+ | |||
+ | <WRAP column 20%> | ||
+ | {{Images_Cahier-101-03-008.png? | ||
+ | </ | ||
+ | <WRAP column 72%> | ||
+ | |{{ Images_Cahier-201-05-064.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | On affiche les droits du fichier '' | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# ls -als / | ||
+ | |||
+ | 4 -rw-r----- 1 apache apache 776 19 août 21:52 / | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | On supprime le droit d' | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# chmod -w / | ||
+ | |||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | On vérifie. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# ls -als / | ||
+ | |||
+ | 4 -r--r----- 1 apache apache 776 19 août 21:52 / | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | <WRAP column 20%> | ||
+ | On retourne à **Tableau de bord -> Administration du site du site** **-> Rapports -> Panorama de sécurité ->** on rafraîchit la page. | ||
+ | </ | ||
+ | <WRAP column 72%> | ||
+ | |{{ Images_Cahier-201-05-065.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | ==== Utilisateurs XSS fiables ==== | ||
+ | |||
+ | {{Images_Cahier-101-03-008.png? | ||
+ | |||
+ | Vu que nous n' | ||
+ | |||
+ | <WRAP column 20%> | ||
+ | On pourrait quand même désactiver ce paramètre tout de suite. | ||
+ | </ | ||
+ | <WRAP column 72%> | ||
+ | |{{ Images_Cahier-201-05-066.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | ==== Sauvegarde des données des utilisateurs ==== | ||
+ | |||
+ | {{Images_Cahier-101-03-008.png? | ||
+ | |||
+ | <WRAP column 20%> | ||
+ | On pourrait quand même désactiver ce paramètre tout de suite. | ||
+ | </ | ||
+ | <WRAP column 72%> | ||
+ | |{{ Images_Cahier-201-05-067.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | ===== Chemins des programmes exécutable ===== | ||
+ | |||
+ | <WRAP column 20%> | ||
+ | On doit cibler les chemins des programmes exécutables par Moodle. | ||
+ | </ | ||
+ | <WRAP column 72%> | ||
+ | |{{ Images_Cahier-201-05-068.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | ==== Chemin d' | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# which php | ||
+ | |||
+ | / | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | ==== Chemin d' | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# which du | ||
+ | |||
+ | /usr/bin/du | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | ==== Chemin d' | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# which aspell | ||
+ | |||
+ | / | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | ==== Chemin d' | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# which dot | ||
+ | |||
+ | / | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | {{Images_Cahier-101-03-003.png? | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# yum install graphviz -y | ||
+ | |||
+ | ... | ||
+ | Résumé de la transaction | ||
+ | ============================================================================================ | ||
+ | Installation | ||
+ | |||
+ | Taille totale des téléchargements : 14 M | ||
+ | Taille d' | ||
+ | ... | ||
+ | Installé : | ||
+ | graphviz.x86_64 0: | ||
+ | |||
+ | Dépendances installées : | ||
+ | atk.x86_64 0: | ||
+ | gdk-pixbuf2.x86_64 0: | ||
+ | ghostscript-fonts.noarch 0: | ||
+ | gtk2.x86_64 0: | ||
+ | jasper-libs.x86_64 0: | ||
+ | libICE.x86_64 0: | ||
+ | libXaw.x86_64 0: | ||
+ | libXi.x86_64 0: | ||
+ | libXrandr.x86_64 0: | ||
+ | librsvg2.x86_64 0: | ||
+ | |||
+ | Terminé ! | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | On recherche le chemin d' | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# which dot | ||
+ | |||
+ | / | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | ==== Chemin d' | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# which ghostscript | ||
+ | |||
+ | / | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | ==== Chemin d' | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# which python | ||
+ | |||
+ | / | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | <WRAP column 35%> | ||
+ | **Tableau de bord -> Administration du site -> Serveur -> Chemins système**. | ||
+ | |||
+ | On insère les différents chemins d' | ||
+ | |||
+ | {{ Images_Cahier-201-05-076.png? | ||
+ | |||
+ | On s' | ||
+ | |||
+ | {{ Images_Cahier-201-05-069.png? | ||
+ | </ | ||
+ | <WRAP column 57%> | ||
+ | |{{ Images_Cahier-201-05-070.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | <WRAP column 20%> | ||
+ | Au retour à **Tableau de bord -> Administration du site** **-> Rapports -> Panorama de sécurité**, | ||
+ | </ | ||
+ | <WRAP column 72%> | ||
+ | |{{ Images_Cahier-201-05-071.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | ===== Ajustement des droits ===== | ||
+ | |||
+ | ==== Répertoire moodledata ==== | ||
+ | |||
+ | On se rend dans le répertoire racine de '' | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# cd / | ||
+ | |||
+ | [root@tchana vhost]# | ||
+ | </ | ||
+ | |||
+ | On vérifie. | ||
+ | |||
+ | < | ||
+ | [root@tchana vhost]# pwd | ||
+ | |||
+ | / | ||
+ | [root@tchana vhost]# | ||
+ | </ | ||
+ | |||
+ | On ajuste __**R**__écursivement le propriétaire et le groupe pour tout le répertoire des données de Moodle. | ||
+ | |||
+ | < | ||
+ | [root@tchana vhost]# chown -R apache: | ||
+ | |||
+ | [root@tchana vhost]# | ||
+ | </ | ||
+ | |||
+ | On répète la commande pour les fichiers/ | ||
+ | |||
+ | < | ||
+ | [root@tchana vhost]# chown -R apache: | ||
+ | |||
+ | [root@tchana vhost]# | ||
+ | </ | ||
+ | |||
+ | On renforce la sécurité de l’accès aux fichiers //( f )// en supprimant les droits à " | ||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | < | ||
+ | [root@tchana vhost]# find -L / | ||
+ | |||
+ | [root@tchana vhost]# | ||
+ | </ | ||
+ | |||
+ | On répète l' | ||
+ | |||
+ | < | ||
+ | [root@tchana vhost]# find -L / | ||
+ | |||
+ | [root@tchana vhost]# | ||
+ | </ | ||
+ | |||
+ | On vérifie les paramètres des répertoires et des fichiers, standards ou cachés. On s' | ||
+ | |||
+ | < | ||
+ | [root@tchana vhost]# ls -als / | ||
+ | |||
+ | total 8 | ||
+ | 0 drwxrwx--- 12 apache apache 179 19 août 21:54 . | ||
+ | 0 drwxr-xr-x | ||
+ | 0 drwxr-s--- | ||
+ | 0 drwxr-s--- | ||
+ | 4 -rw------- | ||
+ | 4 -rw------- | ||
+ | 0 drwxr-s--- | ||
+ | 0 drwxr-s--- | ||
+ | 0 drwxr-s--- | ||
+ | 0 drwxr-s--- | ||
+ | 0 drwxr-s--- | ||
+ | 0 drwxr-s--- | ||
+ | 0 drwxr-s--- | ||
+ | 0 drwxr-s--- | ||
+ | [root@tchana vhost]# | ||
+ | </ | ||
+ | |||
+ | ==== Répertoire moodle ==== | ||
+ | |||
+ | On se rend dans le répertoire racine de Moodle. | ||
+ | |||
+ | < | ||
+ | [root@tchana moodledata]# | ||
+ | |||
+ | [root@tchana moodle]# | ||
+ | </ | ||
+ | |||
+ | On vérifie. | ||
+ | |||
+ | < | ||
+ | [root@tchana moodle]# pwd | ||
+ | |||
+ | / | ||
+ | [root@tchana moodle]# | ||
+ | </ | ||
+ | |||
+ | On ajuste __**R**__écursivement le propriétaire et le groupe pour tout le répertoire racine de Moodle. | ||
+ | |||
+ | < | ||
+ | [root@tchana moodle]# chown -R apache: | ||
+ | |||
+ | [root@tchana moodle]# | ||
+ | </ | ||
+ | |||
+ | On répète la commande pour les fichiers/ | ||
+ | |||
+ | < | ||
+ | [root@tchana moodle]# chown -R apache: | ||
+ | |||
+ | [root@tchana moodle]# | ||
+ | </ | ||
+ | |||
+ | On renforce la sécurité de l’accès aux fichiers //( f )// en supprimant les droits à " | ||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | < | ||
+ | [root@tchana moodle]# find -L / | ||
+ | |||
+ | [root@tchana moodle]# | ||
+ | </ | ||
+ | |||
+ | On répète l' | ||
+ | |||
+ | < | ||
+ | [root@tchana moodle]# find -L / | ||
+ | |||
+ | [root@tchana moodle]# | ||
+ | </ | ||
+ | |||
+ | On vérifie les paramètres des répertoires et des fichiers, standards ou cachés. On s' | ||
+ | |||
+ | < | ||
+ | [root@tchana moodle]# ls -als / | ||
+ | |||
+ | total 656 | ||
+ | 4 drwxr-sr-x 52 apache apache | ||
+ | 0 drwxr-xr-x | ||
+ | 4 drwxr-s--- 13 apache apache | ||
+ | ... | ||
+ | 4 -rw-r----- | ||
+ | ... | ||
+ | 4 -rw-r----- | ||
+ | 0 drwxr-s--- | ||
+ | 4 -rw-r----- | ||
+ | 4 -rw-r----- | ||
+ | ... | ||
+ | 4 drwxr-s--- | ||
+ | 0 drwxr-s--- | ||
+ | 4 -rw-r----- | ||
+ | 0 drwxr-s--- | ||
+ | [root@tchana moodle]# | ||
+ | </ | ||
+ | |||
+ | {{Images_Cahier-101-03-008.png? | ||
+ | [[nethserver_201_cahier_05_moodle# | ||
+ | . | ||
+ | |||
+ | ==== Fichier config.php ==== | ||
+ | |||
+ | On vérifie le fichier de configuration '' | ||
+ | |||
+ | < | ||
+ | [root@tchana moodle]# ls -ls config.php | ||
+ | |||
+ | 4 -rw-r----- 1 apache apache 776 19 août 21:52 config.php | ||
+ | [root@tchana moodle]# | ||
+ | </ | ||
+ | |||
+ | On affiche son contenu. | ||
+ | |||
+ | < | ||
+ | [root@tchana vhost]# cat config.php | ||
+ | |||
+ | <? | ||
+ | |||
+ | unset($CFG); | ||
+ | global $CFG; | ||
+ | $CFG = new stdClass(); | ||
+ | |||
+ | $CFG-> | ||
+ | $CFG-> | ||
+ | $CFG-> | ||
+ | $CFG-> | ||
+ | $CFG-> | ||
+ | $CFG-> | ||
+ | $CFG-> | ||
+ | $CFG-> | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ); | ||
+ | |||
+ | $CFG-> | ||
+ | $CFG-> | ||
+ | $CFG-> | ||
+ | |||
+ | $CFG-> | ||
+ | |||
+ | require_once(__DIR__ . '/ | ||
+ | |||
+ | // There is no php closing tag in this file, | ||
+ | // it is intentional because it prevents trailing whitespace problems! | ||
+ | [root@tchana moodle]# | ||
+ | </ | ||
+ | |||
+ | On ajuste '' | ||
+ | |||
+ | < | ||
+ | [root@tchana moodle]# sed -i ' | ||
+ | |||
+ | [root@tchana moodle]# | ||
+ | </ | ||
+ | |||
+ | On vérifie. | ||
+ | |||
+ | < | ||
+ | [root@tchana moodle]# cat config.php | grep 02750 | ||
+ | |||
+ | $CFG-> | ||
+ | [root@tchana moodle]# | ||
+ | </ | ||
+ | |||
+ | ===== Vérification ===== | ||
+ | |||
+ | On se déconnecte de Moodle et on se reconnecte. | ||
+ | |||
+ | <WRAP column 20%> | ||
+ | |{{ Images_Cahier-201-05-072.png? | ||
+ | </ | ||
+ | <WRAP column 20%> | ||
+ | |{{ Images_Cahier-201-05-073.png? | ||
+ | </ | ||
+ | <WRAP column 50%> | ||
+ | |{{ Images_Cahier-201-05-074.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | <WRAP column 32%> | ||
+ | On s'est connecté sans aucun problème. | ||
+ | </ | ||
+ | <WRAP column 60%> | ||
+ | |{{ Images_Cahier-201-05-075.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | ===== Logo ===== | ||
+ | |||
+ | Pour s' | ||
+ | |||
+ | <WRAP column 46%> | ||
+ | ** Tableau de bord -> Administration du site -> Présentation -> Logos**. | ||
+ | |||
+ | On sélectionne le fichier de notre logo et on le glisse à l' | ||
+ | {{ Images_Cahier-201-05-076.png? | ||
+ | |||
+ | On s' | ||
+ | {{ Images_Cahier-201-05-077.png? | ||
+ | </ | ||
+ | <WRAP column 46%> | ||
+ | |{{ Images_Cahier-201-05-078.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | <WRAP column 20%> | ||
+ | On se rend à la page d' | ||
+ | </ | ||
+ | <WRAP column 72%> | ||
+ | |{{ Images_Cahier-201-05-079.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | ===== Instantané VirtualBox ===== | ||
+ | |||
+ | {{Images_Cahier-101-03-004.png? | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | ====== Cron de Moodle ====== | ||
+ | |||
+ | // | ||
+ | Le processus //Moodle cron// est un script PHP, partie intégrante de la distribution standard de Moodle, qui doit être lancé régulièrement. Ce script lance diverses tâches programmées à différents intervalles. | ||
+ | |||
+ | IMPORTANT! Ne sautez pas l' | ||
+ | |||
+ | Il est recommandé de lancer le cron à une fréquence d'une fois par minute, comme cela est requis pour la suppression synchrone des activités lors de l' | ||
+ | |||
+ | Le programme '' | ||
+ | |||
+ | Ce script est aussi connu tout simplement comme "le cron". Il recherche, dans tous les répertoires de modules, des fichiers '' | ||
+ | |||
+ | // | ||
+ | Par exemple, Moodle doit consulter les forums de discussion pour pouvoir envoyer des copies des messages aux personnes qui se sont abonnées. | ||
+ | |||
+ | Le script se trouve dans le répertoire '' | ||
+ | |||
+ | Le script '' | ||
+ | |||
+ | La charge de ce script n’est pas très importante, donc 5 minutes est généralement raisonnable, | ||
+ | |||
+ | ===== Cron en mode terminal seulement ===== | ||
+ | |||
+ | On s' | ||
+ | |||
+ | <WRAP column 20%> | ||
+ | **Tableau de bord -> Administration du site -> Sécurité -> Réglages de sécurité du site**. | ||
+ | </ | ||
+ | <WRAP column 72%> | ||
+ | |{{ Images_Cahier-201-05-080.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | ==== Commande cron ==== | ||
+ | |||
+ | //Fichier de cron:// -> ''/ | ||
+ | //Programme PHP:// -> ''/ | ||
+ | //Commande cron:// -> ''/ | ||
+ | // | ||
+ | |||
+ | ==== Tâche cron ==== | ||
+ | |||
+ | === Shell de l' | ||
+ | |||
+ | L' | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# cat /etc/passwd | grep apache | ||
+ | |||
+ | apache: | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | L' | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# crontab -u apache -e | ||
+ | |||
+ | |||
+ | </ | ||
+ | |||
+ | On entre le texte ci-dessous et on quitte avec **[Échap] [: | ||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | < | ||
+ | # Tâche cron qui lance / | ||
+ | # minutes et qui recherche dans tous les répertoires du module les fichiers cron.php et les | ||
+ | # exécute. | ||
+ | # | ||
+ | # Michel-André, | ||
+ | # | ||
+ | # ┌───────────── min (0 - 59) | ||
+ | # │ ┌────────────── heure (0 - 23) | ||
+ | # │ │ ┌─────────────── jour du mois (1 - 31) | ||
+ | # │ │ │ ┌──────────────── mois (1 - 12) | ||
+ | # │ │ │ │ ┌───────────────── jour de la semaine (0 - 6) (0 à 6 sont de dimanche à samedi, | ||
+ | # │ │ │ │ │ 7 est dimanche, même que 0) | ||
+ | # │ │ │ │ │ | ||
+ | # * * * * * [usager] commande à exécuter | ||
+ | # | ||
+ | */5 * * * * / | ||
+ | |||
+ | |||
+ | </ | ||
+ | |||
+ | À la sortie de '' | ||
+ | |||
+ | < | ||
+ | ... | ||
+ | crontab: installing new crontab | ||
+ | bash-4.2$ | ||
+ | </ | ||
+ | |||
+ | On repart le démon //crond//. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# systemctl restart crond | ||
+ | |||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | On s' | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# tail -f / | ||
+ | |||
+ | Aug 21 10:30:01 tchana CROND[9245]: | ||
+ | Aug 21 10:35:01 tchana CROND[9539]: | ||
+ | Aug 21 10:40:01 tchana CROND[9832]: | ||
+ | ... | ||
+ | </ | ||
+ | |||
+ | On sort de la commande '' | ||
+ | |||
+ | < | ||
+ | ^C | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | <WRAP column 46%> | ||
+ | ==== Journal cron ==== | ||
+ | |||
+ | **Tableau de bord -> Administration -> Logs -> / | ||
+ | </ | ||
+ | <WRAP column 46%> | ||
+ | |{{ Images_Cahier-201-05-081.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | <WRAP column 20%> | ||
+ | Le journal indique les tâches que l' | ||
+ | </ | ||
+ | <WRAP column 72%> | ||
+ | |{{ Images_Cahier-201-05-082.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | On vérifie manuellement. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# / | ||
+ | |||
+ | Server Time: Wed, 21 Aug 2019 10:40:58 -0400 | ||
+ | |||
+ | |||
+ | Cron script completed correctly | ||
+ | Cron completed at 10:40:58. Memory used 4.3Mo. | ||
+ | Execution took 0.027558 seconds | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | ===== Instantané VirtualBox ===== | ||
+ | |||
+ | {{Images_Cahier-101-03-004.png? | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | ====== Messagerie électronique NethServer ====== | ||
+ | |||
+ | ===== Configuration ===== | ||
+ | |||
+ | ==== NethServer ==== | ||
+ | |||
+ | On crée un //alias// pour la messagerie électronique de notre domaine __moodle.micronator-dev.org__. | ||
+ | |||
+ | <WRAP column 46%> | ||
+ | **Configuration -> DNS ->** onglet | ||
+ | |{{ Images_Cahier-201-05-083.png? | ||
+ | </ | ||
+ | <WRAP column 46%> | ||
+ | \\ | ||
+ | On entre les informations demandées. | ||
+ | |{{ Images_Cahier-201-05-084.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | <WRAP column 20%> | ||
+ | L'// | ||
+ | </ | ||
+ | <WRAP column 72%> | ||
+ | |{{ Images_Cahier-201-05-085.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | === Vérification === | ||
+ | |||
+ | On vérifie la messagerie électronique de notre Serveur NethServer. | ||
+ | |||
+ | On se logue à [[https:// | ||
+ | |||
+ | <WRAP column 30%> | ||
+ | |{{ Images_Cahier-201-05-086.png? | ||
+ | </ | ||
+ | <WRAP column 30%> | ||
+ | |{{ Images_Cahier-201-05-087.png? | ||
+ | </ | ||
+ | <WRAP column 30%> | ||
+ | |{{ Images_Cahier-201-05-088.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | <WRAP column 30%> | ||
+ | < | ||
+ | |||
+ | < | ||
+ | |||
+ | Le message de l' | ||
+ | </ | ||
+ | <WRAP column 30%> | ||
+ | |{{ Images_Cahier-201-05-089.png? | ||
+ | </ | ||
+ | <WRAP column 30%> | ||
+ | |{{ Images_Cahier-201-05-090.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | === Moodle === | ||
+ | |||
+ | **Tableau de bord -> Administration du site -> Serveur -> Courriel -> Configuration du courriel sortant**. | ||
+ | |||
+ | On prend les défauts, sauf pour //Hôtes SMTP//, // | ||
+ | |||
+ | <WRAP column 30%> | ||
+ | |{{ Images_Cahier-201-05-091.png? | ||
+ | </ | ||
+ | <WRAP column 30%> | ||
+ | |{{ Images_Cahier-201-05-092.png? | ||
+ | </ | ||
+ | <WRAP column 30%> | ||
+ | |{{ Images_Cahier-201-05-093.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | ===== Installation d'une extension de test de courriels ===== | ||
+ | |||
+ | {{Images_Cahier-101-03-004.png? | ||
+ | // | ||
+ | // | ||
+ | // | ||
+ | |||
+ | ==== Téléchargement ==== | ||
+ | |||
+ | On se rend à la page: [[https:// | ||
+ | |||
+ | <WRAP column 20%> | ||
+ | On choisit notre version LTS: **Moodle 3.5**, la page se rafraîchit automatiquement. | ||
+ | </ | ||
+ | <WRAP column 72%> | ||
+ | |{{ Images_Cahier-201-05-094.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | <WRAP column 30%> | ||
+ | **Download**. | ||
+ | |{{ Images_Cahier-201-05-095.png? | ||
+ | </ | ||
+ | <WRAP column 30%> | ||
+ | **Enregistrer le fichier -> OK**. | ||
+ | |{{ Images_Cahier-201-05-096.png? | ||
+ | </ | ||
+ | <WRAP column 30%> | ||
+ | On choisit un répertoire **-> Enregistrer**. | ||
+ | |{{ Images_Cahier-201-05-097.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | ==== Installation de l' | ||
+ | |||
+ | <WRAP column 46%> | ||
+ | **Tableau de bord -> Administration du site -> Plugins -> Installer des plugins -> Choisir un fichier...** | ||
+ | |{{ Images_Cahier-201-05-098.png? | ||
+ | </ | ||
+ | <WRAP column 46%> | ||
+ | \\ | ||
+ | **Déposer un fichier -> Parcourir...** | ||
+ | |{{ Images_Cahier-201-05-099.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | <WRAP column 30%> | ||
+ | On sélectionne le fichier téléchargé précédemment **-> Ouvrir**. | ||
+ | |{{ Images_Cahier-201-05-100.png? | ||
+ | </ | ||
+ | <WRAP column 30%> | ||
+ | < | ||
+ | < | ||
+ | |{{ Images_Cahier-201-05-101.png? | ||
+ | </ | ||
+ | <WRAP column 30%> | ||
+ | **Installer le plugin à partir du fichier ZIP**. | ||
+ | |{{ Images_Cahier-201-05-102.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | <WRAP column 30%> | ||
+ | \\ | ||
+ | **Continuer**. | ||
+ | |{{ Images_Cahier-201-05-103.png? | ||
+ | </ | ||
+ | <WRAP column 30%> | ||
+ | **Mettre à jour la base de données maintenant**. | ||
+ | |{{ Images_Cahier-201-05-104.png? | ||
+ | </ | ||
+ | <WRAP column 30%> | ||
+ | \\ | ||
+ | **Continuer**. | ||
+ | |{{ Images_Cahier-201-05-105.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | ===== Nom de nos domaines sur la liste blanche ===== | ||
+ | |||
+ | {{Images_Cahier-101-03-003.png? | ||
+ | |||
+ | <WRAP column 35%> | ||
+ | **Configuration -> Messagerie électronique ->** onglet **Filtre**. | ||
+ | |||
+ | On déroule le menu et on clique: | ||
+ | **Nouvelle autorisation pour**. | ||
+ | |||
+ | On ajoute: | ||
+ | **micronator-dev.org** et\\ | ||
+ | **moodle.micronator-dev.org**. | ||
+ | |||
+ | {{ Images_Cahier-201-05-106.png? | ||
+ | |||
+ | {{ Images_Cahier-201-05-107.png? | ||
+ | |||
+ | </ | ||
+ | <WRAP column 57%> | ||
+ | |{{ Images_Cahier-201-05-108.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | <WRAP column 30%> | ||
+ | < | ||
+ | |||
+ | < | ||
+ | </ | ||
+ | <WRAP column 40%> | ||
+ | |{{ Images_Cahier-201-05-109.png? | ||
+ | </ | ||
+ | <WRAP column 20%> | ||
+ | |{{ Images_Cahier-201-05-110.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | ===== Test de messagerie électronique de Moodle ===== | ||
+ | |||
+ | <WRAP column 35%> | ||
+ | **Tableau de bord -> Administration du site -> Serveur -> Courriel -> Test du système de courriel**. | ||
+ | </ | ||
+ | <WRAP column 57%> | ||
+ | |{{ Images_Cahier-201-05-111.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | <WRAP column 35%> | ||
+ | //**À l' | ||
+ | On entre l' | ||
+ | |||
+ | ☑ **Toujours afficher le journal des communications...** | ||
+ | |||
+ | **-> Envoyer un message de test**. | ||
+ | </ | ||
+ | <WRAP column 57%> | ||
+ | |{{ Images_Cahier-201-05-112.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | <WRAP column 35%> | ||
+ | Succès. | ||
+ | |||
+ | **Continuer** pour retourner à la page de test. | ||
+ | </ | ||
+ | <WRAP column 57%> | ||
+ | |{{ Images_Cahier-201-05-113.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | <WRAP column 35%> | ||
+ | <wrap em>__Sur notre serveur principal__</ | ||
+ | \\ | ||
+ | \\ | ||
+ | <WRAP centeralign> | ||
+ | </ | ||
+ | <WRAP column 57%> | ||
+ | |{{ Images_Cahier-201-05-114.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | ===== Instantané VirtualBox ===== | ||
+ | |||
+ | {{Images_Cahier-101-03-004.png? | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | ====== Auto-enregistrement par courriel ====== | ||
+ | |||
+ | ===== Introduction ===== | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | {{Images_Cahier-101-03-003.png? | ||
+ | <WRAP centeralign> | ||
+ | Cette URL est mise à jour quasi quotidiennement.</ | ||
+ | Copiez et collez la liste complète dans le champ // | ||
+ | |||
+ | {{ Images_Cahier-201-05-115.png? | ||
+ | \\ | ||
+ | |||
+ | ===== Activation de l' | ||
+ | |||
+ | Lors de l' | ||
+ | [[nethserver_201_cahier_05_moodle# | ||
+ | , nous n' | ||
+ | |||
+ | Nous allons activer l'// | ||
+ | |||
+ | <WRAP column 20%> | ||
+ | **Tableau de bord -> Administration du site -> Plugins -> Authentification**. | ||
+ | |||
+ | // | ||
+ | Si non activé, on clique l' | ||
+ | </ | ||
+ | <WRAP column 72%> | ||
+ | |{{ Images_Cahier-201-05-116.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | <WRAP column 20%> | ||
+ | // | ||
+ | **-> Auto-enregistrement par courriel**. | ||
+ | |||
+ | On peut aussi cocher // | ||
+ | |||
+ | {{ Images_Cahier-201-05-076.png? | ||
+ | </ | ||
+ | <WRAP column 72%> | ||
+ | |{{ Images_Cahier-201-05-118.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | ===== Nouvel utilisateur ===== | ||
+ | |||
+ | <WRAP column 25%> | ||
+ | On se déconnecte. | ||
+ | |{{ Images_Cahier-201-05-119.png? | ||
+ | </ | ||
+ | <WRAP column 30%> | ||
+ | **Connexion**. | ||
+ | |{{ Images_Cahier-201-05-120.png? | ||
+ | </ | ||
+ | <WRAP column 35%> | ||
+ | **Créer un compte**. | ||
+ | |{{ Images_Cahier-201-05-121.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | On entre les informations demandées pour le Grand Général **-> Créer mon compte**. | ||
+ | <WRAP column 30%> | ||
+ | |{{ Images_Cahier-201-05-122.png? | ||
+ | </ | ||
+ | <WRAP column 30%> | ||
+ | |{{ Images_Cahier-201-05-123.png? | ||
+ | </ | ||
+ | <WRAP column 30%> | ||
+ | |{{ Images_Cahier-201-05-124.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | <WRAP column 20%> | ||
+ | Le Grand Général, qui est déjà un utilisateur de la messagerie électronique <wrap em>__sur notre serveur principal__</ | ||
+ | |||
+ | Il se rend à l' | ||
+ | </ | ||
+ | <WRAP column 72%> | ||
+ | |{{ Images_Cahier-201-05-125.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | <WRAP column 20%> | ||
+ | L' | ||
+ | |||
+ | Le Grand Général clique **Continuer**. | ||
+ | </ | ||
+ | <WRAP column 72%> | ||
+ | |{{ Images_Cahier-201-05-126.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | <WRAP column 30%> | ||
+ | Son //Tableau de bord// s' | ||
+ | \\ | ||
+ | \\ | ||
+ | \\ | ||
+ | \\ | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | <WRAP centeralign> | ||
+ | </ | ||
+ | <WRAP column 46%> | ||
+ | |{{Images_Cahier-201-05-127.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | ===== Instantané VirtualBox ===== | ||
+ | |||
+ | {{Images_Cahier-101-03-004.png? | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | ===== Tutoriels ===== | ||
+ | |||
+ | ==== Texte ==== | ||
+ | |||
+ | Portail de la corporation DECclic: -> [[https:// | ||
+ | |||
+ | UQAC: | ||
+ | -> //Guide Moodle pour étudiants:// | ||
+ | -> //Guide Moodle conplet pour enseignants:// | ||
+ | |||
+ | 100 Tutoriels Moodle // | ||
+ | |||
+ | PDF: → [[https:// | ||
+ | |||
+ | ==== Vidéo ==== | ||
+ | |||
+ | Vidéos généraux: → [[https:// | ||
+ | |||
+ | Vidéos Moodle-3.5: → 32 vidéos, chacun de quelques minutes seulement. -> [[https:// | ||
+ | |||
+ | 100 tutoriels vidéos pour Moodle: -> [[http:// | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | ====== Sécurité ====== | ||
+ | |||
+ | ===== Fichier .htaccess ===== | ||
+ | |||
+ | Pour encore plus de sécurité, on crée un fichier '' | ||
+ | |||
+ | ==== Protection du fichier config.php ==== | ||
+ | |||
+ | {{Images_icone-201-003_Note.png? | ||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | < | ||
+ | cat > / | ||
+ | # ************************************** | ||
+ | # Pour protéger le fichier config.php | ||
+ | <Files config.php> | ||
+ | order allow,deny | ||
+ | deny from all | ||
+ | </ | ||
+ | |||
+ | EOT | ||
+ | |||
+ | </ | ||
+ | |||
+ | On vérifie le contenu. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# tail -8 / | ||
+ | |||
+ | # ************************************** | ||
+ | # Pour protéger le fichier config.php | ||
+ | <Files config.php> | ||
+ | order allow,deny | ||
+ | deny from all | ||
+ | </ | ||
+ | |||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | On ajuste les droits et permissions. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# chmod 640 / | ||
+ | |||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | On ajuste le propriétaire et le groupe. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# chown apache: | ||
+ | |||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | On vérifie. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# ls -ls / | ||
+ | |||
+ | 4 -rw-r----- 1 apache apache 142 26 août 13:04 / | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | ==== Protection du fichier .htaccess lui-même ==== | ||
+ | |||
+ | {{Images_icone-201-003_Note.png? | ||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | < | ||
+ | cat >> / | ||
+ | # ************************************** | ||
+ | # Pour protéger le fichier htaccess lui-même | ||
+ | <Files .htaccess> | ||
+ | order allow,deny | ||
+ | deny from all | ||
+ | </ | ||
+ | |||
+ | EOT | ||
+ | |||
+ | </ | ||
+ | |||
+ | On vérifie le contenu. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# tail -8 / | ||
+ | |||
+ | # ************************************** | ||
+ | # Pour protéger le fichier htaccess lui-même | ||
+ | <Files .htaccess> | ||
+ | order allow,deny | ||
+ | deny from all | ||
+ | </ | ||
+ | |||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | ==== Directives Apache ==== | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | < | ||
+ | cat >> / | ||
+ | # ************************************** | ||
+ | # DIRECTIVES POUR APACHE | ||
+ | |||
+ | # Permettre au serveur de suivre les liens symboliques dans les répertoires concernés. | ||
+ | Options +FollowSymLinks | ||
+ | |||
+ | # Empêcher d' | ||
+ | # c' | ||
+ | Options -Indexes | ||
+ | |||
+ | EOT | ||
+ | |||
+ | </ | ||
+ | |||
+ | On vérifie. | ||
+ | |||
+ | < | ||
+ | root@tchana ~]# tail -10 / | ||
+ | |||
+ | # ************************************** | ||
+ | # DIRECTIVES POUR APACHE | ||
+ | |||
+ | # Permettre au serveur de suivre les liens symboliques dans les répertoires concernés. | ||
+ | Options +FollowSymLinks | ||
+ | |||
+ | # Empêcher d' | ||
+ | # c' | ||
+ | Options -Indexes | ||
+ | |||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | ==== AllowOverride ==== | ||
+ | |||
+ | Nous allons ajouter un nouveau fichier de configuration '' | ||
+ | |||
+ | // | ||
+ | // | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | < | ||
+ | cat > / | ||
+ | < | ||
+ | # | ||
+ | # Modification par Michel-André le 26 août 2019 | ||
+ | # Afin que le démon httpd traite les fichers .htacces dans les répertoires et | ||
+ | # sous-répertoires de / | ||
+ | AllowOverride All | ||
+ | </ | ||
+ | |||
+ | EOT | ||
+ | |||
+ | </ | ||
+ | |||
+ | On vérifie. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# ls -als / | ||
+ | |||
+ | 4 -rw-r--r-- 1 root root 288 26 août 13:22 / | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | On affiche le contenu du fichier. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# cat / | ||
+ | |||
+ | < | ||
+ | # | ||
+ | # Modification par Michel-André le 26 août 2019 | ||
+ | # Afin que le démon httpd traite les fichers .htacces dans les répertoires et | ||
+ | # sous-répertoires de / | ||
+ | AllowOverride All | ||
+ | </ | ||
+ | |||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | {{Images_icone-201-003_Note.png? | ||
+ | |||
+ | === 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 ~]# | ||
+ | </ | ||
+ | |||
+ | === 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 ~]# | ||
+ | </ | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | ===== Proxy Web ===== | ||
+ | |||
+ | <WRAP column 40%> | ||
+ | Si vous êtes derrière un pare-feu, vous devrez renseigner les identifiants pour votre mandataire dans la section "Proxy web". | ||
+ | |||
+ | **Tableau de bord -> Administration du site -> Serveur -> HTTP ->** cadre **Proxy web**. | ||
+ | </ | ||
+ | <WRAP column 52%> | ||
+ | |{{ Images_Cahier-201-05-128.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | ===== Bouton de connexion anonyme ===== | ||
+ | |||
+ | Par sécurité. on supprime l' | ||
+ | |||
+ | **Tableau de bord -> Administration du site -> Plugins -> Authentification -> Gestion de l' | ||
+ | |||
+ | {{ Images_Cahier-201-05-129.png? | ||
+ | \\ | ||
+ | |||
+ | ===== Connexion pour voir les profils ===== | ||
+ | |||
+ | **Tableau de bord -> Administration du site -> Sécurité**. | ||
+ | |||
+ | Dans le cadre //Réglages de sécurité du site//, on s' | ||
+ | |||
+ | {{ Images_Cahier-201-05-130.png? | ||
+ | |||
+ | Si vous modifiez ce paramètre, il faut cliquer <wrap em> | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | ===== Affichage du profil des utilisateurs inscrits à des cours uniquement ===== | ||
+ | |||
+ | **Tableau de bord -> Administration du site -> Sécurité**. | ||
+ | |||
+ | Dans le cadre //Réglages de sécurité du site//, on s' | ||
+ | |||
+ | {{ Images_Cahier-201-05-131.png? | ||
+ | \\ | ||
+ | |||
+ | ===== Appliquer les restrictions de domaines ===== | ||
+ | |||
+ | **Tableau de bord -> Administration du site -> Sécurité**. | ||
+ | |||
+ | Dans le cadre //Réglages communs//, on s' | ||
+ | |||
+ | {{ Images_Cahier-201-05-132.png? | ||
+ | \\ | ||
+ | |||
+ | ===== ReCAPTCHA ===== | ||
+ | |||
+ | // | ||
+ | " | ||
+ | " | ||
+ | |||
+ | ===== Sécurité supplémentaire ===== | ||
+ | |||
+ | On peut consulter les liens suivants: | ||
+ | //Security recommendations:// | ||
+ | // | ||
+ | |||
+ | ===== Ajustement des droits ===== | ||
+ | |||
+ | Pour une dernière fois après la configuration de Moodle, on ajuste le propriétaire, | ||
+ | |||
+ | ==== Répertoire moodle ==== | ||
+ | |||
+ | On ajuste __**R**__écursivement le propriétaire et le groupe. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# chown -R apache / | ||
+ | |||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | On fait de même pour les fichiers/ | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# chown -R apache / | ||
+ | |||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | On renforce la sécurité de l’accès aux fichiers //( f )// en supprimant les droits à " | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# find -L / | ||
+ | |||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | On répète l' | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# find -L / | ||
+ | |||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | On vérifie les paramètres des répertoires et des fichiers, standards ou cachés. On s' | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# ls -als / | ||
+ | |||
+ | total 660 | ||
+ | 4 drwxr-s--- 52 apache apache | ||
+ | 0 drwxr-xr-x | ||
+ | 4 drwxr-s--- 13 apache apache | ||
+ | ... | ||
+ | 4 -rw-r----- | ||
+ | ... | ||
+ | 0 drwxr-s--- | ||
+ | ... | ||
+ | 4 -rw-r----- | ||
+ | ... | ||
+ | 4 -rw-r----- | ||
+ | 0 drwxr-s--- | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | ==== Répertoire moodledata ==== | ||
+ | |||
+ | On ajuste __**R**__écursivement le propriétaire et le groupe. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# chown -R apache / | ||
+ | |||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | On fait de même pour les fichiers/ | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# chown -R apache / | ||
+ | |||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | On renforce la sécurité de l’accès aux fichiers //( f )// en supprimant les droits à " | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# find -L / | ||
+ | |||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | On répète l' | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# find -L / | ||
+ | |||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | On vérifie les paramètres des répertoires et des fichiers, standards ou cachés. On s' | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# ls -als / | ||
+ | |||
+ | total 12 | ||
+ | 0 drwxr-s--- 12 apache apache | ||
+ | 0 drwxr-xr-x | ||
+ | 0 drwxr-s--- | ||
+ | 0 drwxr-s--- 11 apache apache | ||
+ | 4 -rw-r----- | ||
+ | 4 -rw-r----- | ||
+ | 0 drwxr-s--- | ||
+ | 0 drwxr-s--- | ||
+ | 4 drwxr-s--- 65 apache apache 4096 26 août 18:05 lock | ||
+ | 0 drwxr-s--- | ||
+ | 0 drwxr-s--- | ||
+ | 0 drwxr-s--- | ||
+ | 0 drwxr-s--- | ||
+ | 0 drwxr-s--- | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | ===== Instantané VirtualBox ===== | ||
+ | |||
+ | {{Images_Cahier-101-03-004.png? | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | ====== Mise à jour de Moodle ====== | ||
+ | |||
+ | ===== Restez à jour ===== | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | {{Images_Cahier-101-03-003.png? | ||
+ | L' | ||
+ | [[nethserver_201_cahier_05_moodle# | ||
+ | . | ||
+ | |||
+ | ===== Mise à jour du Noyau Moodle ===== | ||
+ | |||
+ | // | ||
+ | Lors d'une mise à jour, '' | ||
+ | |||
+ | On se rend dans le répertoire racine de Moodle. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# cd / | ||
+ | |||
+ | [root@tchana moodle]# | ||
+ | </ | ||
+ | |||
+ | On vérifie. | ||
+ | |||
+ | < | ||
+ | [root@tchana moodle]# pwd | ||
+ | |||
+ | / | ||
+ | [root@tchana moodle]# | ||
+ | </ | ||
+ | |||
+ | On s' | ||
+ | |||
+ | < | ||
+ | bash-4.2$ git branch -a | ||
+ | |||
+ | * MOODLE_35_STABLE | ||
+ | remotes/ | ||
+ | remotes/ | ||
+ | ... | ||
+ | remotes/ | ||
+ | remotes/ | ||
+ | remotes/ | ||
+ | remotes/ | ||
+ | bash-4.2$ | ||
+ | </ | ||
+ | |||
+ | L' | ||
+ | |||
+ | On met à jour le noyau de Moodle. | ||
+ | |||
+ | < | ||
+ | [root@tchana moodle]# git pull | ||
+ | |||
+ | remote: Counting objects: 1988, done. | ||
+ | remote: Compressing objects: 100% (251/251), done. | ||
+ | remote: Total 1275 (delta 1017), reused 1264 (delta 1006) | ||
+ | Receiving objects: 100% (1275/ | ||
+ | Resolving deltas: 100% (1017/ | ||
+ | From git:// | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | Updating d6af305..de16819 | ||
+ | Fast-forward | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | 37 files changed, 379 insertions(+), | ||
+ | [root@tchana moodle]# | ||
+ | </ | ||
+ | |||
+ | Le noyau de Moodle a été mis à jour: // | ||
+ | |||
+ | ===== Propriétaire, | ||
+ | |||
+ | Après une mise à jour, il est toujours préférable d' | ||
+ | |||
+ | On ajuste __**R**__écursivement le propriétaire et le groupe pour tout le répertoire racine de Moodle. | ||
+ | |||
+ | < | ||
+ | [root@tchana moodle]# chown -R apache: | ||
+ | |||
+ | [root@tchana moodle]# | ||
+ | </ | ||
+ | |||
+ | On répète la commande pour les fichiers/ | ||
+ | |||
+ | < | ||
+ | [root@tchana moodle]# chown -R apache: | ||
+ | |||
+ | [root@tchana moodle]# | ||
+ | </ | ||
+ | |||
+ | On renforce la sécurité de l’accès aux fichiers //( f )// en supprimant les droits à " | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | < | ||
+ | [root@tchana moodle]# find -L / | ||
+ | |||
+ | [root@tchana moodle]# | ||
+ | </ | ||
+ | |||
+ | On répète l' | ||
+ | |||
+ | < | ||
+ | [root@tchana moodle]# find -L / | ||
+ | |||
+ | [root@tchana moodle]# | ||
+ | </ | ||
+ | |||
+ | On vérifie les paramètres des répertoires et des fichiers, standards ou cachés. On s' | ||
+ | |||
+ | < | ||
+ | [root@tchana moodle]# ls -als / | ||
+ | |||
+ | total 656 | ||
+ | 4 drwxr-s--- 52 apache apache | ||
+ | 0 drwxr-xr-x | ||
+ | 4 drwxr-s--- 13 apache apache | ||
+ | 0 drwxr-s--- | ||
+ | ... | ||
+ | 4 -rw-r----- | ||
+ | 8 -rw-r----- | ||
+ | ... | ||
+ | 0 drwxr-s--- | ||
+ | 4 -rw-r----- | ||
+ | 0 drwxr-s--- | ||
+ | [root@tchana moodle]# | ||
+ | </ | ||
+ | |||
+ | ==== Interface Web - mise à jour de la BD ==== | ||
+ | |||
+ | Si nous sommes déjà connecté à Moodle, on rafraîchit la page, sinon on se connecte. | ||
+ | |||
+ | <WRAP column 46%> | ||
+ | **Continuer**. | ||
+ | |{{ Images_Cahier-201-05-133.png? | ||
+ | </ | ||
+ | <WRAP column 46%> | ||
+ | **Continuer**. | ||
+ | |{{ Images_Cahier-201-05-134.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | === Extensions === | ||
+ | |||
+ | C'est ici qu'on peut // | ||
+ | |||
+ | <WRAP column 30%> | ||
+ | \\ | ||
+ | **Mettre à jour la base de données**. | ||
+ | |{{ Images_Cahier-201-05-135.png? | ||
+ | </ | ||
+ | <WRAP column 30%> | ||
+ | \\ | ||
+ | **Continuer**. | ||
+ | |{{ Images_Cahier-201-05-136.png? | ||
+ | </ | ||
+ | <WRAP column 30%> | ||
+ | < | ||
+ | < | ||
+ | |{{ Images_Cahier-201-05-137.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | ===== Extensions, thèmes ou code personnel ===== | ||
+ | |||
+ | Si vous installez du code personnel supplémentaire sur votre Moodle, il faut demander à '' | ||
+ | |||
+ | Pour cela, il faut tenir à jour un fichier qui liste les répertoires à ne pas être supervisés par '' | ||
+ | |||
+ | On modifie le fichier: ''/ | ||
+ | |||
+ | On ajoute, à la fin de ce fichier, la liste des répertoires à ne pas superviser. Par exemple: pour un //mod//, un //thème// et un //bloc//: | ||
+ | |||
+ | <WRAP box> | ||
+ | < | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | ===== Vérification du site Moodle ===== | ||
+ | |||
+ | {{Images_Cahier-101-03-003.png? | ||
+ | On se connecte à Moodle et on vérifie que tout fonctionne correctement tel qu' | ||
+ | |||
+ | <WRAP column 30%> | ||
+ | **Connexion**. | ||
+ | |{{ Images_Cahier-201-05-138.png? | ||
+ | </ | ||
+ | <WRAP column 30%> | ||
+ | On entre les informations demandées. | ||
+ | |{{ Images_Cahier-201-05-139.png? | ||
+ | </ | ||
+ | <WRAP column 30%> | ||
+ | Tableau de bord. | ||
+ | |{{ Images_Cahier-201-05-140.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | On vérifie quelques pages. | ||
+ | |||
+ | <WRAP column 30%> | ||
+ | **Accueil du site**. | ||
+ | |{{ Images_Cahier-201-05-141.png? | ||
+ | </ | ||
+ | <WRAP column 30%> | ||
+ | **Fichiers personnels**. | ||
+ | |{{ Images_Cahier-201-05-142.png? | ||
+ | </ | ||
+ | <WRAP column 30%> | ||
+ | **Administration du site**. | ||
+ | |{{ Images_Cahier-201-05-143.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | <WRAP centeralign> | ||
+ | \\ | ||
+ | |||
+ | ====== Mise à jour des Collections ====== | ||
+ | |||
+ | ===== Introduction ===== | ||
+ | |||
+ | {{Images_icone-201-003_Note.png? | ||
+ | [[nethserver_101_cahier_06_nethserver_wordPress# | ||
+ | du **Cahier-06: | ||
+ | |||
+ | Présentement, | ||
+ | |||
+ | ===== Mises à jour ===== | ||
+ | |||
+ | On lance les mises à jour des deux // | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# yum update -y --enablerepo=stephdl nethserver-php-scl nethserver-rh-mariadb102 | ||
+ | |||
+ | Loaded plugins: changelog, fastestmirror, | ||
+ | Determining fastest mirrors | ||
+ | epel/ | ||
+ | * ce-base: ewr.edge.kernel.org | ||
+ | ... | ||
+ | Dependencies Resolved | ||
+ | ... | ||
+ | Transaction Summary | ||
+ | ============================================================================================ | ||
+ | Install | ||
+ | Upgrade | ||
+ | ... | ||
+ | Dependency Installed: | ||
+ | oniguruma5.x86_64 0: | ||
+ | php72-php-opcache.x86_64 0: | ||
+ | |||
+ | Updated: | ||
+ | nethserver-php-scl.x86_64 0: | ||
+ | |||
+ | Dependency Updated: | ||
+ | php71-php-bcmath.x86_64 0: | ||
+ | ... | ||
+ | php73-php-xml.x86_64 0: | ||
+ | |||
+ | Complete! | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | {{Images_Cahier-101-03-005.png? | ||
+ | {{Images_Cahier-101-03-003.png? | ||
+ | |||
+ | ===== Instantané VirtualBox ===== | ||
+ | |||
+ | {{Images_Cahier-101-03-004.png? | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | ====== Mises à jour de NethServer ====== | ||
+ | |||
+ | ===== Serveur NethServer ===== | ||
+ | |||
+ | {{Images_icone-201-003_Note.png? | ||
+ | [[nethserver_201_cahier_04_dokuwiki# | ||
+ | du **Cahier-04: | ||
+ | |||
+ | <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 ====== | ||
+ | |||
+ | {{Images_icone-201-003_Note.png? | ||
+ | [[nethserver_201_cahier_04_dokuwiki# | ||
+ | du **Cahier-04: | ||
+ | |||
+ | ===== Écran conventionnel de démarrage ===== | ||
+ | |||
+ | <WRAP column 46%> | ||
+ | Si nous voulons voir l' | ||
+ | |||
+ | <WRAP centeralign> | ||
+ | ''/ | ||
+ | </ | ||
+ | |{{ Images_Cahier-101-03-368.png? | ||
+ | </ | ||
+ | <WRAP column 46%> | ||
+ | |{{ 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 répertoire ''/ | ||
+ | |||
+ | {{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 ~]# | ||
+ | |||
+ | {{Images_icone-201-003_Note.png? | ||
+ | |||
+ | On pourra vérifier, 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 46%> | ||
+ | \\ | ||
+ | \\ | ||
+ | < | ||
+ | < | ||
+ | |{{ Images_Cahier-101-03-372.png? | ||
+ | </ | ||
+ | <WRAP column 46%> | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | |{{ Images_Cahier-101-03-373.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | <WRAP center> | ||
+ | <WRAP column 46%> | ||
+ | \\ | ||
+ | \\ | ||
+ | < | ||
+ | < | ||
+ | |{{ Images_Cahier-101-03-374.png? | ||
+ | </ | ||
+ | <WRAP column 46%> | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | |{{ 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 46%> | ||
+ | // | ||
+ | **micronator-101.org | ||
+ | |{{ Images_Cahier-101-03-376.png? | ||
+ | </ | ||
+ | <WRAP column 46%> | ||
+ | < | ||
+ | < | ||
+ | |{{ 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 '' | ||
+ | |||
+ | < | ||
+ | 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 46%> | ||
+ | < | ||
+ | < | ||
+ | |{{ Images_Cahier-101-03-385.png? | ||
+ | \\ | ||
+ | Au retour, on amorce le Serveur NethServer et le message ne s' | ||
+ | </ | ||
+ | <WRAP column 46%> | ||
+ | \\ | ||
+ | **Affichage ->** onglet **Écran -> Contrôleur graphique ->** on change pour **VboxVGA -> OK**. | ||
+ | |{{ 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 46%> | ||
+ | **Configuration | ||
+ | |||
+ | On change l'IP de la passerelle pour l'IP du rôle __< | ||
+ | |||
+ | **SOUMETTRE**. | ||
+ | </ | ||
+ | <WRAP column 46%> | ||
+ | |{{ Images_Cahier-101-03-395.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | ==== Serveurs DNS ==== | ||
+ | |||
+ | // | ||
+ | ... Le **DNS de Cloudflare** est un excellent 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 46%> | ||
+ | |{{ Images_Cahier-101-03-396.png? | ||
+ | </ | ||
+ | <WRAP column 46%> | ||
+ | |{{ Images_Cahier-101-03-397.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | <WRAP column 46%> | ||
+ | **Configuration | ||
+ | |||
+ | On ajuste les //**DNS Primaire**// | ||
+ | |||
+ | {{Images_Cahier-101-03-005.png? | ||
+ | |||
+ | Le serveur //**DNS secondaire**// | ||
+ | |||
+ | **Soumettre**. | ||
+ | </ | ||
+ | <WRAP column 46%> | ||
+ | |{{ Images_Cahier-101-03-398.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | Si votre FAI filtre l' | ||
+ | [[https:// | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | ===== Serveur de production ===== | ||
+ | |||
+ | {{ Images_Cahier-201-05-146.png? | ||
+ | Une fois que vous maîtrisez tous les aspects de: //Moodle//, // | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | \\ | ||
+ | {{NS-101_002_Banniere_Victoire.png? | ||
+ | \\ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ====== Crédits ====== | ||
+ | |||
+ | © 2018-2019 RF-232\\ | ||
+ | Auteur: Michel-André Robillard CLP\\ | ||
+ | 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| | ||
+ | |0.0.1|2012-12-17|Début sur SME-8.0.|Michel-André| | ||
+ | |0.0.2 - RC-001|2019-08-17|MAJ vers NethServer-7.6.1810 et ajustements pour DokuWiki.|Michel-André| | ||
+ | |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, | ||
+ | \\ | ||
+ | \\ |