nethserver_101_cahier_06_nethserver_wordpress
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_101_cahier_06_nethserver_wordpress [2019-07-23 04:38] – michelandre | nethserver_101_cahier_06_nethserver_wordpress [2025-01-12 19:30] (Version actuelle) – modification externe 127.0.0.1 | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
+ | \\ | ||
+ | [[cours_nethserver_101|{{ Images_Cahier-101-06-000.png? | ||
+ | \\ | ||
+ | ====== Description générale ====== | ||
+ | Le **Cahier-06** du cours **NethServer-101** décrit l' | ||
+ | |||
+ | {{Images_Cahier-101-03-005.png? | ||
+ | |||
+ | // | ||
+ | WordPress est un système de gestion de contenu LIBRE, écrit en PHP et reposant sur une base de données MySQL, distribué par Automattic. WordPress est surtout utilisé comme moteur de blog, mais ses fonctionnalités lui permettent également de gérer n' | ||
+ | |||
+ | ===== Description du Serveur NethServer utilisé pour ce cahier ===== | ||
+ | |||
+ | Pour ce cahier, nous utilisons le Serveur NethServer du [[nethserver_101_cahier_03_creation_un_serveur_virtuel|Cahier-03]]: | ||
+ | |||
+ | {{ Images_Cahier-101-06-001.png? | ||
+ | \\ | ||
+ | |||
+ | ==== But de ce cahier ==== | ||
+ | |||
+ | {{ Images_Cahier-101-06-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' | ||
+ | </ | ||
+ | </ | ||
+ | \\ | ||
+ | |||
+ | ====== Prérequis ====== | ||
+ | |||
+ | ===== Installation d'un Serveur NethServer ===== | ||
+ | |||
+ | Voir le [[nethserver_101_cahier_03_creation_un_serveur_virtuel# | ||
+ | \\ | ||
+ | |||
+ | ===== Mise à jour du Serveur ===== | ||
+ | |||
+ | Avant de commencer quoi que ce soit, il est toujours préférable de mettre à jour le Serveur NethServer. Voir la section // | ||
+ | \\ | ||
+ | |||
+ | ===== Collection PHP ===== | ||
+ | |||
+ | Version PHP actuelle pour un 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_Cahier-101-03-005.png? | ||
+ | |||
+ | ==== Collections de logiciels ==== | ||
+ | |||
+ | {{Images_Cahier-101-03-003.png? | ||
+ | |||
+ | Tous les //RPM// des Collections sont installés dans le répertoire ''/ | ||
+ | |||
+ | === * Collection PHP === | ||
+ | |||
+ | Le but de la // | ||
+ | |||
+ | === ** Collection MariaDB 10.2 === | ||
+ | |||
+ | Nous installerons aussi la // | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | ==== Prérequis pour l' | ||
+ | |||
+ | // | ||
+ | Il faut installer les référentiels //stephdl// et //remi// pour pouvoir installer la // | ||
+ | |||
+ | === Référentiel stephdl === | ||
+ | |||
+ | // | ||
+ | |||
+ | < | ||
+ | [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 ~]# | ||
+ | </ | ||
+ | \\ | ||
+ | |||
+ | === Référentiel remi === | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# yum install -y http:// | ||
+ | |||
+ | ... | ||
+ | Transaction Summary | ||
+ | ============================================================================================ | ||
+ | Install | ||
+ | |||
+ | Total size: 18 k | ||
+ | Installed size: 18 k | ||
+ | ... | ||
+ | Installed: | ||
+ | remi-release.noarch 0: | ||
+ | |||
+ | Complete! | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | Vérification | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# rpm -qa | grep remi | ||
+ | |||
+ | remi-release-7.6-1.el7.remi.noarch | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | \\ | ||
+ | |||
+ | ==== Installation de la Collection PHP ==== | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# yum install -y nethserver-php-scl --enablerepo=stephdl | ||
+ | |||
+ | ... | ||
+ | Resolving Dependencies | ||
+ | ... | ||
+ | Dependencies Resolved | ||
+ | ... | ||
+ | Transaction Summary | ||
+ | ============================================================================================ | ||
+ | Install | ||
+ | |||
+ | Total download size: 47 M | ||
+ | Installed size: 134 M | ||
+ | Downloading packages: | ||
+ | (1/130): enchant-1.6.0-8.el7.x86_64.rpm | ||
+ | ... | ||
+ | (130/130): php73-php-fpm-7.3.1-1.el7.remi.x86_64.rpm | ||
+ | -------------------------------------------------------------------------------------------- | ||
+ | Total 1.6 MB/s | 47 MB 00:00:29 | ||
+ | Retrieving key from file:/// | ||
+ | Importing GPG key 0x00F97F56: | ||
+ | ... | ||
+ | Retrieving key from file:/// | ||
+ | Importing GPG key 0xF5194398: | ||
+ | ... | ||
+ | Installing : scl-utils-20130529-19.el7.x86_64 | ||
+ | ... | ||
+ | Installing : nethserver-php-scl-1.2.4-1.ns7.sdl.x86_64 | ||
+ | Verifying | ||
+ | ... | ||
+ | Verifying | ||
+ | |||
+ | Installed: | ||
+ | nethserver-php-scl.x86_64 0: | ||
+ | |||
+ | Dependency Installed: | ||
+ | enchant.x86_64 1: | ||
+ | ... | ||
+ | vsftpd.x86_64 0: | ||
+ | |||
+ | Complete! | ||
+ | [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_Cahier-101-03-005.png? | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# yum repolist | grep remi | ||
+ | |||
+ | * remi-safe: repo1.ash.innoscale.net | ||
+ | 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 Feb 8 17:44 php56 | ||
+ | 0 dr-xr-xr-x 3 root root 32 Feb 8 17:44 php70 | ||
+ | 0 dr-xr-xr-x 3 root root 32 Feb 8 17:44 php71 | ||
+ | 0 dr-xr-xr-x 3 root root 32 Feb 8 17:44 php72 | ||
+ | 0 dr-xr-xr-x 3 root root 32 Feb 8 17:44 php73 | ||
+ | |||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | \\ | ||
+ | |||
+ | ==== PHP72 par défaut après une connexion à la ligne de commande ==== | ||
+ | |||
+ | // | ||
+ | |||
+ | On crée le fichier d' | ||
+ | |||
+ | {{Images_Cahier-101-03-006.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 8 févr. 17:47 / | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | \\ | ||
+ | |||
+ | === Vérification si PHP72 est le défaut== | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | On vérifie l' | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# rpm -qa | grep scl- | ||
+ | |||
+ | centos-release-scl-rh-2-2.el7.centos.noarch | ||
+ | centos-release-scl-2-2.el7.centos.noarch | ||
+ | scl-utils-20130529-19.el7.x86_64 | ||
+ | nethserver-php-scl-1.2.4-1.ns7.sdl.x86_64 | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | Collections installées. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# scl -l | ||
+ | |||
+ | php56 | ||
+ | php70 | ||
+ | php71 | ||
+ | php72 | ||
+ | php73 | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | Quel est le PHP par défaut? | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# which php | ||
+ | |||
+ | / | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | Quelle est sa version? | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# php --version | ||
+ | |||
+ | PHP 7.2.15 (cli) (built: Feb 5 2019 18:05:51) ( NTS ) | ||
+ | Copyright (c) 1997-2018 The PHP Group | ||
+ | Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies | ||
+ | [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 ~]# | ||
+ | </ | ||
+ | |||
+ | Ci-dessus, il n'y a pas de ligne vide avant __/ | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | ==== Mise à jour de la Collection ==== | ||
+ | |||
+ | Nous utilisons pour NS7, le référentiel remi-safe. Ce qui signifie qu'il est activé par défaut, lancez simplement la commande suivante pour mettre à jour: | ||
+ | |||
+ | < | ||
+ | [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_Cahier-101-03-006.png? | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | ==== Ajustement des paramètres PHP ==== | ||
+ | |||
+ | Les valeurs de certains paramètres de PHP ne sont pas suffisants pour certaines extensions WordPress. Ces paramètres sont: **'' | ||
+ | |||
+ | < | ||
+ | [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_Cahier-101-03-003.png? | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | {{Images_Cahier-101-03-006.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 que // | ||
+ | </ | ||
+ | <WRAP column 60%> | ||
+ | |{{ Images_Cahier-101-06-003.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-101-06-004.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | <WRAP column 30%> | ||
+ | === Ajustements des paramètres de la version PHP-7.2 === | ||
+ | |||
+ | **Configuration -> Paramètres PHP ->** onglet **Php V7.2 SCL -> SOUMETTRE**. | ||
+ | |||
+ | {{Images_Cahier-101-03-008.png? | ||
+ | </ | ||
+ | <WRAP column 60%> | ||
+ | |{{ Images_Cahier-101-06-005.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_Cahier-101-03-006.png? | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | ===== Collection MariaDB 10.2 ===== | ||
+ | |||
+ | // | ||
+ | La // | ||
+ | |||
+ | ==== Fin de vie ==== | ||
+ | |||
+ | Référence: | ||
+ | |||
+ | 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 45%> | ||
+ | < | ||
+ | [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 ~]# | ||
+ | </ | ||
+ | Vu que la version //MariaDB 10.2// est assurée d'une durée de vie jusqu' | ||
+ | </ | ||
+ | <WRAP column 45%> | ||
+ | |{{ Images_Cahier-101-06-006.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | ==== Prérequis ==== | ||
+ | |||
+ | L' | ||
+ | \\ | ||
+ | |||
+ | ==== Installation de la Collection MariaDB 10.2 ==== | ||
+ | |||
+ | < | ||
+ | [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-mariadb-common.x86_64 1: | ||
+ | rh-mariadb102-mariadb-config.x86_64 1: | ||
+ | rh-mariadb102-mariadb-errmsg.x86_64 1: | ||
+ | rh-mariadb102-mariadb-server.x86_64 1: | ||
+ | rh-mariadb102-mariadb-server-utils.x86_64 1: | ||
+ | rh-mariadb102-runtime.x86_64 0:3.0-5.el7 | ||
+ | |||
+ | Terminé ! | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | === Vérification === | ||
+ | |||
+ | < | ||
+ | [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 8 févr. 17:44 .. | ||
+ | 0 dr-xr-xr-x | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | On affiche 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_Cahier-101-03-005.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 de la Collection ==== | ||
+ | |||
+ | Le journal pour cette collection est situé dans le fichier ''/ | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# ls -ls / | ||
+ | |||
+ | 12 -rw-rw---- 1 mysql mysql 7404 8 févr. 19:38 / | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | ==== Usage ==== | ||
+ | |||
+ | {{Images_Cahier-101-03-004.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> | ||
+ | < | ||
+ | mysql102 | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | ==== Mise à jour de la Collection ==== | ||
+ | |||
+ | Le Serveur NethServer utilise 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.rackspace.com | ||
+ | * ce-extras: mirror.rackspace.com | ||
+ | * ce-updates: mirror.rackspace.com | ||
+ | * epel: mirror.texas3006.com | ||
+ | * nethforge: mirror.nethserver.org | ||
+ | * nethserver-base: | ||
+ | * nethserver-updates: | ||
+ | * remi-safe: mirror.bebout.net | ||
+ | No packages marked for update | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | ===== Serveurs FTP - non recommandé ===== | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | {{Images_Cahier-101-03-004.png? | ||
+ | |||
+ | <WRAP column 30%> | ||
+ | **Configuration -> FTP ->** onglet | ||
+ | </ | ||
+ | <WRAP column 60%> | ||
+ | |{{ Images_Cahier-101-06-007.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | <WRAP column 30%> | ||
+ | **Statut -> Services** pour vérifier si //**FTP (vsftpd)**// | ||
+ | </ | ||
+ | <WRAP column 60%> | ||
+ | |{{ Images_Cahier-101-06-008.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | ==== Installation du client FTP - non recommandé ==== | ||
+ | |||
+ | On peut aussi installer le logiciel client du service FTP. | ||
+ | |||
+ | <WRAP box> | ||
+ | < | ||
+ | [root@tchana ~]# yum install -y ftp | ||
+ | |||
+ | ... | ||
+ | Transaction Summary | ||
+ | ============================================================================================ | ||
+ | Install | ||
+ | |||
+ | Total download size: 61 k | ||
+ | Taille d' | ||
+ | ... | ||
+ | Installed: | ||
+ | ftp.x86_64 0: | ||
+ | |||
+ | Complete! | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | </ | ||
+ | \\ | ||
+ | |||
+ | ===== Hôte virtuel ===== | ||
+ | |||
+ | // | ||
+ | L' | ||
+ | |||
+ | ==== Default virtual host ==== | ||
+ | |||
+ | L' | ||
+ | |||
+ | === Activation de FTP === | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | <WRAP column 30%> | ||
+ | **Gestion -> Hôtes virtuels ->** vis-à-vis | ||
+ | </ | ||
+ | <WRAP column 60%> | ||
+ | |{{ Images_Cahier-101-06-009.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | <WRAP column 30%> | ||
+ | //**Enable FTP access**// | ||
+ | Si cette option est cochée, elle autorise, en fournissant le justificatif d' | ||
+ | |||
+ | //**Nom d' | ||
+ | Le nom de l' | ||
+ | </ | ||
+ | <WRAP column 60%> | ||
+ | |{{ Images_Cahier-101-06-010.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | //**Mot de passe**// | ||
+ | Le mot de passe de l' | ||
+ | |||
+ | <wrap em> | ||
+ | \\ | ||
+ | |||
+ | Vérification. | ||
+ | |||
+ | <WRAP box> | ||
+ | < | ||
+ | [root@tchana ~]# ftp localhost | ||
+ | |||
+ | Connected to localhost (127.0.0.1). | ||
+ | 220 (vsFTPd 3.0.2) | ||
+ | Name (localhost: | ||
+ | 331 Please specify the password. | ||
+ | Password: MOT-DE-PASSE-FTP-DONNÉ-CI-DESSUS | ||
+ | 230 Login successful. | ||
+ | Remote system type is UNIX. | ||
+ | Using binary mode to transfer files. | ||
+ | ftp> | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | On affiche le contenu du répertoire. | ||
+ | |||
+ | <WRAP box> | ||
+ | < | ||
+ | ftp> ls -als | ||
+ | |||
+ | 227 Entering Passive Mode (127, | ||
+ | 150 Here comes the directory listing. | ||
+ | drwxr-xr-x | ||
+ | drwxr-xr-x | ||
+ | drwxr-xr-x | ||
+ | 226 Directory send OK. | ||
+ | ftp> | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | {{Images_Cahier-101-03-005.png? | ||
+ | |||
+ | Nous sommes bien dans le répertoire Web de l' | ||
+ | |||
+ | On affiche le chemin du répertoire courant. | ||
+ | |||
+ | <WRAP box> | ||
+ | < | ||
+ | ftp> pwd | ||
+ | |||
+ | 257 "/" | ||
+ | ftp> | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | On lance une commande FTP. | ||
+ | |||
+ | <WRAP box> | ||
+ | < | ||
+ | ftp> help | ||
+ | |||
+ | Commands may be abbreviated. | ||
+ | |||
+ | ! | ||
+ | $ | ||
+ | account | ||
+ | append | ||
+ | ascii | ||
+ | bell get | ||
+ | binary | ||
+ | bye | ||
+ | case help nmap rhelp trace | ||
+ | cd idle nlist | ||
+ | cdup image | ||
+ | chmod | ||
+ | close | ||
+ | cr macdef | ||
+ | delete | ||
+ | ftp> | ||
+ | ftp> | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | On quitte la session FTP. | ||
+ | |||
+ | <WRAP box> | ||
+ | < | ||
+ | ftp> exit | ||
+ | |||
+ | 221 Goodbye. | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | </ | ||
+ | \\ | ||
+ | |||
+ | ===== Propriétaire: | ||
+ | |||
+ | On change le propriétaire: | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# chown -R apache: | ||
+ | |||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | On vérifie | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# ls -alsd / | ||
+ | |||
+ | 4 drwxr-xr-x. 8 apache apache 4096 20 avril 20:06 / | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | \\ | ||
+ | <WRAP centeralign> | ||
+ | \\ | ||
+ | |||
+ | ====== Préparation & fichiers de configuration ====== | ||
+ | |||
+ | ===== Description ===== | ||
+ | |||
+ | Nous allons installer notre site dans le répertoire Web par défaut: ''/ | ||
+ | |||
+ | ===== Téléchargement de WordPress-4.9.9-fr_FR.tar.gz ===== | ||
+ | |||
+ | On se rend dans le répertoire racine de notre site. | ||
+ | |||
+ | '' | ||
+ | |||
+ | [root@tchana html]#'' | ||
+ | |||
+ | On vérifie. | ||
+ | |||
+ | < | ||
+ | [root@tchana html]# pwd | ||
+ | |||
+ | / | ||
+ | [root@tchana html]# | ||
+ | </ | ||
+ | |||
+ | On affiche le contenu du répertoire. | ||
+ | |||
+ | < | ||
+ | [root@tchana html]# ls -als | ||
+ | |||
+ | total 0 | ||
+ | 0 drwxr-xr-x. 3 root root 25 4 nov. 20:47 . | ||
+ | 0 drwxr-xr-x. 4 root root 33 4 nov. 20:47 .. | ||
+ | 0 drwxr-xr-x. 3 root root 28 4 janv. 09:16 .well-known | ||
+ | [root@tchana html]# | ||
+ | </ | ||
+ | \\ | ||
+ | |||
+ | {{Images_Cahier-101-03-004.png? | ||
+ | <WRAP column 50%> | ||
+ | En date du //1er février 2019//, la dernière version de WordPress est //5.0.3//. Nous allons télécharger la version précédente //4.9.9// afin de démontrer la mise à jour vers la version majeure la plus plus récente. | ||
+ | </ | ||
+ | <WRAP column 40%> | ||
+ | |{{ Images_Cahier-101-06-011.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | <WRAP column 50%> | ||
+ | On claque (clic droit) sur le '' | ||
+ | |||
+ | {{Images_Cahier-101-03-005.png? | ||
+ | </ | ||
+ | <WRAP column 40%> | ||
+ | |{{ Images_Cahier-101-06-012.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | À la ligne de commande, on entre '' | ||
+ | |||
+ | < | ||
+ | [root@tchana html]# wget https:// | ||
+ | |||
+ | --2019-02-08 20: | ||
+ | Résolution de fr.wordpress.org (fr.wordpress.org)... 198.143.164.252 | ||
+ | Connexion vers fr.wordpress.org (fr.wordpress.org)|198.143.164.252|: | ||
+ | requête HTTP transmise, en attente de la réponse...200 OK | ||
+ | Longueur: 9278489 (8,8M) [application/ | ||
+ | Sauvegarde en : «wordpress-4.9.9-fr_FR.tar.gz» | ||
+ | |||
+ | 100%[==================================================> | ||
+ | |||
+ | 2019-02-08 20:27:26 (1,79 MB/s) - «wordpress-4.9.9-fr_FR.tar.gz» sauvegardé [9278489/ | ||
+ | |||
+ | [root@tchana html]# | ||
+ | </ | ||
+ | |||
+ | On vérifie le téléchargement. | ||
+ | |||
+ | < | ||
+ | [root@tchana html]# ls -als | ||
+ | |||
+ | total 9064 | ||
+ | 0 drwxr-xr-x. 3 root root 61 8 févr. 20:27 . | ||
+ | 0 drwxr-xr-x. 4 root root 33 4 nov. 20:47 .. | ||
+ | 0 drwxr-xr-x. 3 root root 28 4 janv. 09:16 .well-known | ||
+ | 9064 -rw-r--r-- | ||
+ | [root@tchana html]# | ||
+ | </ | ||
+ | |||
+ | On répète l' | ||
+ | |||
+ | < | ||
+ | [root@tchana html]# wget https:// | ||
+ | |||
+ | --2019-02-08 20: | ||
+ | Résolution de fr.wordpress.org (fr.wordpress.org)... 198.143.164.252 | ||
+ | Connexion vers fr.wordpress.org (fr.wordpress.org)|198.143.164.252|: | ||
+ | requête HTTP transmise, en attente de la réponse...200 OK | ||
+ | Longueur: non spécifié [text/ | ||
+ | Sauvegarde en : «wordpress-4.9.9-fr_FR.tar.gz.md5» | ||
+ | |||
+ | [ < | ||
+ | |||
+ | 2019-02-08 20:28:30 (2,53 MB/s) - «wordpress-4.9.9-fr_FR.tar.gz.md5» sauvegardé [32] | ||
+ | |||
+ | [root@tchana html]# | ||
+ | </ | ||
+ | |||
+ | On affiche la somme de contrôle téléchargée. | ||
+ | |||
+ | < | ||
+ | root@tchana html]# cat wordpress-4.9.9-fr_FR.tar.gz.md5 | ||
+ | |||
+ | 14411f5949c885926747c351e9316eab | ||
+ | [root@tchana html]# | ||
+ | </ | ||
+ | |||
+ | On calcule la somme de contrôle du fichier '' | ||
+ | |||
+ | < | ||
+ | [root@tchana html]# md5sum wordpress-4.9.9-fr_FR.tar.gz | ||
+ | |||
+ | 14411f5949c885926747c351e9316eab | ||
+ | [root@tchana html]# | ||
+ | </ | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | ==== Préparation ==== | ||
+ | |||
+ | On décompresse le fichier '' | ||
+ | |||
+ | < | ||
+ | [root@tchana html]# tar -zxvf wordpress-4.9.9-fr_FR.tar.gz | ||
+ | |||
+ | wordpress/ | ||
+ | wordpress/ | ||
+ | wordpress/ | ||
+ | ... | ||
+ | wordpress/ | ||
+ | wordpress/ | ||
+ | [root@tchana html]# | ||
+ | </ | ||
+ | |||
+ | Par sécurité, on peut transférer les fichiers '' | ||
+ | |||
+ | < | ||
+ | [root@tchana html]# mv wordpress-4.9.9* ../ | ||
+ | |||
+ | [root@tchana html]# | ||
+ | </ | ||
+ | |||
+ | Vérification. | ||
+ | |||
+ | < | ||
+ | [root@tchana html]# ls -ls ../ | ||
+ | |||
+ | 9064 -rw-r--r-- 1 root root 9278489 13 déc. 03:02 ../ | ||
+ | 4 -rw-r--r-- 1 root root 32 8 févr. 12:11 ../ | ||
+ | [root@tchana html]# | ||
+ | </ | ||
+ | |||
+ | On affiche le contenu du répertoire. | ||
+ | |||
+ | < | ||
+ | [root@tchana html]# ls -als | ||
+ | |||
+ | total 4 | ||
+ | 0 drwxr-xr-x. 4 root root | ||
+ | 0 drwxr-xr-x. 4 root root 109 8 févr. 20:29 .. | ||
+ | 0 drwxr-xr-x. 3 root root | ||
+ | 4 drwxr-xr-x | ||
+ | [root@tchana html]# | ||
+ | </ | ||
+ | |||
+ | On transfère le contenu du répertoire wordpress vers la racine du site, c'est à dire: ''/ | ||
+ | |||
+ | Ici on utilise le chemin complet pour éviter les erreurs. | ||
+ | |||
+ | < | ||
+ | [root@tchana html]# mv / | ||
+ | |||
+ | [root@tchana html]# | ||
+ | </ | ||
+ | |||
+ | On ajuste __**R**__écursivement le propriétaire et le groupe pour les fichiers et répertoires de notre site. | ||
+ | |||
+ | < | ||
+ | [root@tchana html]# chown -R apache: | ||
+ | |||
+ | [root@tchana html]# | ||
+ | </ | ||
+ | \\ | ||
+ | |||
+ | ==== Utilisateur " | ||
+ | |||
+ | Par sécurité, nous recommandons d' | ||
+ | |||
+ | < | ||
+ | [root@tchana html]# chmod -R o-rwx * | ||
+ | |||
+ | [root@tchana html]# | ||
+ | </ | ||
+ | |||
+ | Vérification. | ||
+ | |||
+ | < | ||
+ | [root@tchana html]# ls -als | ||
+ | |||
+ | total 196 | ||
+ | 4 drwxr-xr-x. | ||
+ | 0 drwxr-xr-x. | ||
+ | 4 -rw-r----- | ||
+ | 20 -rw-r----- | ||
+ | 12 -rw-r----- | ||
+ | 0 drwxr-xr-x. | ||
+ | 0 drwxr-x--- | ||
+ | 8 -rw-r----- | ||
+ | 4 drwxr-x--- | ||
+ | 4 -rw-r----- | ||
+ | 4 -rw-r----- | ||
+ | 4 -rw-r----- | ||
+ | 0 drwxr-x--- | ||
+ | 4 -rw-r----- | ||
+ | 12 drwxr-x--- | ||
+ | 4 -rw-r----- | ||
+ | 4 -rw-r----- | ||
+ | 40 -rw-r----- | ||
+ | 8 -rw-r----- | ||
+ | 16 -rw-r----- | ||
+ | 32 -rw-r----- | ||
+ | 8 -rw-r----- | ||
+ | 4 -rw-r----- | ||
+ | [root@tchana html]# | ||
+ | </ | ||
+ | |||
+ | On supprime le répertoire '' | ||
+ | < | ||
+ | |||
+ | [root@tchana html]# rmdir wordpress/ | ||
+ | |||
+ | [root@tchana html]# | ||
+ | </ | ||
+ | |||
+ | Vérification. | ||
+ | |||
+ | < | ||
+ | [root@tchana html]# ls -lsd wordpress | ||
+ | |||
+ | ls: impossible d' | ||
+ | [root@tchana html]# | ||
+ | </ | ||
+ | \\ | ||
+ | |||
+ | ===== Base de données pour WordPress ===== | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | < | ||
+ | [root@tchana html]# mysqladmin102 CREATE WPBD | ||
+ | |||
+ | [root@tchana html]# | ||
+ | </ | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | < | ||
+ | [root@tchana html]# mysql102 | ||
+ | |||
+ | Welcome to the MariaDB monitor. | ||
+ | Your MariaDB connection id is 9 | ||
+ | Server version: 10.2.8-MariaDB MariaDB Server | ||
+ | |||
+ | Copyright (c) 2000, 2017, Oracle, MariaDB Corporation Ab and others. | ||
+ | |||
+ | Type ' | ||
+ | |||
+ | MariaDB [(none)]> | ||
+ | </ | ||
+ | |||
+ | On vérifie que la base de données a bien été créée. | ||
+ | |||
+ | < | ||
+ | MariaDB [(none)]> | ||
+ | |||
+ | +--------------------+ | ||
+ | | Database | ||
+ | +--------------------+ | ||
+ | | WPBD | | ||
+ | | information_schema | | ||
+ | | mysql | | ||
+ | | performance_schema | | ||
+ | | phpmyadmin | ||
+ | +--------------------+ | ||
+ | 5 rows in set (0.02 sec) | ||
+ | |||
+ | MariaDB [(none)]> | ||
+ | </ | ||
+ | |||
+ | ==== Grant ==== | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | On crée un usager pour notre base de données et on lui donne //(grant)// les permissions nécessaires. | ||
+ | |||
+ | < | ||
+ | MariaDB [(none)]> | ||
+ | |||
+ | Query OK, 0 rows affected (0.00 sec) | ||
+ | |||
+ | MariaDB [(none)]> | ||
+ | </ | ||
+ | |||
+ | Noter le nom de la base de données: "< | ||
+ | |||
+ | {{Images_Cahier-101-03-008.png? | ||
+ | |||
+ | Vous devez exécuter la commande '' | ||
+ | |||
+ | < | ||
+ | MariaDB [(none)]> | ||
+ | |||
+ | Query OK, 0 rows affected (0.00 sec) | ||
+ | |||
+ | MariaDB [(none)]> | ||
+ | </ | ||
+ | |||
+ | On vérifie les droits de l' | ||
+ | |||
+ | < | ||
+ | MariaDB [(none)]> | ||
+ | |||
+ | +------------------------------------------------------------------------------------------+ | ||
+ | | Grants for usager_WPBD@localhost | ||
+ | +------------------------------------------------------------------------------------------+ | ||
+ | | GRANT USAGE ON *.* TO ' | ||
+ | | GRANT ALL PRIVILEGES ON `WPBD`.* TO ' | ||
+ | +------------------------------------------------------------------------------------------+ | ||
+ | 2 rows in set (0,00 sec) | ||
+ | |||
+ | MariaDB [(none)]> | ||
+ | </ | ||
+ | |||
+ | On quitte la console de //MariaDB 10.2//. | ||
+ | |||
+ | < | ||
+ | MariaDB [(none)]> | ||
+ | |||
+ | Bye | ||
+ | [root@tchana html]# | ||
+ | </ | ||
+ | \\ | ||
+ | |||
+ | ===== Fichier wp-config.php ===== | ||
+ | |||
+ | Il faut maintenant copier le fichier d' | ||
+ | |||
+ | On vérifie la présence du fichier d' | ||
+ | |||
+ | < | ||
+ | [root@tchana html]# ls -ls / | ||
+ | |||
+ | 4 -rw-r--r-- 1 apache apache 3581 13 déc. 03:02 / | ||
+ | [root@tchana html]# | ||
+ | </ | ||
+ | |||
+ | {{Images_Cahier-101-03-005.png? | ||
+ | |||
+ | On crée le véritable fichier de configuration '' | ||
+ | |||
+ | < | ||
+ | [root@tchana html]# cp / | ||
+ | |||
+ | [root@tchana html]# | ||
+ | </ | ||
+ | |||
+ | On vérifie. | ||
+ | |||
+ | < | ||
+ | [root@tchana html]# ls -ls / | ||
+ | |||
+ | 4 -rw-r--r-- 1 root root 3581 8 févr. 20:34 / | ||
+ | 4 -rw-r--r-- 1 apache apache 3581 13 déc. 03:02 / | ||
+ | [root@tchana html]# | ||
+ | </ | ||
+ | |||
+ | On ajuste le propriétaire et le groupe pour le fichier '' | ||
+ | |||
+ | < | ||
+ | [root@tchana html]# chown apache: | ||
+ | |||
+ | [root@tchana html]# | ||
+ | </ | ||
+ | |||
+ | On vérifie. | ||
+ | < | ||
+ | |||
+ | [root@tchana html]# ls -als / | ||
+ | |||
+ | 4 -rw-r--r-- 1 apache apache 3581 8 févr. 20:34 / | ||
+ | [root@tchana html]# | ||
+ | </ | ||
+ | \\ | ||
+ | |||
+ | ===== Édition du fichier de configuration ===== | ||
+ | |||
+ | Il faut modifier le fichier de configuration pour spécifier à l' | ||
+ | |||
+ | Il faut changer: | ||
+ | //< | ||
+ | //< | ||
+ | //< | ||
+ | //' | ||
+ | |||
+ | Contenu actuel du fichier de configuration. | ||
+ | |||
+ | <WRAP box> | ||
+ | < | ||
+ | ... | ||
+ | /** Nom de la base de données de WordPress. */ | ||
+ | define(' | ||
+ | |||
+ | /** Utilisateur de la base de données MySQL. */ | ||
+ | define(' | ||
+ | |||
+ | /** Mot de passe de la base de données MySQL. */ | ||
+ | define(' | ||
+ | |||
+ | /** Adresse de l’hébergement MySQL. */ | ||
+ | define(' | ||
+ | |||
+ | ... | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | On procède aux modifications avec l' | ||
+ | |||
+ | < | ||
+ | vi wp-config.php | ||
+ | </ | ||
+ | |||
+ | Ce que le contenu du fichier doit être dans notre cas. | ||
+ | |||
+ | <WRAP box> | ||
+ | < | ||
+ | ... | ||
+ | /** Nom de la base de données de WordPress. */ | ||
+ | define(' | ||
+ | |||
+ | /** Utilisateur de la base de données MySQL. */ | ||
+ | define(' | ||
+ | |||
+ | /** Mot de passe de la base de données MySQL. */ | ||
+ | define(' | ||
+ | /** Adresse de l’hébergement MySQL. */ | ||
+ | define(' | ||
+ | ... | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | On vérifie. | ||
+ | |||
+ | < | ||
+ | [root@tchana html]# cat / | ||
+ | |||
+ | define(' | ||
+ | define(' | ||
+ | define(' | ||
+ | define(' | ||
+ | define(' | ||
+ | define(' | ||
+ | [root@tchana html]# | ||
+ | </ | ||
+ | \\ | ||
+ | |||
+ | ==== Chemin de WordPress ==== | ||
+ | |||
+ | {{ Images_Cahier-101-06-013.png? | ||
+ | Il nous faut ajouter un bout de code au fichier de configuration '' | ||
+ | |||
+ | Pour une solution fonctionnelle, | ||
+ | |||
+ | <WRAP box> | ||
+ | < | ||
+ | if(is_admin()){ | ||
+ | add_filter(' | ||
+ | define( ' | ||
+ | } | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | On ajoute les lignes ci-dessous au fichier ''/ | ||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | < | ||
+ | cat >> / | ||
+ | |||
+ | ############################################### | ||
+ | # Michel-André, | ||
+ | # | ||
+ | # Référence: | ||
+ | # Ajout de code afin de pouvoir localiser le répertoire de contenu | ||
+ | # | ||
+ | if(is_admin()){ | ||
+ | add_filter(' | ||
+ | define( ' | ||
+ | } | ||
+ | ############################################### | ||
+ | |||
+ | EOT | ||
+ | |||
+ | </ | ||
+ | |||
+ | On vérifie. | ||
+ | |||
+ | < | ||
+ | [root@tchana html]# tail -13 / | ||
+ | |||
+ | ############################################### | ||
+ | # Michel-André, | ||
+ | # | ||
+ | # Référence: | ||
+ | # Ajout de code afin de pouvoir localiser le répertoire de contenu | ||
+ | # | ||
+ | if(is_admin()){ | ||
+ | add_filter(' | ||
+ | define( ' | ||
+ | } | ||
+ | ############################################### | ||
+ | |||
+ | [root@tchana html]# | ||
+ | </ | ||
+ | \\ | ||
+ | |||
+ | ==== Préfixe de la BD de WordPress ==== | ||
+ | |||
+ | Le paramètre '' | ||
+ | |||
+ | // | ||
+ | |||
+ | === Risques en laissant les préfixes par défaut === | ||
+ | |||
+ | Les hackers utilisent des scripts automatisés qui tentent des injections SQL sur des failles connues de WordPress ou de certaines extensions WordPress. Sachant que la base de données contient pratiquement toutes les informations du site, ces failles peuvent être exploitées pour l’une des raisons suivantes: | ||
+ | |||
+ | - Ajouter du contenu sur le site //(exemple: liens vers des sites illégaux)// | ||
+ | - Ajouter des commentaires pourriels. | ||
+ | - Faire planter le site ou détruire son contenu. | ||
+ | - Extraire des informations // | ||
+ | |||
+ | Sachant que les scripts sont automatisés, | ||
+ | |||
+ | === Quel préfixe utiliser? === | ||
+ | |||
+ | Certes, nous venons de comprendre que le préfixe par défaut est à éviter mais alors, quel préfixe utiliser? Utiliser un nom trop commun n’est pas très sécuritaire non plus. Par exemple, un préfixe tel que < | ||
+ | |||
+ | {{Images_Cahier-101-03-003.png? | ||
+ | |||
+ | === Modification du fichier wp-config.php === | ||
+ | |||
+ | Ce fichier contient une ligne: '' | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | Pour les besoins de ce document, on change le préfixe ''' | ||
+ | |||
+ | < | ||
+ | [root@tchana html]# sed -i ' | ||
+ | |||
+ | [root@tchana html]# | ||
+ | |||
+ | </ | ||
+ | On vérifie. | ||
+ | |||
+ | < | ||
+ | [root@tchana html]# cat / | ||
+ | |||
+ | $table_prefix | ||
+ | [root@tchana html] | ||
+ | </ | ||
+ | \\ | ||
+ | |||
+ | ===== Fichier httpd.conf ===== | ||
+ | |||
+ | Le fichier ''/ | ||
+ | |||
+ | Par défaut, cette directive est à '' | ||
+ | |||
+ | Plus loin, dans le fichier '' | ||
+ | |||
+ | ==== Édition du ficher httpd.conf ==== | ||
+ | |||
+ | On crée une copie de sauvegarde du fichier original '' | ||
+ | |||
+ | < | ||
+ | [root@tchana html]# cp / | ||
+ | |||
+ | [root@tchana html]# | ||
+ | </ | ||
+ | |||
+ | On vérifie. | ||
+ | |||
+ | < | ||
+ | [root@tchana html]# ls -ls / | ||
+ | |||
+ | 12 -rw-r--r-- 1 root root 11753 8 févr. 21:04 / | ||
+ | [root@tchana html]# | ||
+ | </ | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | < | ||
+ | ... | ||
+ | < | ||
+ | # | ||
+ | # Possible values for the Options directive are " | ||
+ | # or any combination of: | ||
+ | # | ||
+ | # | ||
+ | # Note that " | ||
+ | # doesn' | ||
+ | # | ||
+ | # The Options directive is both complicated and important. | ||
+ | # http:// | ||
+ | # for more information. | ||
+ | # | ||
+ | Options Indexes FollowSymLinks | ||
+ | |||
+ | # | ||
+ | # AllowOverride controls what directives may be placed in .htaccess files. | ||
+ | # It can be " | ||
+ | # | ||
+ | # | ||
+ | ##### AllowOverride None | ||
+ | # Modification par Michel-André le 8 février 2019 | ||
+ | # afin que le démon httpd traite les fichers .htacces dans | ||
+ | # les répertoires et sous-répertoires de / | ||
+ | AllowOverride All | ||
+ | |||
+ | # | ||
+ | # Controls who can get stuff from this server. | ||
+ | # | ||
+ | Require all granted | ||
+ | </ | ||
+ | ... | ||
+ | </ | ||
+ | |||
+ | {{Images_Cahier-101-03-005.png? | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | ===== Répertoire well-known ===== | ||
+ | |||
+ | // | ||
+ | // | ||
+ | Lors d'une demande de certificat de Let's Encrypt, ce dernier doit pouvoir accéder au répertoire '' | ||
+ | |||
+ | Nous allons créer un fichier ''/ | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | < | ||
+ | cat > / | ||
+ | Alias "/ | ||
+ | < | ||
+ | | ||
+ | | ||
+ | | ||
+ | </ | ||
+ | |||
+ | EOT | ||
+ | |||
+ | </ | ||
+ | |||
+ | On vérifie. | ||
+ | |||
+ | < | ||
+ | [root@tchana html]# ls -als / | ||
+ | |||
+ | 4 -rw-r--r-- 1 root root 231 Apr 20 13:36 / | ||
+ | [root@tchana html]# | ||
+ | </ | ||
+ | |||
+ | On affiche le contenu du fichier. | ||
+ | |||
+ | < | ||
+ | [root@tchana html]# cat / | ||
+ | |||
+ | Alias "/ | ||
+ | < | ||
+ | | ||
+ | | ||
+ | | ||
+ | </ | ||
+ | |||
+ | [root@tchana html]# | ||
+ | </ | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | {{Images_Cahier-101-03-005.png? | ||
+ | |||
+ | ==== Redémarrage du démon httpd ==== | ||
+ | |||
+ | On redémarre le démon //Apache// afin qu'il relise son fichier de configuration. | ||
+ | |||
+ | < | ||
+ | [root@tchana html]# systemctl restart httpd | ||
+ | |||
+ | [root@tchana html]# | ||
+ | </ | ||
+ | |||
+ | ==== Sauvegarde ==== | ||
+ | |||
+ | === Répertoire du fichier httpd.conf === | ||
+ | |||
+ | 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 __/ | ||
+ | |||
+ | === Fichier z_well-known.conf === | ||
+ | |||
+ | On vérifie si le nom du fichier ''/ | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | < | ||
+ | NouvelleInclusion="/ | ||
+ | if grep -Fxq " | ||
+ | then | ||
+ | # L' | ||
+ | echo -e "\nLe fichier custom.include contient déjà l' | ||
+ | else | ||
+ | # L' | ||
+ | echo -e " | ||
+ | echo -e " | ||
+ | fi | ||
+ | |||
+ | </ | ||
+ | |||
+ | On vérifie. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# cat / | ||
+ | |||
+ | / | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | Ci-dessus, il n'y a pas de ligne vide avant __< | ||
+ | \\ | ||
+ | |||
+ | ===== Fichier .htaccess ===== | ||
+ | |||
+ | // | ||
+ | Les fichiers '' | ||
+ | |||
+ | ==== Principe des fichiers .htaccess ===== | ||
+ | |||
+ | Le fichier '' | ||
+ | |||
+ | ==== Permaliens ==== | ||
+ | |||
+ | // | ||
+ | Les permaliens sont les adresses permanentes //(URL)// de vos articles ainsi que des catégories, | ||
+ | |||
+ | On crée le fichier '' | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | < | ||
+ | cat > / | ||
+ | # ************************************** | ||
+ | # Pour les permaliens | ||
+ | < | ||
+ | RewriteEngine On | ||
+ | RewriteBase / | ||
+ | RewriteRule ^index\.php$ - [L] | ||
+ | RewriteCond %{REQUEST_FILENAME} !-f | ||
+ | RewriteCond %{REQUEST_FILENAME} !-d | ||
+ | RewriteRule . /index.php [L] | ||
+ | </ | ||
+ | |||
+ | EOT | ||
+ | |||
+ | </ | ||
+ | |||
+ | On ajuste les droits et permissions. | ||
+ | |||
+ | < | ||
+ | [root@tchana html]# chmod 444 / | ||
+ | |||
+ | [root@tchana html]# | ||
+ | </ | ||
+ | |||
+ | On ajuste le propriétaire et le groupe. | ||
+ | |||
+ | < | ||
+ | [root@tchana html]# chown apache: | ||
+ | |||
+ | [root@tchana html]# | ||
+ | </ | ||
+ | |||
+ | On vérifie. | ||
+ | |||
+ | < | ||
+ | [root@tchana html]# ls -ls / | ||
+ | |||
+ | 4 -r--r--r-- 1 apache apache 265 8 févr. 21:53 / | ||
+ | [root@tchana html]# | ||
+ | </ | ||
+ | |||
+ | On vérifie le contenu. | ||
+ | |||
+ | < | ||
+ | [root@tchana html]# cat / | ||
+ | |||
+ | # ************************************** | ||
+ | # Pour les permaliens | ||
+ | < | ||
+ | RewriteEngine On | ||
+ | RewriteBase / | ||
+ | RewriteRule ^index\.php$ - [L] | ||
+ | RewriteCond %{REQUEST_FILENAME} !-f | ||
+ | RewriteCond %{REQUEST_FILENAME} !-d | ||
+ | RewriteRule . /index.php [L] | ||
+ | </ | ||
+ | |||
+ | [root@tchana html]# | ||
+ | </ | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | ==== Protection du fichier wp-config ==== | ||
+ | |||
+ | {{Images_Cahier-101-03-005.png? | ||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | < | ||
+ | cat >> / | ||
+ | # ************************************** | ||
+ | # Pour protéger le fichier wp-config | ||
+ | <Files wp-config.php> | ||
+ | order allow,deny | ||
+ | deny from all | ||
+ | </ | ||
+ | |||
+ | EOT | ||
+ | |||
+ | </ | ||
+ | |||
+ | On vérifie le contenu. | ||
+ | |||
+ | < | ||
+ | [root@tchana html]# tail -8 / | ||
+ | |||
+ | # ************************************** | ||
+ | # Pour protéger le fichier wp-config | ||
+ | <Files wp-config.php> | ||
+ | order allow,deny | ||
+ | deny from all | ||
+ | </ | ||
+ | |||
+ | [root@tchana html]# | ||
+ | </ | ||
+ | |||
+ | ==== Protection du fichier .htaccess lui-même ==== | ||
+ | |||
+ | {{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 html]# tail -8 / | ||
+ | |||
+ | # ************************************** | ||
+ | # Pour protéger le fichier htaccess lui-même | ||
+ | <Files .htaccess> | ||
+ | order allow,deny | ||
+ | deny from all | ||
+ | </ | ||
+ | |||
+ | [root@tchana html]# | ||
+ | </ | ||
+ | |||
+ | ==== Directives Apache ==== | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | < | ||
+ | cat >> / | ||
+ | # ************************************** | ||
+ | # DIRECTIVES POUR APACHE | ||
+ | # | ||
+ | # Permet au serveur de suivre les liens symboliques dans les répertoires concernés. | ||
+ | Options +FollowSymLinks | ||
+ | |||
+ | # Empêche d' | ||
+ | # c' | ||
+ | Options -Indexes | ||
+ | |||
+ | EOT | ||
+ | |||
+ | </ | ||
+ | |||
+ | On vérifie le contenu. | ||
+ | |||
+ | < | ||
+ | [root@tchana html]# tail -10 / | ||
+ | |||
+ | # ************************************** | ||
+ | # DIRECTIVES POUR APACHE | ||
+ | # | ||
+ | # Permet au serveur de suivre les liens symboliques dans les répertoires concernés. | ||
+ | FollowSymLinks=enabled | ||
+ | |||
+ | # Empêche d' | ||
+ | # c' | ||
+ | Options -Indexes | ||
+ | [root@tchana html]# | ||
+ | </ | ||
+ | \\ | ||
+ | |||
+ | ====== Installation de WordPress ====== | ||
+ | |||
+ | ===== Lancement de l' | ||
+ | |||
+ | Pour lancer l' | ||
+ | |||
+ | <WRAP column 45%> | ||
+ | <WRAP centeralign> | ||
+ | L'URL changera pour:\\ https:// | ||
+ | </ | ||
+ | |||
+ | Le script '' | ||
+ | |||
+ | On entre les informations demandées. | ||
+ | |||
+ | {{Images_Cahier-101-03-008.png? | ||
+ | |||
+ | {{Images_Cahier-101-03-008.png? | ||
+ | |||
+ | Donner l' | ||
+ | |||
+ | Vérifiez toutes les informations demandées, puis cliquer **Installer WordPress**. | ||
+ | </ | ||
+ | <WRAP column 45%> | ||
+ | |{{ Images_Cahier-101-06-014.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | <WRAP column 45%> | ||
+ | Si tout a bien été configuré, l' | ||
+ | |||
+ | On pourrait se loguer en cliquant le lien spécifié. | ||
+ | </ | ||
+ | <WRAP column 45%> | ||
+ | |{{ Images_Cahier-101-06-015.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | <WRAP center> | ||
+ | <WRAP column 65%> | ||
+ | \\ | ||
+ | De retour à notre page d' | ||
+ | |{{ Images_Cahier-101-06-016.png? | ||
+ | </ | ||
+ | <WRAP column 25%> | ||
+ | On entre notre **Identifiant -> Mot de passe -> Se connecter**. | ||
+ | |{{ Images_Cahier-101-06-017.png? | ||
+ | </ | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | <WRAP column 20%> | ||
+ | WordPress a été installé et le Tableau de bord s' | ||
+ | |||
+ | Des mises à jour sont disponibles dont la version // | ||
+ | |||
+ | Les mises à jour disponibles sont principalement celles des thèmes. | ||
+ | |||
+ | Plus loin, nous nous occuperons de tout mettre à jour. | ||
+ | </ | ||
+ | <WRAP column 70%> | ||
+ | |{{ Images_Cahier-101-06-018.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | ===== Page d' | ||
+ | |||
+ | <WRAP column 20%> | ||
+ | On se rend à notre page d' | ||
+ | |||
+ | Notre site WordPress s' | ||
+ | |||
+ | {{Images_Cahier-101-03-003.png? | ||
+ | </ | ||
+ | <WRAP column 70%> | ||
+ | |{{ Images_Cahier-101-06-019.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | ===== Sécurité primaire ===== | ||
+ | |||
+ | ==== Fichier readme.html ==== | ||
+ | |||
+ | On se rend à: [[http:// | ||
+ | |||
+ | Comme on le voit, la sécurité de WordPress s'est améliorée, | ||
+ | |||
+ | <WRAP center> | ||
+ | <WRAP column 45%> | ||
+ | Version récente avec sécurité améliorée. | ||
+ | |{{ Images_Cahier-101-06-020.png? | ||
+ | </ | ||
+ | <WRAP column 45%> | ||
+ | Ancienne version. | ||
+ | |{{ Images_Cahier-101-06-021.png? | ||
+ | </ | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | {{Images_Cahier-101-03-008.png? | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | ====== Mises à jour ====== | ||
+ | |||
+ | ===== Introduction ===== | ||
+ | |||
+ | ==== Avis #1 ==== | ||
+ | |||
+ | Référence: | ||
+ | |||
+ | Est-ce important de faire régulièrement les mises à jour proposées? | ||
+ | |||
+ | Oui, il est important de faire régulièrement les mises à jour de WordPress, de ses thèmes et de ses extensions; en particulier si votre site est public. Il est même indispensable de le faire lorsque la nouvelle version apporte des correctifs en matière de sécurité. | ||
+ | |||
+ | Laisser sur votre site une version obsolète de WordPress, d’un de ses thèmes ou de ses extensions vous expose à des risques de piratage. | ||
+ | |||
+ | Pensez à vérifier, avant la mise à jour, la compatibilité de votre hébergement et à effectuer une sauvegarde. | ||
+ | |||
+ | ==== Avis #2 ==== | ||
+ | |||
+ | // | ||
+ | Pourquoi il est important de mettre à jour son site WordPress (sans douleur) | ||
+ | |||
+ | Nous l’avons tous fait au moins une fois: ignorer, plus ou moins volontairement, | ||
+ | |||
+ | Cela vous rappelle quelque chose? | ||
+ | |||
+ | Il y a quelques années, installer une nouvelle version pouvait tourner au drame: écran blanc, bug complet du site… pour tout débutant ou personne non initiée aux rouages du CMS s’ouvraient alors des heures de manipulations incompréhensibles avant de pouvoir revenir à la normale. | ||
+ | |||
+ | Les mises à jour de WordPress, mais également de vos extensions et de votre thème, sont pourtant indispensables et ne se font plus dans la douleur. | ||
+ | |||
+ | Mais au fait, pourquoi est-il si important de s’y plier? | ||
+ | |||
+ | Les mises à jour apportent de nouvelles fonctionnalités | ||
+ | |||
+ | Chaque nouvelle version de WordPress vise à corriger les bogues de la précédente tout en apportant de nouvelles fonctionnalités qui facilitent votre travail de publication au quotidien. | ||
+ | |||
+ | WordPress 4.0 inclut par exemple: | ||
+ | |||
+ | - Un éditeur plus intelligent dont la taille s’adapte à votre travail | ||
+ | - Des outils de mise en forme toujours accessibles | ||
+ | - Une intégration exceptionnelle des vidéos YouTube et des Tweets | ||
+ | - Une mise en page fluide de la bibliothèque de médias | ||
+ | |||
+ | Pourquoi se passer d’une expérience-utilisateur plus agréable? Les mises à jour servent aussi à cela. | ||
+ | |||
+ | Vous renforcez la sécurité de votre installation | ||
+ | |||
+ | Une étude a montré que [[http:// | ||
+ | |||
+ | Le mot d’ordre est clair; les failles de sécurité connues par les " | ||
+ | |||
+ | Lorsqu' | ||
+ | |||
+ | Quid des thèmes et des extensions? | ||
+ | |||
+ | C'est exactement la même chose; les auteurs des thèmes et des extensions les mettent à jour pour apporter de nouvelles options // | ||
+ | |||
+ | Mettre à jour ses extensions WordPress est également important pour des raisons de compatibilité. Avez-vous déjà remarqué que certaines extensions entraient en conflit avec d’autres extensions, voir même avec votre thème? Les mises à jour servent aussi à pallier ces erreurs. | ||
+ | |||
+ | Faut-il toujours activer immédiatement une mise à jour? | ||
+ | |||
+ | Si votre développeur a procédé à des modifications ou personnalisations particulières de votre thème ou de vos extensions, renseignez-vous avant d' | ||
+ | |||
+ | Dans l' | ||
+ | |||
+ | ==== Avis #3 ==== | ||
+ | |||
+ | // | ||
+ | |||
+ | Doit-on le faire ou pas? | ||
+ | |||
+ | Comme chaque " | ||
+ | |||
+ | Si vous voulez mettre à jour et être certain que tout se passera bien, il existe plusieurs solutions: | ||
+ | |||
+ | - Se renseigner: Il existe des forums spécialisés où les utilisateurs WP viennent s' | ||
+ | - Vérifier! Il n'y a pas de meilleure solution que la vérification. __On vous recommande d’avoir toujours une plateforme de test //(en ligne ou en local)//__, sur laquelle vous installez tous les thèmes et extensions que vous utilisez sur vos sites. Utilisez cette plateforme pour tester les mises à jour et vérifier que tout se passe pour le mieux. De cette façon vous pourrez identifier les éventuels problèmes et en discuter sur les forums pour trouver des solutions. | ||
+ | |||
+ | ==== Notre avis personnel ==== | ||
+ | |||
+ | Vous devez vérifier si les nouvelles extensions et thèmes que vous employez ont été approuvés et vérifiés pour la nouvelle version et enfin, les essayer sur une machine de test. | ||
+ | |||
+ | {{Images_Cahier-101-03-004.png? | ||
+ | |||
+ | - Installez toutes les mises à jour sur le WordPress virtuel et vérifiez tout au complet. | ||
+ | - Sur votre site réel, installez seulement les mises à jours qui fonctionnent sans problèmes sur votre site virtuel. | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | ===== Sauvegarde avec Duplicator ===== | ||
+ | |||
+ | Avant une mise à jour de WordPress //(surtout pour un saut de plusieurs version: WordPress-4.9.9 vers WordPress-5.0.3)//, | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | ===== Mise à jour de WordPress ===== | ||
+ | |||
+ | <WRAP column 20%> | ||
+ | **Tableau de bord -> Mises à jour -> Mettre à jour maintenant**. | ||
+ | |||
+ | En cliquant **Mise à jour**, WordPress s' | ||
+ | |||
+ | Ici, on voit que les mises à jours disponibles sont passées de //3// à //5//. | ||
+ | </ | ||
+ | <WRAP column 70%> | ||
+ | |{{ Images_Cahier-101-06-022.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | <WRAP column 30%> | ||
+ | Peut prendre un certain temps, être patient! | ||
+ | |{{ Images_Cahier-101-06-023.png? | ||
+ | </ | ||
+ | <WRAP column 30%> | ||
+ | **Mettre à jour la base de données de WordPress**. | ||
+ | |{{ Images_Cahier-101-06-024.png? | ||
+ | </ | ||
+ | <WRAP column 30%> | ||
+ | \\ | ||
+ | **Continuer**. | ||
+ | |{{ Images_Cahier-101-06-025.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | <WRAP column 20%> | ||
+ | Tout s'est bien passé, une page de bienvenue à la nouvelle version s' | ||
+ | </ | ||
+ | <WRAP column 70%> | ||
+ | |{{ Images_Cahier-101-06-026.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | ===== Mise à jour des extensions ===== | ||
+ | |||
+ | <WRAP center> | ||
+ | <WRAP column 45%> | ||
+ | < | ||
+ | < | ||
+ | |{{ Images_Cahier-101-06-027.png? | ||
+ | </ | ||
+ | <WRAP column 45%> | ||
+ | < | ||
+ | < | ||
+ | |{{ Images_Cahier-101-06-028.png? | ||
+ | </ | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | ===== Mise à jour des thèmes ===== | ||
+ | |||
+ | <WRAP column 20%> | ||
+ | **Tableau de bord -> Mise à jour -> Thèmes | ||
+ | </ | ||
+ | <WRAP column 70%> | ||
+ | |{{ Images_Cahier-101-06-029.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | <WRAP center> | ||
+ | <WRAP column 45%> | ||
+ | < | ||
+ | < | ||
+ | |{{ Images_Cahier-101-06-030.png? | ||
+ | </ | ||
+ | <WRAP column 45%> | ||
+ | \\ | ||
+ | \\ | ||
+ | Tout est à date. | ||
+ | |{{ Images_Cahier-101-06-031.png? | ||
+ | </ | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | WordPress est à date. | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | ====== Principaux réglages recommandés ====== | ||
+ | |||
+ | ===== Réglages généraux ===== | ||
+ | |||
+ | <WRAP column 30%> | ||
+ | < | ||
+ | < | ||
+ | |{{ Images_Cahier-101-06-032.png? | ||
+ | </ | ||
+ | <WRAP column 30%> | ||
+ | \\ | ||
+ | \\ | ||
+ | \\ | ||
+ | // | ||
+ | |{{ Images_Cahier-101-06-033.png? | ||
+ | </ | ||
+ | <WRAP column 30%> | ||
+ | \\ | ||
+ | \\ | ||
+ | \\ | ||
+ | // | ||
+ | |{{ Images_Cahier-101-06-034.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | <WRAP column 30%> | ||
+ | On s' | ||
+ | </ | ||
+ | <WRAP column 30%> | ||
+ | |{{ Images_Cahier-101-06-035.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | ===== Écriture ===== | ||
+ | |||
+ | ==== Service de mise à jour ==== | ||
+ | |||
+ | <WRAP column 20%> | ||
+ | Par sécurité, on n' | ||
+ | |||
+ | On supprime tout du **Services de mise à jour -> Enregistrer les modifications**. | ||
+ | |||
+ | On s' | ||
+ | </ | ||
+ | <WRAP column 70%> | ||
+ | |{{ Images_Cahier-101-06-036.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | ===== Discussions ===== | ||
+ | |||
+ | Si on ne publie pas d' | ||
+ | |||
+ | <WRAP column 20%> | ||
+ | \\ | ||
+ | **Discussion**. | ||
+ | |{{ Images_Cahier-101-06-037.png? | ||
+ | </ | ||
+ | <WRAP column 50%> | ||
+ | \\ | ||
+ | On décoche tous les // | ||
+ | |{{ Images_Cahier-101-06-038.png? | ||
+ | </ | ||
+ | <WRAP column 20%> | ||
+ | **Enregistrer les modifications**. | ||
+ | |{{ Images_Cahier-101-06-039.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | ===== Choix de la structure des permaliens ===== | ||
+ | |||
+ | // | ||
+ | |||
+ | <WRAP column 30%> | ||
+ | Sur la page de configuration **Tableau de bord -> Réglages -> Permaliens**, | ||
+ | |||
+ | {{Images_Cahier-101-03-005.png? | ||
+ | |||
+ | On choisit **Titre de la publication -> Enregistrer les modifications**. | ||
+ | </ | ||
+ | <WRAP column 60%> | ||
+ | |{{ Images_Cahier-101-06-040.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | Si votre fichier '' | ||
+ | |||
+ | <WRAP column 45%> | ||
+ | En choisissant //Titre de la publication// | ||
+ | </ | ||
+ | <WRAP column 45%> | ||
+ | |{{ Images_Cahier-101-06-041.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | {{Images_Cahier-101-03-008.png? | ||
+ | |||
+ | <WRAP column 45%> | ||
+ | En haut de la page, WordPress nous recommande de mettre à jour le fichier '' | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | </ | ||
+ | <WRAP column 45%> | ||
+ | |{{ Images_Cahier-101-06-042.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | <WRAP column 30%> | ||
+ | Au bas de la page, WordPress nous affiche les règles qu'on devrait ajouter au fichier '' | ||
+ | |||
+ | Nous avons déjà ajouté ces directives à la section [[nethserver_101_cahier_06_nethserver_wordPress# | ||
+ | </ | ||
+ | <WRAP column 60%> | ||
+ | |{{ Images_Cahier-101-06-043.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | ==== Vérification du fichier .htaccess ==== | ||
+ | |||
+ | <WRAP column 45%> | ||
+ | http:// | ||
+ | |||
+ | La directive pour protéger le fichier '' | ||
+ | </ | ||
+ | <WRAP column 45%> | ||
+ | |{{ Images_Cahier-101-06-044.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | <WRAP column 45%> | ||
+ | http:// | ||
+ | |||
+ | La directive pour protéger le fichier '' | ||
+ | </ | ||
+ | <WRAP column 45%> | ||
+ | |{{ Images_Cahier-101-06-045.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | <WRAP column 45%> | ||
+ | http:// | ||
+ | |||
+ | Le répertoire '' | ||
+ | </ | ||
+ | <WRAP column 45%> | ||
+ | |{{ Images_Cahier-101-06-046.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | On lance une recherche de liens symboliques. | ||
+ | |||
+ | < | ||
+ | [root@tchana html]# ls -lR / | ||
+ | |||
+ | [root@tchana html]# | ||
+ | </ | ||
+ | |||
+ | Présentement, | ||
+ | |||
+ | {{Images_Cahier-101-03-005.png? | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | ====== Activation d' | ||
+ | |||
+ | ===== Akismet ===== | ||
+ | |||
+ | <WRAP column 40%> | ||
+ | Utilisé par des millions de sites, //Akismet// est probablement la meilleure manière de protéger votre site des commentaires et pisteurs indésirables. | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | </ | ||
+ | <WRAP column 25%> | ||
+ | |{{ Images_Cahier-101-06-047.png? | ||
+ | </ | ||
+ | <WRAP column 25%> | ||
+ | |{{ Images_Cahier-101-06-048.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | ===== Activation ===== | ||
+ | |||
+ | <WRAP column 20%> | ||
+ | **Tableau de bord -> Extensions installées -> Akismet -> Activer**. | ||
+ | |{{ Images_Cahier-101-06-049.png? | ||
+ | </ | ||
+ | <WRAP column 35%> | ||
+ | \\ | ||
+ | \\ | ||
+ | **Configurer votre compte Akismet**. | ||
+ | |{{ Images_Cahier-101-06-050.png? | ||
+ | </ | ||
+ | <WRAP column 35%> | ||
+ | \\ | ||
+ | \\ | ||
+ | **Obtenir votre clé d' | ||
+ | |{{ Images_Cahier-101-06-051.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | <WRAP column 25%> | ||
+ | \\ | ||
+ | \\ | ||
+ | **Get started with Personal**. | ||
+ | |{{ Images_Cahier-101-06-052.png? | ||
+ | </ | ||
+ | <WRAP column 30%> | ||
+ | <wrap em>Lisez les conditions d' | ||
+ | |{{ Images_Cahier-101-06-053.png? | ||
+ | </ | ||
+ | <WRAP column 35%> | ||
+ | \\ | ||
+ | \\ | ||
+ | Dans le courriel reçu, cliquer **Activer le Compte**. | ||
+ | |{{ Images_Cahier-101-06-054.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | <WRAP column 30%> | ||
+ | \\ | ||
+ | **Sign in to Akismet**. | ||
+ | |{{ Images_Cahier-101-06-055.png? | ||
+ | </ | ||
+ | <WRAP column 30%> | ||
+ | \\ | ||
+ | **Add Personal Subscription**. | ||
+ | |{{ Images_Cahier-101-06-056.png? | ||
+ | </ | ||
+ | <WRAP column 30%> | ||
+ | Choisir un montant **-> Create Subscription**. | ||
+ | |{{ Images_Cahier-101-06-057.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | <WRAP column 30%> | ||
+ | **Got It**. | ||
+ | |{{ Images_Cahier-101-06-058.png? | ||
+ | </ | ||
+ | <WRAP column 30%> | ||
+ | Cliquer l' | ||
+ | |{{ Images_Cahier-101-06-059.png? | ||
+ | </ | ||
+ | <WRAP column 30%> | ||
+ | Sélectionner la clé et la copier. | ||
+ | |{{ Images_Cahier-101-06-060.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | <WRAP center> | ||
+ | <WRAP column 30%> | ||
+ | \\ | ||
+ | < | ||
+ | |||
+ | < | ||
+ | < | ||
+ | < | ||
+ | |||
+ | L' | ||
+ | </ | ||
+ | <WRAP column 30%> | ||
+ | |{{ Images_Cahier-101-06-061.png? | ||
+ | </ | ||
+ | <WRAP column 30%> | ||
+ | |{{ Images_Cahier-101-06-062.png? | ||
+ | </ | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | ====== Installation d'une extension & d'un thème ====== | ||
+ | |||
+ | ===== Introduction ===== | ||
+ | |||
+ | Pour s' | ||
+ | |||
+ | ===== Connexion ===== | ||
+ | |||
+ | Si nous ne sommes pas connectés à WordPress, on se rend à notre site: https:// | ||
+ | |||
+ | <WRAP center> | ||
+ | <WRAP column 30%> | ||
+ | < | ||
+ | |||
+ | < | ||
+ | </ | ||
+ | <WRAP column 30%> | ||
+ | |{{ Images_Cahier-101-06-063.png? | ||
+ | </ | ||
+ | <WRAP column 30%> | ||
+ | |{{ Images_Cahier-101-06-064.png? | ||
+ | </ | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | ===== Extension Duplicator ===== | ||
+ | |||
+ | // | ||
+ | |||
+ | <WRAP column 40%> | ||
+ | **Duplicator** permet aux administrateurs WordPress de migrer, copier ou cloner un site d’un emplacement à un autre. L’extension peut aussi servir d’outil de sauvegarde basique. // | ||
+ | </ | ||
+ | <WRAP column 25%> | ||
+ | |{{ Images_Cahier-101-06-065.png? | ||
+ | </ | ||
+ | <WRAP column 25%> | ||
+ | |{{ Images_Cahier-101-06-066.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | ==== Duplicator vous permet de: ==== | ||
+ | |||
+ | - Déplacer un site d’un domaine à un autre ou d’un hébergeur à un autre. | ||
+ | - Récupérer un site en ligne et le restaurer localement sur une machine virtuelle pour la vérification de nouveaux thèmes/ | ||
+ | - Sauvegarder manuellement un site. | ||
+ | - Dupliquer un site en production vers un site de pré-production et vice-versa. | ||
+ | - " | ||
+ | |||
+ | === Déplacement et sauvegarde === | ||
+ | |||
+ | Duplicator crée un " | ||
+ | |||
+ | === Améliorez vos processus === | ||
+ | |||
+ | Duplicator peut également éliminer les tâches répétitives qui consistent à installer un thème, des extensions ou intégrer du contenu de base. Plutôt que de le faire manuellement, | ||
+ | |||
+ | === Prenez note === | ||
+ | |||
+ | {{Images_Cahier-101-03-005.png? | ||
+ | |||
+ | === Avertissement === | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | ==== Installation ==== | ||
+ | |||
+ | <WRAP column 30%> | ||
+ | **Tableau de bord -> Extensions -> Ajouter ->** //**Mot clé**// | ||
+ | |{{ Images_Cahier-101-06-067.png? | ||
+ | </ | ||
+ | <WRAP column 30%> | ||
+ | \\ | ||
+ | \\ | ||
+ | **Activer**. | ||
+ | |{{ Images_Cahier-101-06-068.png? | ||
+ | </ | ||
+ | <WRAP column 30%> | ||
+ | \\ | ||
+ | L' | ||
+ | |{{ Images_Cahier-101-06-069.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | ==== Répertoire de stockage ==== | ||
+ | |||
+ | Il nous faut créer le répertoire de stockage pour les paquets que // | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# mkdir -p / | ||
+ | |||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | Ajustement du propriétaire, | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# chown -R apache: | ||
+ | |||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | On vérifie. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# ls -lsd / | ||
+ | |||
+ | 0 drwxrws--- 3 apache apache 34 28 févr. 12:39 / | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | \\ | ||
+ | |||
+ | ==== Configuration ==== | ||
+ | |||
+ | <WRAP center> | ||
+ | <WRAP column 45%> | ||
+ | Un nouveau menu a été créé: **Tableau de bord -> Duplicator -> Outils**. | ||
+ | |{{ Images_Cahier-101-06-070.png? | ||
+ | \\ | ||
+ | |||
+ | < | ||
+ | |||
+ | < | ||
+ | |||
+ | < | ||
+ | |||
+ | < | ||
+ | |||
+ | </ | ||
+ | <WRAP column 45%> | ||
+ | < | ||
+ | < | ||
+ | |{{ Images_Cahier-101-06-071.png? | ||
+ | </ | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | <WRAP center> | ||
+ | <WRAP column 45%> | ||
+ | On cherche le chemin de '' | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# which mysqldump102 | ||
+ | |||
+ | / | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | **Tableau de bord -> Duplicator -> Réglages ->** onglet **Paquets -> Custom Path**. | ||
+ | |||
+ | On entre **/ | ||
+ | |||
+ | **-> Enregistrer les réglages du paquet**. | ||
+ | </ | ||
+ | <WRAP column 45%> | ||
+ | |{{ Images_Cahier-101-06-072.png? | ||
+ | </ | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | ==== Abonnement à l' | ||
+ | |||
+ | <WRAP center> | ||
+ | <WRAP column 45%> | ||
+ | < | ||
+ | < | ||
+ | |{{ Images_Cahier-101-06-073.png? | ||
+ | </ | ||
+ | <WRAP column 45%> | ||
+ | \\ | ||
+ | Après avoir reçu le courriel d' | ||
+ | |{{ Images_Cahier-101-06-074.png? | ||
+ | </ | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | ===== Thème Storefront ===== | ||
+ | |||
+ | <WRAP column 40%> | ||
+ | {{Images_Cahier-101-03-005.png? | ||
+ | </ | ||
+ | <WRAP column 25%> | ||
+ | |{{ Images_Cahier-101-06-075.png? | ||
+ | </ | ||
+ | <WRAP column 25%> | ||
+ | |{{ Images_Cahier-101-06-076.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | <WRAP column 30%> | ||
+ | **Tableau de Bord -> Apparence -> Thèmes -> Ajouter ->** // | ||
+ | |{{ Images_Cahier-101-06-077.png? | ||
+ | </ | ||
+ | <WRAP column 30%> | ||
+ | \\ | ||
+ | Avec la souris, on survole le thème pour faire apparaître les boutons **-> Installer**. | ||
+ | |{{ Images_Cahier-101-06-078.png? | ||
+ | </ | ||
+ | <WRAP column 30%> | ||
+ | \\ | ||
+ | < | ||
+ | < | ||
+ | |{{ Images_Cahier-101-06-079.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | <WRAP center> | ||
+ | <WRAP column 60%> | ||
+ | \\ | ||
+ | On ferme ce message, car on installera // | ||
+ | |{{ Images_Cahier-101-06-080.png? | ||
+ | </ | ||
+ | <WRAP column 30%> | ||
+ | < | ||
+ | < | ||
+ | |{{ Images_Cahier-101-06-081.png? | ||
+ | </ | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | <WRAP center> | ||
+ | <WRAP column 55%> | ||
+ | Le thème a été installé et est utilisé pour afficher les pages de notre site. | ||
+ | </ | ||
+ | <WRAP column 35%> | ||
+ | |{{ Images_Cahier-101-06-082.png? | ||
+ | </ | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | ====== Extensions intéressantes ====== | ||
+ | |||
+ | ===== Introduction ===== | ||
+ | |||
+ | Si les fonctionnalités de WordPress ne vous suffisent pas, il est possible d’en ajouter en installant des extensions. | ||
+ | |||
+ | Il existe des milliers d' | ||
+ | |||
+ | Une extension, c’est quoi? Une extension est aussi un dossier, mais qu’on place dans '' | ||
+ | |||
+ | ===== Recommandations ===== | ||
+ | |||
+ | Toujours examiner la moyenne des étoiles, le nombre de traductions, | ||
+ | |||
+ | <WRAP column 22%> | ||
+ | |{{ Images_Cahier-101-06-083.png? | ||
+ | </ | ||
+ | <WRAP column 22%> | ||
+ | |{{ Images_Cahier-101-06-084.png? | ||
+ | </ | ||
+ | <WRAP column 22%> | ||
+ | |{{ Images_Cahier-101-06-085.png? | ||
+ | </ | ||
+ | <WRAP column 22%> | ||
+ | |{{ Images_Cahier-101-06-086.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | <WRAP center> | ||
+ | <WRAP column 45%> | ||
+ | Une autre bonne indication est le temps entre les demandes d'aide dans le forum de l' | ||
+ | |{{ Images_Cahier-101-06-087.png? | ||
+ | </ | ||
+ | <WRAP column 45%> | ||
+ | \\ | ||
+ | \\ | ||
+ | On peut aussi googler les " | ||
+ | |{{ Images_Cahier-101-06-088.png? | ||
+ | </ | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | ===== TinyMCE Advanced ===== | ||
+ | |||
+ | Référence: | ||
+ | |||
+ | <WRAP column 40%> | ||
+ | Cette extension permet d' | ||
+ | |||
+ | L' | ||
+ | </ | ||
+ | <WRAP column 25%> | ||
+ | |{{ Images_Cahier-101-06-089.png? | ||
+ | </ | ||
+ | <WRAP column 25%> | ||
+ | |{{ Images_Cahier-101-06-090.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | ==== Installation ==== | ||
+ | |||
+ | <WRAP column 25%> | ||
+ | **Tableau de bord -> Extensions -> Ajouter ->** // | ||
+ | |{{ Images_Cahier-101-06-091.png? | ||
+ | </ | ||
+ | <WRAP column 25%> | ||
+ | \\ | ||
+ | \\ | ||
+ | Activer. | ||
+ | |{{ Images_Cahier-101-06-092.png? | ||
+ | </ | ||
+ | <WRAP column 40%> | ||
+ | \\ | ||
+ | \\ | ||
+ | L' | ||
+ | |{{ Images_Cahier-101-06-093.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | <WRAP column 50%> | ||
+ | ==== Configuration ==== | ||
+ | |||
+ | **Tableau de bord -> Réglages -> TinyMCE Advanced**. | ||
+ | |||
+ | Cliquer et glisser les boutons désirés sur les barres de menu. | ||
+ | </ | ||
+ | <WRAP column 40%> | ||
+ | |{{ Images_Cahier-101-06-094.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | <WRAP column 30%> | ||
+ | Cliquer, glisser et organiser les menus selon l' | ||
+ | </ | ||
+ | <WRAP column 60%> | ||
+ | |{{ Images_Cahier-101-06-095.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | <WRAP column 30%> | ||
+ | Cocher les options désirées. | ||
+ | </ | ||
+ | <WRAP column 60%> | ||
+ | |{{ Images_Cahier-101-06-096.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | <WRAP column 30%> | ||
+ | Cocher les options désirées. | ||
+ | </ | ||
+ | <WRAP column 60%> | ||
+ | |{{ Images_Cahier-101-06-097.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | <WRAP column 30%> | ||
+ | {{Images_Cahier-101-03-005.png? | ||
+ | </ | ||
+ | <WRAP column 60%> | ||
+ | |{{ Images_Cahier-101-06-098.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | <WRAP column 30%> | ||
+ | {{Images_Cahier-101-03-004.png? | ||
+ | |||
+ | **Sauvegarder les changements**. | ||
+ | </ | ||
+ | <WRAP column 60%> | ||
+ | |{{ Images_Cahier-101-06-099.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | <WRAP center> | ||
+ | <WRAP column 30%> | ||
+ | < | ||
+ | < | ||
+ | |{{ Images_Cahier-101-06-100.png? | ||
+ | </ | ||
+ | <WRAP column 60%> | ||
+ | \\ | ||
+ | < | ||
+ | < | ||
+ | |{{ Images_Cahier-101-06-101.png? | ||
+ | </ | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | ===== Exclude Pages From Menu ===== | ||
+ | |||
+ | // | ||
+ | |||
+ | <WRAP column 50%> | ||
+ | Cette extension ajoute une case à cocher, //**Exclude this page from menu**//. Cette case n'est pas cochée par défaut. Si on coche la case, la page n' | ||
+ | </ | ||
+ | <WRAP column 20%> | ||
+ | |{{ Images_Cahier-101-06-102.png? | ||
+ | </ | ||
+ | <WRAP column 20%> | ||
+ | |{{ Images_Cahier-101-06-103.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | <WRAP column 50%> | ||
+ | Lors de la création d’une page, celle-ci est automatiquement ajoutée au menu de navigation du site. Si vous ne souhaitez pas qu’elle y soit ajoutée, il est possible de le faire à l'aide de //**Exclude Pages From Menu**//. Dans la colonne de droite, lors de la création de la page ou lors de sa modification, | ||
+ | </ | ||
+ | <WRAP column 40%> | ||
+ | |{{ Images_Cahier-101-06-104.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | ==== Installation ==== | ||
+ | |||
+ | <WRAP column 25%> | ||
+ | **Tableau de bord -> Extensions -> Ajouter ->** // | ||
+ | |{{ Images_Cahier-101-06-105.png? | ||
+ | </ | ||
+ | <WRAP column 25%> | ||
+ | \\ | ||
+ | \\ | ||
+ | **Activer**. | ||
+ | |{{ Images_Cahier-101-06-106.png? | ||
+ | </ | ||
+ | <WRAP column 40%> | ||
+ | \\ | ||
+ | \\ L' | ||
+ | |{{ Images_Cahier-101-06-107.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | <WRAP column 30%> | ||
+ | Supprimer le message en cliquant le **X** à droite. | ||
+ | </ | ||
+ | <WRAP column 60%> | ||
+ | |{{ Images_Cahier-101-06-108.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | <WRAP column 40%> | ||
+ | ==== Usage ==== | ||
+ | |||
+ | "Page d' | ||
+ | |{{ Images_Cahier-101-06-109.png? | ||
+ | </ | ||
+ | <WRAP column 50%> | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | |{{ Images_Cahier-101-06-110.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | |||
+ | <WRAP column 30%> | ||
+ | À droite, vers le bas de la page, on coche **Exclude this page from menu**. | ||
+ | |{{ Images_Cahier-101-06-111.png? | ||
+ | </ | ||
+ | <WRAP column 30%> | ||
+ | \\ | ||
+ | En haut à droite, **Mettre à jour**. | ||
+ | |{{ Images_Cahier-101-06-112.png? | ||
+ | </ | ||
+ | <WRAP column 30%> | ||
+ | Le titre de la page d' | ||
+ | |{{ Images_Cahier-101-06-113.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | ===== Broken Link Checker ===== | ||
+ | |||
+ | // | ||
+ | |||
+ | <WRAP column 50%> | ||
+ | Cette extension va scruter vos articles, commentaires et autres contenus à la recherche de liens cassés et d' | ||
+ | </ | ||
+ | <WRAP column 20%> | ||
+ | |{{ Images_Cahier-101-06-114.png? | ||
+ | </ | ||
+ | <WRAP column 20%> | ||
+ | |{{ Images_Cahier-101-06-115.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | ==== Installation ==== | ||
+ | |||
+ | <WRAP column 25%> | ||
+ | **Tableau de bord -> Extensions -> Ajouter ->** // | ||
+ | |{{ Images_Cahier-101-06-116.png? | ||
+ | </ | ||
+ | <WRAP column 25%> | ||
+ | \\ | ||
+ | \\ | ||
+ | **Activer**. | ||
+ | |{{ Images_Cahier-101-06-117.png? | ||
+ | </ | ||
+ | <WRAP column 40%> | ||
+ | \\ | ||
+ | \\ | ||
+ | L' | ||
+ | |{{ Images_Cahier-101-06-118.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | <WRAP column 30%> | ||
+ | Supprimer le message en cliquant l' | ||
+ | </ | ||
+ | <WRAP column 60%> | ||
+ | |{{ Images_Cahier-101-06-119.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | ==== Configuration ==== | ||
+ | |||
+ | <WRAP center> | ||
+ | <WRAP column 40%> | ||
+ | **Tableau de bord -> Extensions -> Extensions installées -> Broken Link Checker -> Réglages**. | ||
+ | |{{ Images_Cahier-101-06-120.png? | ||
+ | </ | ||
+ | <WRAP column 50%> | ||
+ | < | ||
+ | < | ||
+ | |{{ Images_Cahier-101-06-121.png? | ||
+ | </ | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | <WRAP column 30%> | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | |{{ Images_Cahier-101-06-122.png? | ||
+ | </ | ||
+ | <WRAP column 30%> | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | |{{ Images_Cahier-101-06-123.png? | ||
+ | </ | ||
+ | <WRAP column 30%> | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | |{{ Images_Cahier-101-06-124.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | <WRAP column 30%> | ||
+ | < | ||
+ | < | ||
+ | \\ | ||
+ | |||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | <WRAP column 30%> | ||
+ | |{{ Images_Cahier-101-06-125.png? | ||
+ | </ | ||
+ | <WRAP column 30%> | ||
+ | |{{ Images_Cahier-101-06-126.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | ===== Contact Form 7 ===== | ||
+ | |||
+ | // | ||
+ | |||
+ | <WRAP column 50%> | ||
+ | //Contact Form 7// permet la création d’une page de contact qui affichera un formulaire permettant aux personnes désireuses de nous contacter de le faire le plus simplement possible. | ||
+ | </ | ||
+ | <WRAP column 20%> | ||
+ | |{{ Images_Cahier-101-06-127.png? | ||
+ | </ | ||
+ | <WRAP column 20%> | ||
+ | |{{ Images_Cahier-101-06-128.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | ==== Installation ==== | ||
+ | |||
+ | <WRAP column 25%> | ||
+ | **Tableau de bord -> Extensions -> Ajouter ->** // | ||
+ | |{{ Images_Cahier-101-06-129.png? | ||
+ | </ | ||
+ | <WRAP column 25%> | ||
+ | \\ | ||
+ | \\ | ||
+ | **Activer**. | ||
+ | |{{ Images_Cahier-101-06-130.png? | ||
+ | </ | ||
+ | <WRAP column 40%> | ||
+ | \\ | ||
+ | \\ | ||
+ | L' | ||
+ | |{{ Images_Cahier-101-06-131.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | ==== Filtrage des pollupostage avec Akismet ==== | ||
+ | |||
+ | // | ||
+ | Aujourd' | ||
+ | |||
+ | <WRAP column 30%> | ||
+ | **Tableau de bord -> Contact -> Formulaire de contact ->** cliquer **Akismet**. | ||
+ | </ | ||
+ | <WRAP column 60%> | ||
+ | |{{ Images_Cahier-101-06-132.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | <WRAP center> | ||
+ | <WRAP column 45%> | ||
+ | \\ | ||
+ | Directives d' | ||
+ | |{{ Images_Cahier-101-06-133.png? | ||
+ | </ | ||
+ | <WRAP column 45%> | ||
+ | Résultats possibles après avoir rempli et envoyé le formulaire de contact. | ||
+ | |{{ Images_Cahier-101-06-134.png? | ||
+ | </ | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | === Akismet === | ||
+ | |||
+ | Tout d’abord, vous devez activer // | ||
+ | |||
+ | Ensuite, ajoutez les options suivantes liées à //Akismet// dans les champs appropriés de votre formulaire. | ||
+ | |||
+ | <WRAP indent> | ||
+ | < | ||
+ | Ajoutez cette option au champ qui accepte le nom de l' | ||
+ | Exemple: < | ||
+ | |||
+ | < | ||
+ | Ajoutez cette option au champ qui accepte l' | ||
+ | Exemple: < | ||
+ | |||
+ | |||
+ | < | ||
+ | Ajoutez cette option au champ qui accepte l'URL de l' | ||
+ | Exemple: < | ||
+ | </ | ||
+ | |||
+ | Quand au moins une de ces options est définie // | ||
+ | |||
+ | Si //Akismet// considère cette soumission comme un pollupostage, | ||
+ | |||
+ | <WRAP column 30%> | ||
+ | On supprime le message de //Contact Form 7// en cliquant **Ignorer**. | ||
+ | </ | ||
+ | <WRAP column 60%> | ||
+ | |{{ Images_Cahier-101-06-135.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | ==== Formulaire de contact ==== | ||
+ | |||
+ | <WRAP column 45%> | ||
+ | < | ||
+ | |||
+ | < | ||
+ | |||
+ | < | ||
+ | </ | ||
+ | <WRAP column 45%> | ||
+ | |{{ Images_Cahier-101-06-136.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | <WRAP column 35%> | ||
+ | Onglet **Formulaire**. | ||
+ | |||
+ | < | ||
+ | |||
+ | < | ||
+ | **akismet: | ||
+ | |||
+ | < | ||
+ | |||
+ | < | ||
+ | \\ | ||
+ | \\ | ||
+ | \\ | ||
+ | {{Images_Cahier-101-03-005.png? | ||
+ | </ | ||
+ | <WRAP column 55%> | ||
+ | |{{ Images_Cahier-101-06-137.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | <WRAP column 35%> | ||
+ | Onglet **E-mail.** | ||
+ | |||
+ | < | ||
+ | |||
+ | < | ||
+ | **akismet: | ||
+ | |||
+ | < | ||
+ | \\ | ||
+ | \\ | ||
+ | < | ||
+ | </ | ||
+ | <WRAP column 55%> | ||
+ | |{{ Images_Cahier-101-06-138.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | <WRAP column 35%> | ||
+ | On clique à l' | ||
+ | </ | ||
+ | <WRAP column 55%> | ||
+ | |{{ Images_Cahier-101-06-139.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | <WRAP column 30%> | ||
+ | **Tableau de bord -> Contact -> Formulaire de contact** pour afficher les paramètres du formulaire. | ||
+ | </ | ||
+ | <WRAP column 60%> | ||
+ | |{{ Images_Cahier-101-06-140.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | <WRAP column 30%> | ||
+ | **Tableau de bord -> Pages -> Ajouter**. | ||
+ | |||
+ | On entre le titre de la page. Ce titre n'est pas obligatoirement le même que celui du formulaire. | ||
+ | |||
+ | Sous l' | ||
+ | |||
+ | **Publier**. | ||
+ | </ | ||
+ | <WRAP column 60%> | ||
+ | |{{ Images_Cahier-101-06-141.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | Au retour de // | ||
+ | |||
+ | <WRAP center> | ||
+ | <WRAP column 45%> | ||
+ | Au-dessus du titre de la page, on clique **Voir la page** pour afficher celle-ci. | ||
+ | |{{ Images_Cahier-101-06-142.png? | ||
+ | |||
+ | {{Images_Cahier-101-03-005.png? | ||
+ | |||
+ | Sur la ligne de menu de toutes les pages de notre site, le bouton //**Nous contacter**// | ||
+ | </ | ||
+ | <WRAP column 45%> | ||
+ | \\ | ||
+ | Notre formulaire s' | ||
+ | |{{ Images_Cahier-101-06-143.png? | ||
+ | </ | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | {{Images_Cahier-101-03-005.png? | ||
+ | |||
+ | {{ Images_Cahier-101-06-144.png? | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | ===== MaxButtons ===== | ||
+ | // | ||
+ | Référence:// | ||
+ | |||
+ | <WRAP column 50%> | ||
+ | // | ||
+ | </ | ||
+ | <WRAP column 20%> | ||
+ | |{{ Images_Cahier-101-06-145.png? | ||
+ | </ | ||
+ | <WRAP column 20%> | ||
+ | |{{ Images_Cahier-101-06-146.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | ==== Installation ==== | ||
+ | |||
+ | <WRAP column 25%> | ||
+ | **Tableau de bord -> Extensions -> Ajouter ->** // | ||
+ | |{{ Images_Cahier-101-06-147.png? | ||
+ | </ | ||
+ | <WRAP column 25%> | ||
+ | \\ | ||
+ | \\ | ||
+ | **Activer**. | ||
+ | |{{ Images_Cahier-101-06-148.png? | ||
+ | </ | ||
+ | <WRAP column 40%> | ||
+ | \\ | ||
+ | \\ | ||
+ | L' | ||
+ | |{{ Images_Cahier-101-06-149.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | ====== Conditions d' | ||
+ | |||
+ | ===== Introduction ===== | ||
+ | |||
+ | {{Images_Cahier-101-03-003.png? | ||
+ | |||
+ | ===== Création de la page ===== | ||
+ | |||
+ | <WRAP column 30%> | ||
+ | **Tableau de bord -> Pages -> Ajouter ->** on écrit notre page **-> Publier**. | ||
+ | |||
+ | On vérifie notre page en cliquant **Prévisualiser les modifications**. | ||
+ | </ | ||
+ | <WRAP column 60%> | ||
+ | |{{ Images_Cahier-101-06-150.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | <WRAP column 45%> | ||
+ | On peut aussi cliquer l' | ||
+ | </ | ||
+ | <WRAP column 45%> | ||
+ | |{{ Images_Cahier-101-06-151.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | ====== CSS et Thème enfant ====== | ||
+ | |||
+ | ===== Introduction ===== | ||
+ | |||
+ | Nous allons modifier l' | ||
+ | |||
+ | ==== CSS ==== | ||
+ | |||
+ | // | ||
+ | Les feuilles de style en cascade, généralement appelées CSS de l' | ||
+ | |||
+ | ==== Thème enfant ==== | ||
+ | // | ||
+ | Référence:// | ||
+ | Un //Thème enfant// WordPress est un thème qui hérite des fonctionnalités d'un autre thème appelé //Thème parent//. Le Thème enfant est la méthode recommandée pour modifier un thème existant. | ||
+ | |||
+ | === Pourquoi utiliser un Thème enfant? === | ||
+ | |||
+ | Il existe quelques raisons qui pourraient vous motiver à utiliser un Thème enfant: | ||
+ | |||
+ | - Si vous modifiez un thème existant et qu'il est mis à jour, vos modifications seront perdues. | ||
+ | - Vous assure que vos modifications seront préservées. | ||
+ | - Accélère le temps de développement. | ||
+ | - Excellente façon d' | ||
+ | |||
+ | ===== Création d'un Thème enfant pour Storefront ===== | ||
+ | |||
+ | // | ||
+ | Un Thème enfant est composé d'au moins un répertoire //(le répertoire du Thème enfant)// et de deux fichiers obligatoires: | ||
+ | |||
+ | ==== Répertoire du Thème enfant ==== | ||
+ | |||
+ | La première étape dans la création d'un Thème enfant est de créer le répertoire du Thème enfant dans '' | ||
+ | |||
+ | On se rend dans le répertoire des thèmes. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# cd / | ||
+ | |||
+ | [root@tchana themes]# | ||
+ | </ | ||
+ | |||
+ | On vérifie. | ||
+ | |||
+ | < | ||
+ | [root@tchana themes]# pwd | ||
+ | |||
+ | / | ||
+ | [root@tchana themes]# | ||
+ | </ | ||
+ | |||
+ | On crée le répertoire pour le Thème enfant. | ||
+ | |||
+ | < | ||
+ | [root@tchana themes]# mkdir storefront-enfant | ||
+ | |||
+ | [root@tchana themes]# | ||
+ | </ | ||
+ | |||
+ | On vérifie. | ||
+ | |||
+ | < | ||
+ | [root@tchana themes]# ls -alsd storefront-enfant/ | ||
+ | |||
+ | 0 drwxr-xr-x 2 root root 6 10 févr. 23:08 storefront-enfant/ | ||
+ | [root@tchana themes]# | ||
+ | </ | ||
+ | |||
+ | {{Images_Cahier-101-03-004.png? | ||
+ | |||
+ | ==== Fichier style.css ==== | ||
+ | |||
+ | L' | ||
+ | |||
+ | <WRAP box round> | ||
+ | < | ||
+ | /* | ||
+ | Theme Name: | ||
+ | Theme URI: http:// | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | Text Domain: | ||
+ | */ | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | {{Images_Cahier-101-03-005.png? | ||
+ | |||
+ | On crée le fichier '' | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | < | ||
+ | cat > storefront-enfant/ | ||
+ | /* | ||
+ | Theme Name: | ||
+ | Theme URI: http:// | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | Text Domain: | ||
+ | */ | ||
+ | |||
+ | EOT | ||
+ | |||
+ | </ | ||
+ | |||
+ | On vérifie. | ||
+ | |||
+ | < | ||
+ | [root@tchana themes]# cat storefront-enfant/ | ||
+ | |||
+ | /* | ||
+ | Theme Name: | ||
+ | Theme URI: http:// | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | Text Domain: | ||
+ | */ | ||
+ | |||
+ | [root@tchana themes]# | ||
+ | </ | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | ==== Fichier functions.php ==== | ||
+ | |||
+ | Le seul fichier requis pour un Thème enfant est '' | ||
+ | |||
+ | La dernière étape consiste à mettre en file d' | ||
+ | |||
+ | La méthode " | ||
+ | |||
+ | La première ligne du fichier '' | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | Si le Thème parent ne contenait qu'un seul fichier de style, on utiliserait le fichier '' | ||
+ | |||
+ | <WRAP box round> | ||
+ | < | ||
+ | <?php | ||
+ | |||
+ | function theme_enqueue_styles() { | ||
+ | wp_enqueue_style( ' | ||
+ | } | ||
+ | |||
+ | add_action( ' | ||
+ | ?> | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | Vérification du nombre de fichiers de styles dans le Thème parent. | ||
+ | |||
+ | < | ||
+ | [root@tchana themes]# ls -als storefront/ | ||
+ | |||
+ | 40 -rw-r--r-- 1 apache apache 39447 10 févr. 19:13 storefront/ | ||
+ | 40 -rw-r--r-- 1 apache apache 39440 10 févr. 19:13 storefront/ | ||
+ | [root@tchana themes]# | ||
+ | </ | ||
+ | |||
+ | Il existe deux fichiers de styles dans le Thème parent Storefront. | ||
+ | |||
+ | Il faut donc deux fonctions dans le fichier '' | ||
+ | |||
+ | <WRAP box round> | ||
+ | < | ||
+ | <?php | ||
+ | function theme_name_parent_styles() { | ||
+ | wp_enqueue_style( ' | ||
+ | |||
+ | if ( is_rtl() ) { | ||
+ | wp_enqueue_style( ' | ||
+ | } | ||
+ | } | ||
+ | |||
+ | add_action( ' | ||
+ | |||
+ | ?> | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | On crée le fichier '' | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | < | ||
+ | cat > storefront-enfant/ | ||
+ | <?php | ||
+ | // Etiquette d' | ||
+ | // Ce script va charger les feuilles de styles du Theme parent (Storefront). | ||
+ | |||
+ | function theme_name_parent_styles() { | ||
+ | // Mettre en file d' | ||
+ | wp_enqueue_style( ' | ||
+ | |||
+ | // Mettre en file d' | ||
+ | if ( is_rtl() ) { | ||
+ | wp_enqueue_style( ' | ||
+ | } | ||
+ | } | ||
+ | add_action( ' | ||
+ | |||
+ | ?> | ||
+ | |||
+ | EOT | ||
+ | |||
+ | </ | ||
+ | |||
+ | On vérifie. | ||
+ | |||
+ | < | ||
+ | [root@tchana themes]# cat storefront-enfant/ | ||
+ | |||
+ | <?php | ||
+ | // Etiquette d' | ||
+ | // Ce script va charger les feuilles de styles du Theme parent (Storefront). | ||
+ | |||
+ | function theme_name_parent_styles() { | ||
+ | // Mettre en file d' | ||
+ | wp_enqueue_style( ' | ||
+ | |||
+ | // Mettre en file d' | ||
+ | if ( is_rtl() ) { | ||
+ | wp_enqueue_style( ' | ||
+ | } | ||
+ | } | ||
+ | add_action( ' | ||
+ | |||
+ | ?> | ||
+ | |||
+ | [root@tchana themes]# | ||
+ | </ | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | ==== Fichier screenshot.png ==== | ||
+ | |||
+ | // | ||
+ | On peut créer une image pour le Thème enfant. L' | ||
+ | |||
+ | {{Images_Cahier-101-03-005.png? | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | **Tableau de bord -> Apparence -> Thèmes ->** avec la souris, on survole l' | ||
+ | |||
+ | <WRAP column 30%> | ||
+ | |{{ Images_Cahier-101-06-152.png? | ||
+ | </ | ||
+ | <WRAP column 30%> | ||
+ | |{{ Images_Cahier-101-06-153.png? | ||
+ | </ | ||
+ | <WRAP column 30%> | ||
+ | |{{ Images_Cahier-101-06-154.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | <WRAP centeralign> | ||
+ | \\ | ||
+ | |||
+ | ===== Pied de page ===== | ||
+ | |||
+ | Le fichier qui affiche le pied de page est '' | ||
+ | |||
+ | <WRAP column 20%> | ||
+ | Pied de page original. | ||
+ | </ | ||
+ | <WRAP column 70%> | ||
+ | |{{ Images_Cahier-101-06-155.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | Nous allons copier le fichier '' | ||
+ | |||
+ | <WRAP column 20%> | ||
+ | Pied de page après que nous aurons effectué les modifications. | ||
+ | </ | ||
+ | <WRAP column 70%> | ||
+ | |{{ Images_Cahier-101-06-156.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | ===== Logo ===== | ||
+ | |||
+ | On s' | ||
+ | |||
+ | < | ||
+ | [root@tchana themes]# pwd | ||
+ | |||
+ | / | ||
+ | [root@tchana themes]# | ||
+ | </ | ||
+ | |||
+ | On crée le répertoire '' | ||
+ | |||
+ | < | ||
+ | [root@tchana themes]# mkdir -p / | ||
+ | |||
+ | [root@tchana themes]# | ||
+ | </ | ||
+ | |||
+ | On vérifie. | ||
+ | |||
+ | < | ||
+ | [root@tchana themes]# ls -alsd / | ||
+ | |||
+ | 0 drwxr-xr-x 2 root root 6 10 févr. 23:18 / | ||
+ | [root@tchana themes]# | ||
+ | </ | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | On vérifie le téléversement. | ||
+ | |||
+ | < | ||
+ | [root@tchana themes]# ls -als ../ | ||
+ | |||
+ | 20 -rw-r--r-- 1 root root 16544 16 mars 2017 ../ | ||
+ | [root@tchana themes]# | ||
+ | </ | ||
+ | \\ | ||
+ | |||
+ | ==== Fichier footer.php ==== | ||
+ | |||
+ | Copie du fichier '' | ||
+ | |||
+ | < | ||
+ | [root@tchana themes]# cp storefront/ | ||
+ | |||
+ | [root@tchana themes]# | ||
+ | </ | ||
+ | |||
+ | On vérifie. | ||
+ | |||
+ | < | ||
+ | [root@tchana themes]# ls -ls storefront-enfant/ | ||
+ | |||
+ | 4 -rw-r--r-- 1 root root 737 10 févr. 23:22 storefront-enfant/ | ||
+ | [root@tchana themes]# | ||
+ | </ | ||
+ | |||
+ | On affiche le fichier '' | ||
+ | |||
+ | < | ||
+ | [root@tchana themes]# cat storefront-enfant/ | ||
+ | |||
+ | <?php | ||
+ | /** | ||
+ | * The template for displaying the footer. | ||
+ | * | ||
+ | * Contains the closing of the #content div and all content after | ||
+ | * | ||
+ | * @package storefront | ||
+ | */ | ||
+ | |||
+ | ?> | ||
+ | |||
+ | </ | ||
+ | </ | ||
+ | |||
+ | <?php do_action( ' | ||
+ | |||
+ | <footer id=" | ||
+ | <div class=" | ||
+ | |||
+ | <?php | ||
+ | /** | ||
+ | * Functions hooked in to storefront_footer action | ||
+ | * | ||
+ | * @hooked storefront_footer_widgets - 10 | ||
+ | * @hooked storefront_credit | ||
+ | */ | ||
+ | do_action( ' | ||
+ | |||
+ | </ | ||
+ | </ | ||
+ | |||
+ | <?php do_action( ' | ||
+ | |||
+ | </ | ||
+ | |||
+ | <?php wp_footer(); | ||
+ | |||
+ | </ | ||
+ | </ | ||
+ | [root@tchana themes]# | ||
+ | </ | ||
+ | |||
+ | Le lignes originales que nous allons remplacer sont: | ||
+ | |||
+ | < | ||
+ | ... | ||
+ | <footer id=" | ||
+ | <div class=" | ||
+ | |||
+ | <?php | ||
+ | /** | ||
+ | * Functions hooked in to storefront_footer action | ||
+ | * | ||
+ | * @hooked storefront_footer_widgets - 10 | ||
+ | * @hooked storefront_credit | ||
+ | */ | ||
+ | do_action( ' | ||
+ | |||
+ | </ | ||
+ | </ | ||
+ | ... | ||
+ | </ | ||
+ | |||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | < | ||
+ | ... | ||
+ | <?php // | ||
+ | <!-- #DEBUT - MODIFICATION DU PIED DE PAGE --> | ||
+ | <!-- Trait horizontal de séparation --> | ||
+ | <hr style=" | ||
+ | |||
+ | <br /> | ||
+ | |||
+ | <!-- Première ligne --> | ||
+ | <div align=" | ||
+ | <?php _e( ' | ||
+ | <?php echo date(" | ||
+ | <?php _e( 'Tous droits r&# | ||
+ | < | ||
+ | <em> | ||
+ | <a href="/ | ||
+ | style=" | ||
+ | target=" | ||
+ | title=" | ||
+ | & | ||
+ | </em> | ||
+ | </ | ||
+ | |||
+ | <!-- Deuxième ligne --> | ||
+ | <div align=" | ||
+ | |||
+ | <a href=" | ||
+ | target=" | ||
+ | title=" | ||
+ | <img style=" | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | </a> | ||
+ | </ | ||
+ | <!-- #FIN - MODIFICATION DU PIED DE PAGE --> | ||
+ | ... | ||
+ | </ | ||
+ | |||
+ | <WRAP centeralign> | ||
+ | On vérifie. // | ||
+ | Pour les codes hexadécimaux, | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | [root@tchana themes]# cat storefront-enfant/ | ||
+ | |||
+ | <?php | ||
+ | /** | ||
+ | * The template for displaying the footer. | ||
+ | * | ||
+ | * Contains the closing of the #content div and all content after | ||
+ | * | ||
+ | * @package storefront | ||
+ | */ | ||
+ | |||
+ | ?> | ||
+ | |||
+ | </ | ||
+ | </ | ||
+ | |||
+ | <?php do_action( ' | ||
+ | |||
+ | <?php // | ||
+ | <!-- #DEBUT - MODIFICATION DU PIED DE PAGE --> | ||
+ | <!-- Trait horizontal de séparation --> | ||
+ | <hr style=" | ||
+ | |||
+ | <br /> | ||
+ | |||
+ | <!-- Première ligne --> | ||
+ | <div align=" | ||
+ | <?php _e( ' | ||
+ | <?php echo date(" | ||
+ | <?php _e( 'Tous droits r&# | ||
+ | < | ||
+ | <em> | ||
+ | <a href="/ | ||
+ | style=" | ||
+ | target=" | ||
+ | title=" | ||
+ | & | ||
+ | </em> | ||
+ | </ | ||
+ | |||
+ | <!-- Deuxième ligne --> | ||
+ | <div align=" | ||
+ | |||
+ | <a href=" | ||
+ | target=" | ||
+ | title=" | ||
+ | <img style=" | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | </a> | ||
+ | </ | ||
+ | <!-- #FIN - MODIFICATION DU PIED DE PAGE --> | ||
+ | |||
+ | <?php do_action( ' | ||
+ | |||
+ | </ | ||
+ | |||
+ | <?php wp_footer(); | ||
+ | |||
+ | </ | ||
+ | </ | ||
+ | [root@tchana themes]# | ||
+ | </ | ||
+ | \\ | ||
+ | |||
+ | <WRAP column 20%> | ||
+ | Voilà, notre nouveau pied de page s' | ||
+ | </ | ||
+ | <WRAP column 70%> | ||
+ | |{{ Images_Cahier-101-06-157.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | ===== Titre de page ===== | ||
+ | |||
+ | <WRAP column 30%> | ||
+ | Voici l' | ||
+ | |||
+ | On veut le titre de la page centré, une police de 1.75em //( ± 21pt )// et en gras. | ||
+ | </ | ||
+ | <WRAP column 60%> | ||
+ | |{{ Images_Cahier-101-06-158.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | On s' | ||
+ | < | ||
+ | |||
+ | [root@tchana themes]# pwd | ||
+ | |||
+ | / | ||
+ | [root@tchana themes]# | ||
+ | </ | ||
+ | |||
+ | On ajoute la nouvelle directive ci-dessous au fichier '' | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | < | ||
+ | cat >> storefront-enfant/ | ||
+ | /* TITRE DE LA PAGE - police 21pt, centré et gras */ | ||
+ | .entry-title { | ||
+ | font-size: 1.75em; | ||
+ | text-align: center; | ||
+ | font-weight: | ||
+ | } | ||
+ | |||
+ | EOT | ||
+ | |||
+ | </ | ||
+ | |||
+ | On vérifie les //7// dernières lignes du fichier. | ||
+ | |||
+ | < | ||
+ | [root@tchana themes]# tail -7 storefront-enfant/ | ||
+ | |||
+ | /* TITRE DE LA PAGE - police 21pt, centré et gras */ | ||
+ | .entry-title { | ||
+ | font-size: 1.75em; | ||
+ | text-align: center; | ||
+ | font-weight: | ||
+ | } | ||
+ | |||
+ | [root@tchana themes]# | ||
+ | </ | ||
+ | |||
+ | |||
+ | |||
+ | <WRAP column 30%> | ||
+ | On affiche la page des // | ||
+ | </ | ||
+ | <WRAP column 60%> | ||
+ | |{{ Images_Cahier-101-06-159.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | ===== Logo et slogan ===== | ||
+ | |||
+ | On veut mettre notre logo et une image à la place du logo et du slogan standard. | ||
+ | |||
+ | {{ Images_Cahier-101-06-162.png? | ||
+ | \\ | ||
+ | |||
+ | ==== Fichier style.css ==== | ||
+ | |||
+ | <WRAP box> | ||
+ | < | ||
+ | ... | ||
+ | /* LOGO ET SLOGAN DU SITE - ne pas l' | ||
+ | .site-header .site-branding { display: none;} | ||
+ | |||
+ | /* ARRIÈRE-PLAN DE L' | ||
+ | .site-header { background-color: | ||
+ | |||
+ | /* COULEUR DE LA POLICE DU MENU - la couleur est mauve et en gras */ | ||
+ | .main-navigation ul.menu > li > a, .main-navigation ul.nav-menu > li > a { | ||
+ | color: #96588a; | ||
+ | } | ||
+ | |||
+ | /* Pour insérer 20px au-dessus du diagramme réseau et (0px en-dessous du menu principal) */ | ||
+ | /* Fonctionne avec la directive de l' | ||
+ | .site-header { | ||
+ | padding-top: | ||
+ | padding-bottom: | ||
+ | } | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | < | ||
+ | cat >> storefront-enfant/ | ||
+ | |||
+ | /* LOGO ET SLOGAN DU SITE - ne pas l' | ||
+ | .site-header .site-branding { display: none;} | ||
+ | |||
+ | /* ARRIÈRE-PLAN DE L' | ||
+ | .site-header { background-color: | ||
+ | |||
+ | /* COULEUR DE LA POLICE DU MENU - la couleur est mauve et en gras*/ | ||
+ | .main-navigation ul.menu > li > a, .main-navigation ul.nav-menu > li > a { | ||
+ | color: #96588a; | ||
+ | font-weight: | ||
+ | } | ||
+ | |||
+ | /* Pour insérer 20px au-dessus du diagramme réseau et (0px en-dessous du menu principal) */ | ||
+ | /* Fonctionne avec la directive de l' | ||
+ | .site-header { | ||
+ | padding-top: | ||
+ | padding-bottom: | ||
+ | } | ||
+ | |||
+ | EOT | ||
+ | |||
+ | </ | ||
+ | |||
+ | On vérifie. | ||
+ | |||
+ | < | ||
+ | [root@tchana themes]# tail -n19 storefront-enfant/ | ||
+ | |||
+ | /* LOGO ET SLOGAN DU SITE - ne pas l' | ||
+ | .site-header .site-branding { display: none;} | ||
+ | |||
+ | /* ARRIÈRE-PLAN DE L' | ||
+ | .site-header { background-color: | ||
+ | |||
+ | /* COULEUR DE LA POLICE DU MENU - la couleur est mauve et en gras*/ | ||
+ | .main-navigation ul.menu > li > a, .main-navigation ul.nav-menu > li > a { | ||
+ | color: #96588a; | ||
+ | font-weight: | ||
+ | } | ||
+ | |||
+ | /* Pour insérer 20px au-dessus du diagramme réseau et (0px en-dessous du menu principal) */ | ||
+ | /* Fonctionne avec la directive de l' | ||
+ | .site-header { | ||
+ | padding-top: | ||
+ | padding-bottom: | ||
+ | } | ||
+ | |||
+ | [root@tchana themes]# | ||
+ | </ | ||
+ | |||
+ | ==== Fichier functions.php ==== | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | < | ||
+ | /* ############################################ | ||
+ | /* 2018-03-29_12h43 | ||
+ | /* APPARENCE | ||
+ | /* Pas de jeu d’images | ||
+ | /* Couleurs - En-tête actuel | ||
+ | /* Couleur d’arrière-plan: | ||
+ | /* Couleur du texte: # | ||
+ | /* Couleur des liens: # | ||
+ | /* IMAGE D' | ||
+ | /* LOGO: / | ||
+ | /* LIEN: / */ | ||
+ | /* IMAGE RESEAU: / | ||
+ | /* LIEN: aucun */ | ||
+ | |||
+ | add_action( ' | ||
+ | function jk_storefront_header_content() { | ||
+ | ?> | ||
+ | <div> | ||
+ | <table style=" | ||
+ | < | ||
+ | <tr> | ||
+ | <td style=" | ||
+ | <td style=" | ||
+ | </tr> | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | <?php | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | |||
+ | On vérifie. | ||
+ | |||
+ | < | ||
+ | [root@tchana themes]# tail -33 storefront-enfant/ | ||
+ | |||
+ | /* ############################################ | ||
+ | /* 2018-03-29_12h43 | ||
+ | /* APPARENCE | ||
+ | /* Pas de jeu d’images | ||
+ | /* Couleurs - En-tête actuel | ||
+ | /* Couleur d’arrière-plan: | ||
+ | /* Couleur du texte: # | ||
+ | /* Couleur des liens: # | ||
+ | /* IMAGE D' | ||
+ | /* LOGO: / | ||
+ | /* LIEN: / */ | ||
+ | /* IMAGE RESEAU: / | ||
+ | /* LIEN: aucun */ | ||
+ | |||
+ | add_action( ' | ||
+ | function jk_storefront_header_content() { | ||
+ | ?> | ||
+ | <div> | ||
+ | <table style=" | ||
+ | < | ||
+ | <tr> | ||
+ | <td style=" | ||
+ | <td style=" | ||
+ | </tr> | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | <?php | ||
+ | } | ||
+ | |||
+ | ?> | ||
+ | |||
+ | [root@tchana themes]# | ||
+ | </ | ||
+ | |||
+ | ==== Répertoire des images d' | ||
+ | |||
+ | On crée le répertoire '' | ||
+ | |||
+ | < | ||
+ | [root@tchana themes]# mkdir -p / | ||
+ | |||
+ | [root@tchana themes]# | ||
+ | </ | ||
+ | |||
+ | On vérifie. | ||
+ | |||
+ | < | ||
+ | [root@tchana themes]# ls -alsd / | ||
+ | |||
+ | 0 drwxr-xr-x 2 root root 219 10 févr. 23:21 / | ||
+ | [root@tchana themes]# | ||
+ | </ | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | On vérifie. | ||
+ | |||
+ | < | ||
+ | [root@tchana themes]# ls -ls / | ||
+ | |||
+ | total 144 | ||
+ | 80 -rw-r--r-- 1 root | ||
+ | 44 -rw-r--r-- 1 root | ||
+ | [root@tchana themes]# | ||
+ | </ | ||
+ | |||
+ | <WRAP column 30%> | ||
+ | On se rend sur notre site et notre nouvel en-tête s' | ||
+ | </ | ||
+ | <WRAP column 60%> | ||
+ | |{{ Images_Cahier-101-06-163.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | ===== Conclusion du Thème enfant==== | ||
+ | |||
+ | Utilisant un Thème enfant, on peut modifier le code CSS de notre site sans craindre qu'une mise à jour écrase nos modifications. | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | \\ | ||
+ | |||
+ | ===== Droits et permissions ===== | ||
+ | |||
+ | On peut ajuster le propriétaire et le groupe pour tout le répertoire racine de notre site Web principal. | ||
+ | |||
+ | < | ||
+ | [root@tchana themes]# chown -R apache: | ||
+ | |||
+ | [root@tchana themes]# | ||
+ | </ | ||
+ | |||
+ | On enlève tous les droits à l' | ||
+ | |||
+ | < | ||
+ | [root@tchana themes]# chmod -R o-rwx / | ||
+ | |||
+ | [root@tchana themes]# | ||
+ | </ | ||
+ | |||
+ | {{Images_Cahier-101-03-003.png? | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | ====== Mise à jour des Collections ====== | ||
+ | |||
+ | ===== Introduction ===== | ||
+ | |||
+ | 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? | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | ====== Hôte virtuel ====== | ||
+ | |||
+ | ===== Description ===== | ||
+ | |||
+ | // | ||
+ | L' | ||
+ | |||
+ | ==== Noms d' | ||
+ | |||
+ | Les //Noms d' | ||
+ | |||
+ | ==== Configuration d'une application Web ==== | ||
+ | |||
+ | Lorsqu' | ||
+ | |||
+ | - {{Images_Cahier-101-03-003.png? | ||
+ | - {{Images_Cahier-101-03-005.png? | ||
+ | |||
+ | ==== Autorisations Apache ==== | ||
+ | |||
+ | Les fichiers téléchargés par FTP appartiennent au groupe apache. Si vous devez autoriser l' | ||
+ | |||
+ | {{Images_Cahier-101-03-008.png? | ||
+ | |||
+ | ===== Création d'un deuxième domaine pour un second WordPress ===== | ||
+ | |||
+ | À la section //DNS dynamique// du [[nethserver_101_cahier_05_vdsl_fqdn_internet_et_nethserver|Cahier-05]]: | ||
+ | |||
+ | {{ Images_Cahier-101-06-164.png? | ||
+ | |||
+ | Lorsque nous voudrons installer un autre WordPress pour le domaine // | ||
+ | <wrap em> | ||
+ | |||
+ | ===== Création d'une entrée DNS pour un 2e domaine ===== | ||
+ | |||
+ | Il nous faut créer une entrée DNS pour un nom FQDN d' | ||
+ | |||
+ | <WRAP column 30%> | ||
+ | **Configuration -> DNS ->** onglet | ||
+ | </ | ||
+ | <WRAP column 60%> | ||
+ | |{{ Images_Cahier-101-06-165.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | Lorsque coché, le paramètre // | ||
+ | |||
+ | <WRAP center> | ||
+ | <WRAP column 45%> | ||
+ | |{{ Images_Cahier-101-06-166.png? | ||
+ | </ | ||
+ | <WRAP column 45%> | ||
+ | |{{ Images_Cahier-101-06-167.png? | ||
+ | </ | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | {{Images_Cahier-101-03-004.png? | ||
+ | |||
+ | ==== Alias ==== | ||
+ | |||
+ | Non nécessaire, | ||
+ | {{Images_Cahier-101-03-004.png? | ||
+ | |||
+ | <WRAP column 25%> | ||
+ | |{{ Images_Cahier-101-06-168.png? | ||
+ | </ | ||
+ | <WRAP column 25%> | ||
+ | |{{ Images_Cahier-101-06-169.png? | ||
+ | </ | ||
+ | <WRAP column 40%> | ||
+ | |{{ Images_Cahier-101-06-170.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | ===== Création d'un hôte de messagerie pour un 2e domaine ===== | ||
+ | |||
+ | Pour pouvoir accéder à //Webmail// en utilisant le FQDN de notre 2e domaine, il faut indiquer au Serveur NethServer que ce domaine est aussi un serveur de messagerie électronique en créant un nouveau domaine de messagerie. | ||
+ | |||
+ | **Configuration -> Courrier (Email)** //(après mai 2019, **Messagerie électronique**)// | ||
+ | |||
+ | <WRAP center> | ||
+ | <WRAP column 25%> | ||
+ | **-> micronator-dev.net** | ||
+ | |||
+ | **-> Pour Webmail du 2e domaine** | ||
+ | |||
+ | ⦿ // | ||
+ | |||
+ | ☑ **Accepter des destinataires inconnus**\\ | ||
+ | Ce paramètre et // | ||
+ | |||
+ | ☐ //**Signer les messages sortant avec DomainKeys Identified Mail (DKIM)**// | ||
+ | On ne coche pas ce paramètre, car nous sommes sur un serveur LOCAL. Voir le paragraphe [[nethserver_101_cahier_06_nethserver_wordPress# | ||
+ | |||
+ | **SOUMETTRE**. | ||
+ | </ | ||
+ | <WRAP column 65%> | ||
+ | |{{ Images_Cahier-101-06-171.png? | ||
+ | </ | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | <WRAP column 25%> | ||
+ | Le 2e domaine est maintenant un serveur de messagerie. | ||
+ | </ | ||
+ | <WRAP column 65%> | ||
+ | |{{ Images_Cahier-101-06-172.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | ===== Création d'un hôte virtuel pour un 2e domaine ===== | ||
+ | |||
+ | Nous allons créer un hôte virtuel pour le 2e domaine afin de créer un répertoire pour pouvoir y installer un second WordPress qui sera entièrement dédié à ce 2e domaine. Nous utiliserons deux noms FQDN afin de pouvoir accéder à ce second WordPress en se rendant aux URL suivants: http:// | ||
+ | |||
+ | <WRAP column 25%> | ||
+ | **Gestion -> Hôtes virtuels -> CRÉER NOUVEAU**. | ||
+ | </ | ||
+ | <WRAP column 65%> | ||
+ | |{{ Images_Cahier-101-06-173.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | ==== Onglet Général ==== | ||
+ | |||
+ | {{Images_Cahier-101-03-005.png? | ||
+ | |||
+ | <WRAP column 45%> | ||
+ | // | ||
+ | < | ||
+ | < | ||
+ | |||
+ | // | ||
+ | Champ facultatif pour une brève description. | ||
+ | |||
+ | //**Noms d' | ||
+ | La liste des noms de domaine pleinement qualifiés //(FQDN)// associés à l' | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | </ | ||
+ | <WRAP column 45%> | ||
+ | |{{ Images_Cahier-101-06-174.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | <WRAP column 45%> | ||
+ | ☐ // | ||
+ | Si coché, seuls les clients des réseaux de confiance (vert) peuvent accéder au site Web de cet hôte virtuel. | ||
+ | |||
+ | ☐ // | ||
+ | {{Images_Cahier-101-03-005.png? | ||
+ | </ | ||
+ | <WRAP column 45%> | ||
+ | |{{ Images_Cahier-101-06-175.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | Si vous cochez cette option, le site Web n'est visible qu'à ceux qui fourniront le nom d' | ||
+ | |||
+ | <WRAP column 45%> | ||
+ | ☐ // | ||
+ | Si coché, le site Web est accessible uniquement via le protocole http__s__.\\ | ||
+ | {{Images_Cahier-101-03-008.png? | ||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | </ | ||
+ | <WRAP column 45%> | ||
+ | |{{ Images_Cahier-101-06-176.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | |||
+ | |||
+ | ☐ //**Root directory file listings**// | ||
+ | Si coché, permet au serveur de générer et d' | ||
+ | |||
+ | //**SSL/TLS certificate**// | ||
+ | Sélectionnez un certificat compatible avec les noms d' | ||
+ | |||
+ | <WRAP column 45%> | ||
+ | ☐ //**Enable FTP access**// | ||
+ | Pour un hôte virtuel qui hébergera un site WordPress, il n'est pas recommandé d' | ||
+ | |||
+ | === Actions supplémentaires === | ||
+ | ☐ //**Créer une entrée sous la page "DNS > Alias du serveur" | ||
+ | </ | ||
+ | <WRAP column 45%> | ||
+ | |{{ Images_Cahier-101-06-177.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | Si cette option est activée, un alias pour chacun des //Noms d' | ||
+ | {{Images_Cahier-101-03-005.png? | ||
+ | |||
+ | ==== Onglet Bibliothèque d' | ||
+ | |||
+ | <WRAP column 45%> | ||
+ | ☑ //**Activer l' | ||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | ▼ //**Select the php Version for this Ibay**// | ||
+ | Cette option permet de sélectionner la version PHP qu'on désire utiliser pour cet hôte virtuel. | ||
+ | |||
+ | ⦿ On choisit la version **PHP 72**. | ||
+ | </ | ||
+ | <WRAP column 45%> | ||
+ | |{{ Images_Cahier-101-06-178.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | ==== Onglet Paramètres php ==== | ||
+ | |||
+ | <WRAP column 45%> | ||
+ | Si vous avez besoin d' | ||
+ | |||
+ | ☑ //**Activer l' | ||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | ☐ // | ||
+ | {{Images_Cahier-101-03-008.png? | ||
+ | </ | ||
+ | <WRAP column 45%> | ||
+ | |{{ Images_Cahier-101-06-179.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | // | ||
+ | Cette variable définit la quantité maximale de mémoire en octets qu'un script est autorisé à allouer. // | ||
+ | |||
+ | //**Taille maximum autorisée des données envoyées (100 Mégaoctets)**// | ||
+ | Cette variable définit la taille maximale autorisée pour les publications //(post)//. Ce paramètre affecte également le téléchargement de fichiers. Pour télécharger des fichiers volumineux, cette valeur doit être supérieure à //< | ||
+ | |||
+ | //**Taille maximum du fichier télécharger (75 Mégaoctets)**// | ||
+ | Cette variable définit la taille maximale de téléchargement d'un fichier sur votre serveur. | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | //**Temps maximum d’exécution des scripts (défaut)**// | ||
+ | Cette variable définit la durée maximale, en secondes, pendant laquelle un script est autorisé à rouler avant d' | ||
+ | |||
+ | //**Nombre maximum de fichier téléversé (défaut)**// | ||
+ | Cette variable définit le nombre maximum de fichiers pouvant être téléchargés simultanément. | ||
+ | |||
+ | <wrap em> | ||
+ | |||
+ | <WRAP column 30%> | ||
+ | Notre hôte virtuel a été créé avec ses noms FQDN d' | ||
+ | </ | ||
+ | <WRAP column 60%> | ||
+ | |{{ Images_Cahier-101-06-180.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | Nous avons entré: | ||
+ | ● // | ||
+ | mais lors de l' | ||
+ | ● // | ||
+ | |||
+ | ===== Vérification ===== | ||
+ | |||
+ | <WRAP column 30%> | ||
+ | ==== Hôtes DNS ==== | ||
+ | |||
+ | **Configuration -> DNS -> onglet Hôtes**. | ||
+ | |||
+ | Les hôtes originaux DNS n'ont pas été affectés par la création d'un nouvel hôte virtuel. | ||
+ | </ | ||
+ | <WRAP column 60%> | ||
+ | |{{ Images_Cahier-101-06-181.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | === Alias du serveur === | ||
+ | |||
+ | __Si vous avez coché__ //Créer une entrée sous la page " | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | ==== Hôte de messagerie ==== | ||
+ | |||
+ | <WRAP column 30%> | ||
+ | < | ||
+ | |||
+ | < | ||
+ | </ | ||
+ | <WRAP column 60%> | ||
+ | |{{ Images_Cahier-101-06-182.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | ==== Répertoire racine du site Web du 2e domaine ==== | ||
+ | |||
+ | On vérifie la création du répertoire de l' | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# ls -als / | ||
+ | |||
+ | total 0 | ||
+ | 0 drwxr-sr-x 2 ftp apache | ||
+ | 0 drwxr-xr-x 3 root root 20 13 févr. 13:16 .. | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | Le répertoire existe, mais il est complètement vide. | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | ===== Propriétaire: | ||
+ | |||
+ | On change le // | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# chown apache: | ||
+ | |||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | On vérifie | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# ls -alsd / | ||
+ | |||
+ | 4 drwxr-sr-x 9 apache apache 4096 22 avril 14:35 / | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | \\ | ||
+ | |||
+ | ===== index.html ===== | ||
+ | |||
+ | On écrit un texte qui s' | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | < | ||
+ | cat > / | ||
+ | < | ||
+ | < | ||
+ | <meta content=" | ||
+ | http-equiv=" | ||
+ | < | ||
+ | </ | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | </ | ||
+ | EOT | ||
+ | |||
+ | </ | ||
+ | |||
+ | On ajuste le propriétaire et le groupe. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# chown apache: | ||
+ | |||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | On vérifie. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# ls -ls / | ||
+ | |||
+ | 4 -rw-r--r-- 1 apache apache 170 13 févr. 18:46 / | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | On affiche le contenu. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# cat / | ||
+ | |||
+ | < | ||
+ | < | ||
+ | <meta content=" | ||
+ | http-equiv=" | ||
+ | < | ||
+ | </ | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | </ | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | ==== Accès Web ==== | ||
+ | |||
+ | On vérifie l' | ||
+ | |||
+ | <WRAP center> | ||
+ | <WRAP column 45%> | ||
+ | < | ||
+ | < | ||
+ | |{{ Images_Cahier-101-06-184.png? | ||
+ | </ | ||
+ | <WRAP column 45%> | ||
+ | < | ||
+ | < | ||
+ | |{{ Images_Cahier-101-06-185.png? | ||
+ | </ | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | <WRAP center> | ||
+ | <WRAP column 45%> | ||
+ | < | ||
+ | < | ||
+ | |{{ Images_Cahier-101-06-186.png? | ||
+ | </ | ||
+ | <WRAP column 45%> | ||
+ | < | ||
+ | < | ||
+ | |{{ Images_Cahier-101-06-187.png? | ||
+ | </ | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | ==== Suppression du fichier index.html ==== | ||
+ | |||
+ | On supprime le fichier '' | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# rm / | ||
+ | |||
+ | rm : supprimer fichier « / | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | \\ | ||
+ | |||
+ | ===== Second WordPress ===== | ||
+ | |||
+ | On peut installer un nouveau WordPress dans le répertoire ''/ | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | < | ||
+ | ############################################### | ||
+ | |||
+ | # Michel-André, | ||
+ | # | ||
+ | # Référence: | ||
+ | # Ajout de code afin de pouvoir localiser le répertoire de contenu | ||
+ | # | ||
+ | if(is_admin()){ | ||
+ | | ||
+ | | ||
+ | } | ||
+ | ############################################### | ||
+ | </ | ||
+ | |||
+ | <WRAP column 45%> | ||
+ | Après l' | ||
+ | </ | ||
+ | <WRAP column 45%> | ||
+ | |{{ Images_Cahier-101-06-188.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | ==== Connexion ==== | ||
+ | |||
+ | On se rend à //< | ||
+ | {{Images_Cahier-101-03-005.png? | ||
+ | |||
+ | <WRAP center> | ||
+ | <WRAP column 45%> | ||
+ | |{{ Images_Cahier-101-06-189.png? | ||
+ | </ | ||
+ | <WRAP column 45%> | ||
+ | |{{ Images_Cahier-101-06-190.png? | ||
+ | </ | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | <WRAP column 30%> | ||
+ | On peut accéder au //Tableau de bord//. | ||
+ | </ | ||
+ | <WRAP column 60%> | ||
+ | |{{ Images_Cahier-101-06-191.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | Victoire, notre deuxième site WordPress est accessible. | ||
+ | |||
+ | <WRAP centeralign> | ||
+ | \\ | ||
+ | |||
+ | ===== Webmail ===== | ||
+ | |||
+ | ==== Courriel de test ==== | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | ==== Suppression de l' | ||
+ | |||
+ | <WRAP center> | ||
+ | <WRAP column 45%> | ||
+ | Si on se connecte à Webmail sur notre second domaine, le nom FQDN de celui-ci n'est pas affiché dans le champ Serveur car c'est le domaine primaire qui est toujours affiché, peu importe à quel domaine ou sous-domaine on se connecte à // | ||
+ | |||
+ | Même si on déroule ce champ, le FQDN du second domaine n'est pas présent. | ||
+ | {{ Images_Cahier-101-06-192.png? | ||
+ | |||
+ | Il est donc préférable de ne pas afficher ce champ lors d'une connexion à Webmail. | ||
+ | </ | ||
+ | <WRAP column 45%> | ||
+ | |{{ Images_Cahier-101-06-193.png? | ||
+ | </ | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | {{Images_Cahier-101-03-003.png? | ||
+ | |||
+ | ==== Connexion ==== | ||
+ | |||
+ | <WRAP column 45%> | ||
+ | {{Images_Cahier-101-03-004.png? | ||
+ | |||
+ | ● On utilise l'URL suivante pour accéder à Webmail: | ||
+ | |||
+ | **<WRAP centeralign> | ||
+ | http__s__:< | ||
+ | </ | ||
+ | |||
+ | mais, vu que notre certificat TLS de // | ||
+ | |||
+ | ● L' | ||
+ | </ | ||
+ | <WRAP column 45%> | ||
+ | |{{ Images_Cahier-101-06-194.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | <WRAP column 45%> | ||
+ | {{Images_Cahier-101-03-005.png? | ||
+ | </ | ||
+ | <WRAP column 45%> | ||
+ | |{{ Images_Cahier-101-06-195.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | S'il n'y a eu aucune erreur lors de création des entités de l' | ||
+ | |||
+ | <WRAP column 30%> | ||
+ | Même si //admin// s'est connecté à Webmail en utilisant **https: | ||
+ | |||
+ | Nous règlerons cet affichage pour l' | ||
+ | </ | ||
+ | <WRAP column 60%> | ||
+ | |{{ Images_Cahier-101-06-196.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | <WRAP column 30%> | ||
+ | **Rédiger** pour écrire un nouveau message. | ||
+ | |||
+ | On rédige un message pour l' | ||
+ | </ | ||
+ | <WRAP column 60%> | ||
+ | |{{ Images_Cahier-101-06-197.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | <WRAP center> | ||
+ | <WRAP column 45%> | ||
+ | Dans le répertoire **Envoyés**, | ||
+ | |{{ Images_Cahier-101-06-198.png? | ||
+ | </ | ||
+ | <WRAP column 45%> | ||
+ | **Déconnexion**. | ||
+ | |{{ Images_Cahier-101-06-199.png? | ||
+ | </ | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | <WRAP column 45%> | ||
+ | L' | ||
+ | </ | ||
+ | <WRAP column 45%> | ||
+ | |{{ Images_Cahier-101-06-200.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | <WRAP column 30%> | ||
+ | Le courriel d'// | ||
+ | |||
+ | On double-clique l' | ||
+ | </ | ||
+ | <WRAP column 60%> | ||
+ | |{{ Images_Cahier-101-06-201.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | <WRAP column 30%> | ||
+ | Le message reçu de l' | ||
+ | </ | ||
+ | <WRAP column 60%> | ||
+ | |{{ Images_Cahier-101-06-202.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | <WRAP column 30%> | ||
+ | On clique l' | ||
+ | </ | ||
+ | <WRAP column 60%> | ||
+ | |{{ Images_Cahier-101-06-203.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | ==== DKIM ==== | ||
+ | |||
+ | La source du message s' | ||
+ | |||
+ | < | ||
+ | Return-Path: | ||
+ | Delivered-To: | ||
+ | Received: from tchana.micronator-dev.org | ||
+ | by tchana.micronator-dev.org with LMTP id kHVaNhi2dlwHKQAAO2z7Cw | ||
+ | for < | ||
+ | Received: from mail.www.micronator-dev.net (localhost [127.0.0.1]) | ||
+ | (Authenticated sender: admin) | ||
+ | by tchana.micronator-dev.org (Postfix) with ESMTPA id A92551107618 | ||
+ | for < | ||
+ | DKIM-Filter: | ||
+ | DKIM-Signature: | ||
+ | s=default; t=1551283736; | ||
+ | bh=6F8BxMLsRJnyYGhcakC0EJCkqs1O1BbegyqIJAXX4QU=; | ||
+ | h=Date: | ||
+ | b=0FwtvsSCpObAZZ++/ | ||
+ | Jay6FZisM16jhZNlCCLxVy9gTtmoIXMYheDXLCHjAKvKjtJVHXHB608Kbk7Oe+E4LN | ||
+ | PkvOmwKxi3gsgFW2qvkS2RKUUIit/ | ||
+ | R6SWTBBMSKxGGhn0+F09ZEYQYpsAFFxTPrDCTx0Q/ | ||
+ | RJQmzTYFaF+uIKTmRH2V/ | ||
+ | zd6vDfhFhXn8Q== | ||
+ | MIME-Version: | ||
+ | Content-Type: | ||
+ | | ||
+ | Content-Transfer-Encoding: | ||
+ | Date: Wed, 27 Feb 2019 11:08:56 -0500 | ||
+ | From: admin < | ||
+ | To: =? | ||
+ | Subject: Test de courriel de micronator-dev.net | ||
+ | Message-ID: < | ||
+ | X-Sender: admin@micronator-dev.org | ||
+ | User-Agent: Roundcube Webmail/ | ||
+ | |||
+ | Allo le monde de micronator-dev.net! | ||
+ | |||
+ | admin | ||
+ | </ | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | ==== Alias de messagerie ==== | ||
+ | |||
+ | <WRAP column 45%> | ||
+ | Tout comme l' | ||
+ | |||
+ | Nous allons remédié à la situation en créant un alias de messagerie pour l' | ||
+ | </ | ||
+ | <WRAP column 45%> | ||
+ | |{{ Images_Cahier-101-06-204.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | <WRAP column 30%> | ||
+ | **Gestion -> Adresse mail ->** onglet | ||
+ | </ | ||
+ | <WRAP column 60%> | ||
+ | |{{ Images_Cahier-101-06-205.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | <WRAP column 45%> | ||
+ | Un alias est utilisé pour créer une association entre: une nouvelle adresse courriel et des utilisateurs, | ||
+ | |||
+ | //**Adresse email**// | ||
+ | Spécifiez dans le champ de texte uniquement la partie précédant le caractère **@**.\\ | ||
+ | Choisissez ensuite dans le menu déroulant si l' | ||
+ | |||
+ | // | ||
+ | Une note pour décrire l' | ||
+ | |||
+ | // | ||
+ | Sélectionnez les utilisateurs et les boîtes aux lettres partagées à associer à l' | ||
+ | Un groupe est automatiquement étendu à la liste des membres actuels. | ||
+ | </ | ||
+ | <WRAP column 45%> | ||
+ | |{{ Images_Cahier-101-06-206.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | // | ||
+ | Liste d' | ||
+ | |||
+ | //**Réseau local seulement**// | ||
+ | L' | ||
+ | |||
+ | On entre les informations demandées puis, **SOUMETTRE**. | ||
+ | |||
+ | <WRAP column 30%> | ||
+ | Le nouvel alias a été créé pour l' | ||
+ | </ | ||
+ | <WRAP column 60%> | ||
+ | |{{ Images_Cahier-101-06-207.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | === Suppression === | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | <WRAP column 30%> | ||
+ | ==== Création d'une nouvelle identité ==== | ||
+ | |||
+ | Si l' | ||
+ | |||
+ | **Paramètres -> Identités -> + ->** on entre les informations demandées; surtout // | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | **Enregistrer**. | ||
+ | |||
+ | </ | ||
+ | <WRAP column 60%> | ||
+ | |{{ Images_Cahier-101-06-208.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | <WRAP column 30%> | ||
+ | ==== Création d'un nouveau courriel ==== | ||
+ | |||
+ | Au retour à la //Boîte de réception//, | ||
+ | |||
+ | L' | ||
+ | |||
+ | **Envoyer**. | ||
+ | </ | ||
+ | <WRAP column 60%> | ||
+ | |{{ Images_Cahier-101-06-209.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | <WRAP column 30%> | ||
+ | ==== Vérification ==== | ||
+ | |||
+ | L' | ||
+ | |||
+ | On voit que l' | ||
+ | </ | ||
+ | <WRAP column 60%> | ||
+ | |{{ Images_Cahier-101-06-210.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | <WRAP center> | ||
+ | <WRAP column 45%> | ||
+ | \\ | ||
+ | Si on survole le champ //**De**// avec la souris, l' | ||
+ | |{{ Images_Cahier-101-06-211.png? | ||
+ | </ | ||
+ | <WRAP column 45%> | ||
+ | Si on survole l' | ||
+ | |{{ Images_Cahier-101-06-212.png? | ||
+ | </ | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | <WRAP column 30%> | ||
+ | **Carnet d' | ||
+ | |||
+ | C'est bien l' | ||
+ | |||
+ | {{Images_Cahier-101-03-004.png? | ||
+ | </ | ||
+ | <WRAP column 60%> | ||
+ | |{{ Images_Cahier-101-06-213.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | <WRAP column 30%> | ||
+ | C'est bien l' | ||
+ | </ | ||
+ | <WRAP column 60%> | ||
+ | |{{ Images_Cahier-101-06-214.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | ===== Propriétaire, | ||
+ | |||
+ | Pour plus de sécurité, il est préférable d' | ||
+ | |||
+ | ==== Site principal ==== | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# cd / | ||
+ | |||
+ | [root@tchana html]# | ||
+ | </ | ||
+ | |||
+ | === Ajustement du propriétaire et du groupe === | ||
+ | |||
+ | < | ||
+ | [root@tchana html]# chown -R apache: | ||
+ | |||
+ | [root@tchana html]# | ||
+ | </ | ||
+ | |||
+ | === Ajustement des droits === | ||
+ | |||
+ | On renforce la sécurité de l’accès aux fichiers //( <wrap em> | ||
+ | |||
+ | < | ||
+ | [root@tchana html]# find . -type f -exec chmod 2640 {} \; | ||
+ | |||
+ | [root@tchana html]# | ||
+ | </ | ||
+ | |||
+ | On répète l' | ||
+ | |||
+ | < | ||
+ | [root@tchana html]# find . -type d -exec chmod 2750 {} \; | ||
+ | |||
+ | [root@tchana html]# | ||
+ | </ | ||
+ | |||
+ | On vérifie. | ||
+ | |||
+ | < | ||
+ | [root@tchana html]# ls -als | ||
+ | |||
+ | total 212 | ||
+ | 4 drwxr-s---. | ||
+ | 0 drwxr-xr-x. | ||
+ | 4 -rw-r-S--- | ||
+ | 4 -rw-r-S--- | ||
+ | 20 -rw-r-S--- | ||
+ | 12 -rw-r-S--- | ||
+ | 0 drwxr-s--- | ||
+ | ... | ||
+ | [root@tchana html]# | ||
+ | </ | ||
+ | |||
+ | ==== Hôte virtuel devnet ==== | ||
+ | |||
+ | < | ||
+ | [root@tchana html]# cd / | ||
+ | |||
+ | [root@tchana devnet]# | ||
+ | </ | ||
+ | |||
+ | === Ajustement du propriétaire et du groupe === | ||
+ | |||
+ | < | ||
+ | [root@tchana devnet]# chown -R apache: | ||
+ | |||
+ | [root@tchana devnet]# | ||
+ | </ | ||
+ | |||
+ | === Ajustement des droits === | ||
+ | |||
+ | On renforce la sécurité de l’accès aux fichiers ( f ) en supprimant les droits à " | ||
+ | |||
+ | < | ||
+ | [root@tchana devnet]# find . -type f -exec chmod 2640 {} \; | ||
+ | |||
+ | [root@tchana devnet]# | ||
+ | </ | ||
+ | |||
+ | On répète l' | ||
+ | |||
+ | < | ||
+ | [root@tchana devnet]# find . -type d -exec chmod 2750 {} \; | ||
+ | |||
+ | [root@tchana devnet]# | ||
+ | </ | ||
+ | |||
+ | On vérifie. | ||
+ | |||
+ | < | ||
+ | [root@tchana devnet]# ls -als | ||
+ | |||
+ | total 212 | ||
+ | 4 drwxr-s--- | ||
+ | 0 drwxr-xr-x | ||
+ | 4 -rw-r--r-- | ||
+ | 4 -rw-r-S--- | ||
+ | 20 -rw-r-S--- | ||
+ | 12 -rw-r-S--- | ||
+ | 8 -rw-r-S--- | ||
+ | 4 drwxr-s--- | ||
+ | ... | ||
+ | [root@tchana devnet]# | ||
+ | </ | ||
+ | |||
+ | <WRAP centeralign> | ||
+ | |||
+ | ===== Serveur de production ===== | ||
+ | |||
+ | Maintenant que nous maîtrisons WordPress et les hôtes virtuels, on peut refaire les mêmes procédures sur le serveur physique de Production.\\ | ||
+ | {{Images_Cahier-101-03-005.png? | ||
+ | \\ | ||
+ | \\ | ||
+ | {{NS-101_002_Banniere_Victoire.png? | ||
+ | \\ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ===== Crédits ===== | ||
+ | |||
+ | © 2015-2016-2017-2018-2019 | ||
+ | Auteur: Michel-André 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.2|2016-01-07|Ajouté bit GID, élaboration de la mise à jour et nouvelle mise en page.|Michel-André| | ||
+ | |0.0.3|2016-01-08|Chapitre pour l' | ||
+ | |0.0.4|2016-01-09|- Dans Sécurité, ajustement pour " | ||
+ | |0.0.5|2016-03-23|Correction de index.htm pour index.html dans le répertoire ...Primary/ | ||
+ | |0.0.6|2016-03-26|Mise à jour.|Michel-André| | ||
+ | |0.0.7|2016-03-27|- Changement de l' | ||
+ | |0.0.8|2016-04-04|Droit d' | ||
+ | |0.0.9|2016-04-21|Droit d' | ||
+ | |0.1.0|2016-05-20|- Correction des paramètres de l' | ||
+ | |0.2.0|2016-08-18|- Ajustement de scripts pour WordPress version-4.6\\ - Ajustement pour XCloner.|Michel-André| | ||
+ | |0.2.1|2016-08-20|- Inverser l' | ||
+ | |1.0.0|2016-12-13|- Mise à jour pour WordPress 4.6.1 vers 4.7.\\ - Mise à jour pour les paramètres de php.ini avec des gabarits personnalisés.\\ - Ajout de la page man de l' | ||
+ | |2.0.0|2017-02-22|- Mise à jour pour WordPress 4.6.1 vers 4.7.3.\\ - Mise à jour pour cours Micronator-101.|Michel-André| | ||
+ | |2.0.1|2017-04-09|- Modifications majeures pour les ajustements des paramètres PHP.|Michel-André| | ||
+ | |2.0.2|2017-04-10|- Corrections orthographiques.|Michel-André| | ||
+ | |2.1.0|2017-05-27|- Modifications pour l' | ||
+ | |2.1.1|2017-07-12|Ajustement de la commande de SCL-PHP si aucune MAJ n'est disponible.|Michel-André| | ||
+ | |3.0.0|2018-10-06|- Utilisation des Collections PHP70 et MySQL57.\\ - Mise à jour pour la version WordPress-4.9.8.\\ - Bogue dans le pied de page, il manquait les balises PHP sur la première ligne de l' | ||
+ | |4.0.0|2019-01-23|Adaptation pour NethServer-7.6.1810.|Michel-André| | ||
+ | |4.0.1|2019-04-20|- Il faut activer le référentiel stephdl lors de l' | ||
+ | |4.0.2 RC-001|2019-06-21|Corrections mineures.|Michel-André| | ||
+ | |4.1.0 RC-001|2019-07-20|Corrections mineures et ajustements pour DokuWiki.|Michel-André| | ||
+ | |4.1.1 RC-002|2019-08-19|Suppression du " | ||
+ | |12345678901| | |12345678901| | ||
+ | |||
+ | |||
+ | < | ||
+ | |||
+ | ===== AVIS DE NON-RESPONSABILITÉ ===== | ||
+ | |||
+ | Ce document est uniquement destiné à informer. Les informations, | ||
+ | |||
+ | RF‑232 ne peut être tenu pour responsable de dommages de quelque nature que ce soit, y compris des dommages directs ou indirects, ainsi que des dommages consécutifs résultant de l' | ||
+ | |||
+ | Chaque internaute doit prendre toutes les mesures appropriées //(mettre à jour régulièrement son logiciel antivirus, ne pas ouvrir des documents suspects de source douteuse ou non connue)// de façon à protéger le contenu de son ordinateur de la contamination d' | ||
+ | |||
+ | Toute reproduction interdite | ||
+ | Vous reconnaissez et acceptez que tout le contenu de ce document, incluant mais sans s’y limiter, le texte et les images, sont protégés par le droit d’auteur, les marques de commerce, les marques de service, les brevets, les secrets industriels et les autres droits de propriété intellectuelle. Sauf autorisation expresse de RF-232, vous acceptez de ne pas vendre, délivrer une licence, louer, modifier, distribuer, copier, reproduire, transmettre, | ||
+ | |||
+ | ==== Avertissement==== | ||
+ | |||
+ | Bien que nous utilisions ici un vocabulaire issu des techniques informatiques, | ||
+ | \\ | ||
+ | \\ |