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 | ||
elearning:workbooks:redhat:rh134:l107 [2024/10/24 03:49] – admin | elearning:workbooks:redhat:rh134:l107 [2024/11/21 15:28] (Version actuelle) – admin | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
~~PDF: | ~~PDF: | ||
- | |||
- | Version : **2022.02** | ||
Dernière mise-à-jour : ~~LASTMOD~~ | Dernière mise-à-jour : ~~LASTMOD~~ | ||
- | ======RH13408 - Installation de Machines Virtuelles====== | + | ======RH13408 - Gestion du Stockage en Réseau====== |
=====Contenu du Module===== | =====Contenu du Module===== | ||
- | * **RH13408 - Installation de Machines Virtuelles** | + | * **RH13408 - Gestion du Stockage en Réseau** |
* Contenu du Module | * Contenu du Module | ||
- | * LAB #1 - Installation d'une Machine Virtuelle CentOS 8 | + | * Présentation du Network File System (NFS) |
- | * 1.1 - Identification | + | * NFSv3 |
- | * 1.2 - Configuration du Stockage des ISOs | + | * Les Services et Processus Principaux |
- | * 1.3 - Installation du Domaine | + | * Options d'un Partage NFSv3 |
- | * Format des Images | + | * Commandes de Base de NFSv3 |
- | * Convertir le Format | + | * NFSv4 |
- | * 1.4 - Configuration de l'Installation de l'OS Invité | + | * Différences entre NFSv4 et NFSv3 |
- | * Language Settings | + | * LAB #1 - Configuration du Serveur NFSv4 |
- | * Network configuration | + | * 1.1 - Désactivation |
- | * Time settings | + | * 1.2 - Définition d'un Partage |
- | * Root password | + | * LAB #2 - Configuration du Client |
- | * Installation source | + | * 2.1 - Montage Éphémère |
- | * Software selection | + | * 2.2 - Montage Persistant |
- | * Installation Destination | + | * LAB #3 - Configuration de NFSv4 avec Automounter |
- | * Démarrer l' | + | * Présentation |
- | * Démarrer la VM | + | * Le Service autofs |
- | * 1.5 - Vérification | + | * 3.1 - Création d'un Fichier de Mappage Indirect |
- | * Réseau | + | * Configuration du Serveur |
- | * Internet | + | * Configuration du Client |
+ | * 3.2 - Création d'un Fichier | ||
+ | * Configuration du Serveur | ||
+ | * Configuration du Client | ||
- | =====LAB #1 - Installation d'une Machine Virtuelle CentOS 8===== | + | =====Présentation du Network File System (NFS)===== |
- | ====1.1 - Identification | + | Le Network File System (NFS) est un protocole Internet standard que Linux, UNIX et d' |
+ | les permissions Linux natives et les attributs | ||
- | KVM sait virtualiser un grand nombre | + | Par défaut, Red Hat 9 utilise la version 4.2 de NFS. RHEL prend entièrement en charge les protocoles NFSv3 et NFSv4. NFSv3 peut utiliser un protocole de transport TCP ou UDP, mais NFSv4 n'autorise que les connexions TCP. |
- | < | + | Les serveurs NFS exportent des répertoires. Les clients NFS montent les répertoires exportés dans un répertoire local existant. Les clients NFS peuvent monter les répertoires exportés de plusieurs manières |
- | [root@centos8 ~]# osinfo-query os | more | + | |
- | Short ID | Name | Version | + | |
- | ----------------------+----------------------------------------------------+----------+----------------------------------------- | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | --More-- | + | |
- | </ | + | |
- | La liste des versions de Red Hat peut être consultée | + | * Manuellement |
+ | | ||
+ | | ||
- | < | + | Les méthodes d' |
- | [root@centos8 ~]# osinfo-query os | grep "Red Hat" | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | </ | + | |
- | Afin d' | + | * le service autofs, |
+ | | ||
- | * Colonne 2, | + | Il convient d' |
- | | + | |
- | * Le nom officiel du système | + | Red Hat 9 prend également en charge le montage de répertoires partagés à partir de systèmes Microsoft Windows(R) en utilisant les mêmes méthodes que pour le protocole NFS, en utilisant les protocoles |
- | * Colonne 3, | + | **Common Internet File System** (CIFS). Les options |
- | * **Version**, | + | |
- | * La version du système d' | + | ====NFSv3==== |
- | | + | |
- | | + | Le protocole NFS a changé de manière significative entre NFSv3 et NFSv4. La méthode d' |
- | * Un URL censé pointer vers la page officielle | + | |
- | + | ===Les Services et Processus Principaux du Serveur NFSv3=== | |
- | Pour rechercher | + | |
- | + | La version NFSv3 utilise les services suivants | |
- | < | + | |
- | [root@centos8 ~]# osinfo-query os | grep centos | + | ^ Services ^ Fonction ^ |
- | centos-stream8 | + | | **nfsd** |
- | centos5.0 | + | | **nfslock** |
- | centos5.1 | + | | **portmap** |
- | centos5.10 | + | |
- | centos5.11 | + | ===Options d'un Partage NFSv3=== |
- | centos5.2 | + | |
- | centos5.3 | + | Certaines options, appliquées à un partage, modifient le comportement du serveur NFSv3 pour le partage concerné lors de son démarrage |
- | centos5.4 | + | |
- | centos5.5 | + | ^ Option ^ Comportement ^ |
- | centos5.6 | + | | **ro** |
- | centos5.7 | + | | **rw** |
- | centos5.8 | + | | **sync** |
- | centos5.9 | + | | **async** |
- | centos6.0 | + | | **root_squash** |
- | | + | | **no_root_squash** |
- | centos6.10 | + | | **no_lock** |
- | centos6.2 | + | | **all_squash** |
- | centos6.3 | + | | **anonuid** |
- | centos6.4 | + | | **anongid** |
- | centos6.5 | + | |
- | centos6.6 | + | |
- | centos6.7 | + | |
- | centos6.8 | + | |
- | | + | |
- | | + | |
- | | + | |
- | </ | + | |
<WRAP center round important> | <WRAP center round important> | ||
- | **Important** : Notez que le Short ID de CentOS 8 est actuellement **centos8** quelque soit la version. | + | **Important** : Si plusieurs options sont spécifiées, |
</ | </ | ||
- | ====1.2 - Configuration du Stockage des ISOs==== | + | ===Commandes de Base de NFSv3=== |
- | Afin d' | + | Plusieurs commandes permettent |
- | < | + | ^ Commande ^ Comportement ^ |
- | [root@centos8 ~]# ls -l | grep CentOS | + | | **exportfs** | Affiche les partages actifs sur le serveur courant | |
- | -rw-r--r--. 1 root root 625999872 Sep 3 04:44 CentOS-8.1.1911-x86_64-boot.iso | + | | **nfsstat** | Affiche les statistiques de l' |
+ | | **rpcinfo** | Affiche les démons gérés en effectuant une requête RPC sur le serveur courant | | ||
+ | | **showmount** | Affiche les partages actifs sur un serveur distant | | ||
+ | | **mount** | Permet de monter un partage distant sur un répertoire local | | ||
- | [root@centos8 ~]# chmod 755 CentOS-8.1.1911-x86_64-boot.iso | + | ====NFSv4==== |
- | [root@centos8 ~]# mkdir /isos | + | ===Différences entre NFSv4 et NFSv3==== |
- | [root@centos8 ~]# mv CentOS-8.1.1911-x86_64-boot.iso /isos | + | Le protocole NFSv4 a éliminé l' |
- | [root@centos8 ~]# chown -R qemu: | + | NFSv4 a introduit une arborescence d' |
- | </ | + | |
- | ====1.3 - Installation du Domain==== | + | Le format de cette commande est le suivant : |
- | Démarrez maintenant l' | ||
- | | ||
< | < | ||
- | [root@centos8 ~]# virt-install --network bridge: | + | # mkdir /mountpoint |
- | Starting install... | + | # mount -t nfs -o rw,sync server:/export /mountpoint |
- | Retrieving file vmlinuz... | + | |
- | Retrieving file initrd.img... | + | |
- | Allocating ' | + | |
- | WARNING | + | |
- | Connected to domain testvm1 | + | |
- | Escape character is ^] | + | |
- | [ 0.000000] Linux version 4.18.0-147.el8.x86_64 (mockbuild@kbuilder.bsys.centos.org) (gcc version 8.3.1 20190507 (Red Hat 8.3.1-4) (GCC)) #1 SMP Wed Dec 4 21:51:45 UTC 2019 | + | |
- | ... | + | |
</ | </ | ||
- | <WRAP center round important> | + | <WRAP center round important |
- | **Important** : Notez que la quantité de mémoire est automatiquement et provisoirement augmentée à 3072 Mo afin que l'installation se déroule correctement. Notez aussi l' | + | **Important** : L'option |
</ | </ | ||
- | Dans cette commande on peut constater | + | Pour monter une exportation NFSv4 tout en parcourant |
- | ^ Option ^ Commentaire ^ | + | A noter que, les répertoires exportés qui utilisent |
- | | --network bridge: | Fixe la valeur du pont à utiliser par la VM à virbr0 | | + | |
- | | --name | + | |
- | | --os-variant= | Egal à la valeur du Short ID identifié au-dessus | + | |
- | | --ram= | Fixe la quantité | + | |
- | | --vcpus= | Fixe le nombre de vCPUs de la VM | | + | |
- | | --disk path= | Crée une image pour la VM, au format indiqué | + | |
- | | --graphics | La valeur **none** indique que l'installation aura lieu en mode texte. Notez que dans le cas d'une VM Windows(tm), la valeur doit être **spice** | | + | |
- | | --location= | Indique l' | + | |
- | | --extra-args= | Indique les options de la connectivité de la console | | + | |
- | ===Format des Images=== | + | =====LAB #1 - Configuration du Serveur NFSv4===== |
- | Une image est un disque virtuel. KVM reconnait les formats d'image suivants | + | Vérifiez l'état des machines virtuelles |
< | < | ||
- | [root@centos8 | + | [root@redhat9 |
- | Supported formats: blkdebug blklogwrites blkreplay blkverify copy-on-read file ftp ftps gluster host_cdrom host_device http https iscsi iser luks nbd null-aio null-co nvme qcow2 quorum raw rbd ssh throttle vhdx vmdk vpc | + | |
+ | ------------------------- | ||
+ | | ||
+ | | ||
</ | </ | ||
- | <WRAP center round important> | + | Connectez-vous à machine virtuelle |
- | **Important** : Consultez | + | |
- | </ | + | |
- | ===Convertir le Format de l' | + | < |
+ | [root@redhat9 ~]# virsh console testvm2 | ||
+ | Connected to domain ' | ||
+ | Escape character is ^] (Ctrl + ]) | ||
+ | [Enter] | ||
+ | [root@testvm2 ~]# systemctl enable --now nfs-server | ||
+ | Created symlink / | ||
+ | [root@testvm2 ~]# systemctl status nfs-server | ||
+ | ● nfs-server.service - NFS server and services | ||
+ | | ||
+ | | ||
+ | Docs: man: | ||
+ | | ||
+ | Process: 5309 ExecStartPre=/ | ||
+ | Process: 5310 ExecStart=/ | ||
+ | Process: 5329 ExecStart=/bin/sh -c if systemctl -q is-active gssproxy; then> | ||
+ | Main PID: 5329 (code=exited, status=0/ | ||
+ | CPU: 31ms | ||
- | Il est possible de convertir un format d' | + | Oct 28 12:08:12 testvm2.ittraining.loc systemd[1]: Starting NFS server and serv> |
+ | Oct 28 12:08:12 testvm2.ittraining.loc systemd[1]: Finished NFS server and serv> | ||
+ | </ | ||
- | < | + | ====1.1 |
- | # qemu-img convert -f vmdk -O qcow2 myimage.vmdk mynewimage.qcow2 | + | |
- | </ | + | |
- | Dans le cas d'une image au format **vdi** d' | + | Le serveur NFS fonctionne en mode mixte NFSv3/ |
- | <file> | + | <code> |
- | # VBoxManage clonehd myimage.vdi myrawimage.img --format raw | + | [root@testvm2 ~]# nfsstat |
- | </file> | + | Server rpc stats: |
+ | calls badcalls | ||
+ | 0 0 0 0 0 | ||
+ | </code> | ||
- | Ensuite il convient d' | + | Pour désactiver le serveur NFSv3, éditez |
- | <file> | + | <code> |
- | # qemu-img convert | + | [root@testvm2 ~]# cat / |
- | </file> | + | ... |
+ | [nfsd] | ||
+ | # debug=0 | ||
+ | # threads=8 | ||
+ | # host= | ||
+ | # port=0 | ||
+ | # grace-time=90 | ||
+ | # lease-time=90 | ||
+ | # udp=n | ||
+ | # tcp=y | ||
+ | # vers3=y | ||
+ | # vers4=y | ||
+ | # vers4.0=y | ||
+ | # vers4.1=y | ||
+ | # vers4.2=y | ||
+ | rdma=y | ||
+ | rdma-port=20049 | ||
+ | ... | ||
+ | </code> | ||
- | ====1.4 - Configuration de l' | + | < |
+ | [root@testvm2 ~]# vi / | ||
+ | [root@testvm2 ~]# cat / | ||
+ | ... | ||
+ | [nfsd] | ||
+ | # debug=0 | ||
+ | # threads=8 | ||
+ | # host= | ||
+ | # port=0 | ||
+ | # grace-time=90 | ||
+ | # lease-time=90 | ||
+ | # udp=n | ||
+ | # tcp=y | ||
+ | vers3=n | ||
+ | # vers4=y | ||
+ | # vers4.0=y | ||
+ | # vers4.1=y | ||
+ | vers4.2=y | ||
+ | rdma=y | ||
+ | rdma-port=20049 | ||
+ | ... | ||
+ | </ | ||
- | ===Language Settings=== | + | Désactivez tous les services NFSv3 : |
- | + | ||
- | Commencez par appuyer sur le choix **1** : | + | |
< | < | ||
- | ... | + | [root@testvm2 ~]# systemctl mask --now rpc-statd.service rpcbind.service rpcbind.socket |
- | Starting installer, one moment... | + | Created symlink / |
- | anaconda 29.19.1.13-1.el8 for CentOS Linux 8 started. | + | Created symlink / |
- | * installation log files are stored in /tmp during the installation | + | Created symlink |
- | * shell is available on TTY2 | + | </ |
- | * if the graphical installation interface fails to start, try again with the | + | |
- | inst.text bootoption to start text installation | + | |
- | * when reporting a bug add logs from /tmp as separate text/plain attachments | + | |
- | 14:08:33 Not asking for VNC because we don't have a network | + | |
- | ================================================================================ | + | |
- | ================================================================================ | + | |
- | Installation | + | |
- | 1) [x] Language settings | + | Redémarrez le service **nfs-server** : |
- | | + | |
- | 3) [!] Installation source | + | |
- | | + | |
- | 5) [!] Installation Destination | + | |
- | (No disks selected) | + | |
- | 7) [!] Network configuration | + | |
- | (Not connected) | + | |
- | 9) [!] User creation | + | |
- | (No user will be created) | + | |
- | Please make a selection from the above [' | + | < |
- | ' | + | [root@testvm2 ~]# systemctl restart nfs-server |
- | ================================================================================ | + | </ |
- | ================================================================================ | + | |
- | 3) Arabic | + | Vérifiez la désactivation de NFSv3 en consultant le fichier **/ |
- | 4) Assamese | + | |
- | 5) Asturian | + | |
- | 6) Belarusian | + | |
- | 7) Bulgarian | + | |
- | 8) Bangla | + | |
- | 9) Tibetan | + | |
- | 10) Bosnian | + | |
- | 11) Catalan | + | |
- | 12) Czech 38) Georgian | + | |
- | 13) Welsh 39) Kazakh | + | |
- | 14) Danish | + | |
- | 15) German | + | |
- | 16) Greek 42) Korean | + | |
- | 17) English | + | |
- | 18) Spanish | + | |
- | 19) Estonian | + | |
- | 20) Basque | + | |
- | 21) Persian | + | |
- | 22) Finnish | + | |
- | 23) Filipino | + | |
- | 24) French | + | |
- | 25) Friulian | + | |
- | Press ENTER to continue: | + | < |
- | 26) Irish 52) Low German | + | [root@testvm2 ~]# cat / |
+ | -3 +4 +4.1 +4.2 | ||
</ | </ | ||
- | Choisissez l' | + | Créez ensuite le fichier |
< | < | ||
- | Please select language support to install | + | [root@testvm2 ~]# mkdir / |
- | to continue, ' | + | |
- | ================================================================================ | + | |
- | ================================================================================ | + | |
- | Language settings | + | |
- | Available locales | + | [root@testvm2 ~]# vi / |
- | 1) French (France) | + | |
- | 2) French (Canada) | + | [root@testvm2 ~]# cat / |
+ | [Service] | ||
+ | ExecStart= | ||
+ | ExecStart=/ | ||
+ | </ | ||
+ | |||
+ | Rechargez le service **nfs-mountd** : | ||
+ | |||
+ | < | ||
+ | [root@testvm2 ~]# systemctl daemon-reload | ||
- | Please select language support to install | + | [root@testvm2 ~]# systemctl restart nfs-mountd |
- | to continue, ' | + | |
- | ================================================================================ | + | |
- | ================================================================================ | + | |
- | Installation | + | |
- | 1) [x] Language settings | + | [root@testvm2 ~]# systemctl status nfs-mountd |
- | | + | ● nfs-mountd.service - NFS Mount Daemon |
- | 3) [!] Installation source | + | |
- | | + | |
- | | + | └─v4only.conf |
- | 5) [!] Installation Destination | + | |
- | (No disks selected) | + | Docs: man: |
- | 7) [!] Network configuration | + | |
- | | + | Main PID: 1412 (rpc.mountd) |
- | 9) [!] User creation | + | |
- | (No user will be created) | + | Memory: 940.0K |
+ | CPU: 6ms | ||
+ | | ||
+ | | ||
- | Please make a selection from the above [' | + | Oct 28 12:44:22 testvm2.ittraining.loc systemd[1]: Starting NFS Mount Daemon... |
- | ' | + | Oct 28 12:44:22 testvm2.ittraining.loc rpc.mountd[1410]: mountd: No V2 or V3 li> |
- | [anaconda]1:main* 2:shell 3:log | + | Oct 28 12:44:22 testvm2.ittraining.loc rpc.mountd[1412]: |
+ | Oct 28 12:44:22 testvm2.ittraining.loc systemd[1]: Started NFS Mount Daemon. | ||
</ | </ | ||
- | ===Network configuration=== | + | ====1.2 - Définition d'un Partage==== |
- | Choisissez maintenant l' | + | Créez le répertoire |
< | < | ||
- | ================================================================================ | + | [root@testvm2 ~]# mkdir /mountpoint |
- | ================================================================================ | + | </ |
- | Installation | + | |
- | 1) [x] Language settings | + | Modifez les permissions et le groupe du répertoire : |
- | | + | |
- | 3) [!] Installation source | + | |
- | | + | |
- | | + | |
- | 5) [!] Installation Destination | + | |
- | (No disks selected) | + | |
- | 7) [!] Network configuration | + | |
- | (Not connected) | + | |
- | 9) [!] User creation | + | |
- | (No user will be created) | + | |
- | Please make a selection from the above [' | + | < |
- | ' | + | [root@testvm2 ~]# chmod 2770 /mountpoint |
- | ================================================================================ | + | |
- | ================================================================================ | + | |
- | Network configuration | + | |
- | Wired (enp1s0) disconnected | + | [root@testvm2 ~]# chgrp users /mountpoint |
- | Host Name: localhost.localdomain | + | [root@testvm2 ~]# ls -ld / |
+ | drwxrws---. 2 root users 6 Oct 28 13:05 / | ||
+ | </ | ||
+ | |||
+ | Créez ensuite les fichiers **test1.txt** et **test2.txt** dans le répertoire **/ | ||
+ | |||
+ | < | ||
+ | [root@testvm2 mountpoint1]# | ||
- | Current host name: localhost | + | [root@testvm2 mountpoint]# |
- | 1) Set host name | + | [root@testvm2 mountpoint1]# |
- | 2) Configure device enp1s0 | + | |
</ | </ | ||
- | Choisissez | + | Editez |
< | < | ||
- | Please make a selection from the above [' | + | [root@testvm2 ~]# vi / |
- | refresh]: 1 | + | |
- | ================================================================================ | + | |
- | ================================================================================ | + | |
- | Enter a new value for 'Host Name' and press ENTER: testvm1.ittraining.network | + | |
- | ================================================================================ | + | |
- | ================================================================================ | + | |
- | Network configuration | + | |
- | Wired (enp1s0) disconnected | + | [root@testvm2 ~]# cat / |
+ | / | ||
+ | </ | ||
- | Host Name: testvm1.ittraining.network | + | Configurez SELinux en mode **permissive** et arrêtez le service **firewalld** |
- | Current host name: localhost | + | < |
+ | [root@testvm2 ~]# setenforce permissive | ||
- | 1) Set host name | + | [root@testvm2 ~]# systemctl stop firewalld |
- | 2) Configure device enp1s0 | + | |
</ | </ | ||
- | Choisissez l' | + | Redémarrez le service |
< | < | ||
- | Please make a selection from the above [' | + | [root@testvm2 ~]# systemctl restart nfs-server |
- | refresh]: 2 | + | |
- | ================================================================================ | + | |
- | ================================================================================ | + | |
- | Device configuration | + | |
- | 1) IPv4 address or " | + | [root@testvm2 ~]# systemctl status nfs-server |
- | dhcp | + | ● nfs-server.service - NFS server and services |
- | 2) IPv4 netmask | + | Loaded: loaded (/ |
- | 3) IPv4 gateway | + | |
- | 4) IPv6 address[/prefix] or " | + | Docs: man: |
- | turn off | + | man: |
- | auto | + | Process: 1475 ExecStartPre=/usr/ |
- | 5) IPv6 default gateway | + | Process: 1476 ExecStart=/ |
- | 6) Nameservers | + | |
- | 7) [ ] Connect automatically after reboot | + | Main PID: 1486 (code=exited, |
- | 8) [ ] Apply configuration in installer | + | CPU: 30ms |
- | Configuring device enp1s0. | + | Oct 28 13:10:34 testvm2.ittraining.loc systemd[1]: Starting NFS server and serv> |
+ | Oct 28 13:10:35 testvm2.ittraining.loc systemd[1]: Finished NFS server and serv> | ||
</ | </ | ||
- | Laissez l’option **1** en **192.168.56.50**, | + | Ajoutez le groupe et l'utilisateur |
< | < | ||
- | Please make a selection from the above ['c' to continue, ' | + | [root@testvm2 ~]# groupadd trainee && useradd trainee -c Trainee -d / |
- | refresh]: 6 | + | </ |
- | ================================================================================ | + | |
- | ================================================================================ | + | |
- | Enter a new value for ' | + | |
- | .8.4.4 | + | |
- | ================================================================================ | + | |
- | ================================================================================ | + | |
- | Device configuration | + | |
- | 1) IPv4 address or " | + | Définissez le mot de passe **trainee** pour l' |
- | | + | |
- | 2) IPv4 netmask | + | |
- | | + | |
- | 3) IPv4 gateway | + | |
- | | + | |
- | 4) IPv6 address[/ | + | |
- | turn off | + | |
- | | + | |
- | 5) IPv6 default gateway | + | |
- | 6) Nameservers (comma separated) | + | |
- | | + | |
- | 7) [ ] Connect automatically after reboot | + | |
- | 8) [ ] Apply configuration in installer | + | |
- | Configuring device enp1s0. | + | < |
+ | [root@testvm2 ~]# passwd trainee | ||
+ | Changement de mot de passe pour l' | ||
+ | Nouveau mot de passe : trainee | ||
+ | MOT DE PASSE INCORRECT : Le mot de passe comporte moins de 8 caractères | ||
+ | Retapez le nouveau mot de passe : trainee | ||
+ | passwd : mise à jour réussie de tous les jetons d' | ||
</ | </ | ||
- | Il est important | + | =====LAB #2 - Configuration du Client NFSv4===== |
+ | |||
+ | Déconnectez-vous | ||
< | < | ||
- | Please make a selection from the above [' | + | [root@testvm2 ~]# [CTRL]+[VERR MAJ]+[5] |
- | refresh]: 7 | + | [root@redhat9 ~]# |
- | ================================================================================ | + | </ |
- | ================================================================================ | + | |
- | Device configuration | + | |
- | 1) IPv4 address or " | + | Connectez-vous à la machine virtuelle **testvm1** : |
- | | + | |
- | 2) IPv4 netmask | + | |
- | | + | |
- | 3) IPv4 gateway | + | |
- | | + | |
- | 4) IPv6 address[/ | + | |
- | turn off | + | |
- | | + | |
- | 5) IPv6 default gateway | + | |
- | 6) Nameservers (comma separated) | + | |
- | | + | |
- | 7) [x] Connect automatically after reboot | + | |
- | 8) [ ] Apply configuration in installer | + | |
- | Configuring device enp1s0. | + | < |
+ | [root@redhat9 ~]# virsh console testvm1 | ||
+ | Connected to domain ' | ||
+ | Escape character is ^] (Ctrl + ]) | ||
+ | [Enter] | ||
+ | [root@testvm1 /]# | ||
</ | </ | ||
- | Pour pouvoir installer les paquets logiciels, la configuration réseau doit être appliquée immédiatement. Choisissez donc l' | + | Installez le paquet |
< | < | ||
- | Please make a selection from the above [' | + | [root@testvm1 /]# dnf install -y nfs-utils |
- | refresh]: 8 | + | </ |
- | ================================================================================ | + | |
- | ================================================================================ | + | |
- | Device configuration | + | |
- | 1) IPv4 address or " | + | Ajoutez le groupe et l' |
- | | + | |
- | 2) IPv4 netmask | + | |
- | | + | |
- | 3) IPv4 gateway | + | |
- | | + | |
- | 4) IPv6 address[/ | + | |
- | turn off | + | |
- | | + | |
- | 5) IPv6 default gateway | + | |
- | 6) Nameservers (comma separated) | + | |
- | | + | |
- | 7) [x] Connect automatically after reboot | + | |
- | 8) [x] Apply configuration in installer | + | |
- | Configuring device enp1s0. | + | < |
+ | [root@testvm1 /]# groupadd trainee && useradd trainee -c Trainee -d / | ||
</ | </ | ||
- | Validez les configurations actuelles en appuyant sur la touche | + | Définissez le mot de passe **trainee** pour l' |
< | < | ||
- | Please make a selection from the above ['c' to continue, ' | + | [root@testvm1 /]# passwd trainee |
- | refresh]: c | + | Changement de mot de passe pour l'utilisateur trainee. |
- | ================================================================================ | + | Nouveau mot de passe : trainee |
- | ================================================================================ | + | MOT DE PASSE INCORRECT : Le mot de passe comporte moins de 8 caractères |
- | Network configuration | + | Retapez le nouveau mot de passe : trainee |
+ | passwd : mise à jour réussie de tous les jetons d' | ||
+ | </ | ||
- | Wired (enp1s0) disconnected | + | ===2.1 - Montage Ephémère=== |
- | Host Name: testvm1.ittraining.network | + | Montez le partage **192.168.56.100:/ |
- | Current host name: localhost | + | < |
- | + | [root@testvm1 /]# mount -t nfs -o rw,sync 192.168.56.100:/mountpoint /mnt | |
- | 1) Set host name | + | [172524.919003] FS-Cache: Loaded |
- | 2) Configure device enp1s0 | + | [172525.206140] Key type dns_resolver registered |
+ | [172525.606078] NFS: Registering the id_resolver key type | ||
+ | [172525.606089] Key type id_resolver registered | ||
+ | [172525.606090] Key type id_legacy registered | ||
</ | </ | ||
- | Pour retourner au menu principal, appuyez sur la touche **c** de nouveau | + | Vérifiez que le montage a été effectué |
< | < | ||
- | Please make a selection from the above [' | + | [root@testvm1 /]# mount | grep mountpoint |
- | refresh]: c | + | 192.168.56.100:/ |
- | ================================================================================ | + | </ |
- | ================================================================================ | + | |
- | Installation | + | |
- | 1) [x] Language settings | + | Essayez de vous placer dans le répertoire **/mnt** : |
- | | + | |
- | 3) [!] Installation source | + | |
- | | + | |
- | | + | |
- | 5) [!] Installation Destination | + | |
- | (No disks selected) | + | |
- | 7) [x] Network configuration | + | |
- | | + | |
- | 9) [!] User creation | + | |
- | (No user will be created) | + | |
- | Please make a selection from the above [' | + | < |
- | ' | + | [root@testvm1 /]# ls -l /mnt |
- | [anaconda]1:main* 2: | + | ls: impossible d' |
</ | </ | ||
- | ===Time settings=== | + | L' |
- | Choisissez maintenant | + | < |
+ | [root@testvm1 /]# su - trainee | ||
+ | |||
+ | [trainee@testvm1 ~]$ ls -l /mnt | ||
+ | total 0 | ||
+ | -rw-r--r--. 1 root users 0 28 oct. 13:59 test1.txt | ||
+ | -rw-r--r--. 1 root users 0 28 oct. 13:59 test2.txt | ||
+ | </ | ||
+ | |||
+ | Créez maintenant le fichier | ||
< | < | ||
- | ================================================================================ | + | [trainee@testvm1 ~]$ touch / |
- | ================================================================================ | + | |
- | Installation | + | |
- | 1) [x] Language settings | + | [trainee@testvm1 ~]$ ls -l /mnt |
- | | + | total 0 |
- | 3) [!] Installation source | + | -rw-r--r--. 1 root users 0 28 oct. 13:59 test1.txt |
- | (Error setting up software | + | -rw-r--r--. 1 root users 0 28 oct. 13:59 test2.txt |
- | source) | + | -rw-r--r--. 1 trainee users 0 28 oct. 14:06 test3.txt |
- | 5) [!] Installation Destination | + | </ |
- | (No disks selected) | + | |
- | 7) [x] Network configuration | + | |
- | | + | |
- | 9) [!] User creation | + | |
- | (No user will be created) | + | |
- | Please make a selection from the above [' | + | ====2.2 - Montage Permanent==== |
- | ' | + | |
- | ================================================================================ | + | Démontez le point de montage **/mnt** : |
- | ================================================================================ | + | |
- | Time settings | + | < |
+ | [root@testvm1 /]# umount /mnt | ||
- | Timezone: America/New_York | + | [root@testvm1 |
- | NTP servers:not configured | + | [root@testvm1 /]# ls /mnt |
- | 1) Change timezone | ||
- | 2) Configure NTP servers | ||
</ | </ | ||
- | Choisissez l' | + | Editez ensuite le fichier |
< | < | ||
- | Please make a selection from the above [' | + | [root@testvm1 /]# vi /etc/fstab |
- | refresh]: 1 | + | |
- | ================================================================================ | + | |
- | ================================================================================ | + | |
- | Timezone settings | + | |
- | Available regions | + | [root@testvm1 /]# cat /etc/fstab |
- | 1) Europe | + | |
- | 2) Asia 6) Pacific | + | # |
- | 3) America | + | # /etc/fstab |
- | 4) Africa | + | # Created by anaconda on Fri Oct 25 15:41:24 2024 |
+ | # | ||
+ | # Accessible filesystems, | ||
+ | # See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info. | ||
+ | # | ||
+ | # After editing this file, run ' | ||
+ | # units generated from this file. | ||
+ | # | ||
+ | UUID=e778bb41-0528-4e4b-9b6b-b80070117978 / | ||
+ | UUID=6d55a589-bef2-4a9b-941f-d2f288057104 /boot | ||
+ | UUID=11306088-b22e-4906-9c31-b2f1a8b416fd none swap defaults | ||
+ | 192.168.56.100:/ | ||
</ | </ | ||
- | Appuyez sur la touche | + | Exécutez |
< | < | ||
- | Please select the timezone. Use numbers or type names directly | + | [root@testvm1 /]# systemctl daemon-reload |
- | region list, ' | + | [175309.751966] systemd-rc-local-generator[4833]: / |
- | ================================================================================ | + | </ |
- | ================================================================================ | + | |
- | 1) Amsterdam | + | Appliquez maintenant le fichier **/ |
- | 2) Andorra | + | |
- | 3) Astrakhan | + | < |
- | 4) Athens | + | [root@testvm1 /]# mount -a |
- | 5) Belgrade | + | |
- | 6) Berlin | + | [root@testvm1 /]# mount | grep mountpoint |
- | 7) Bratislava | + | 192.168.56.100:/ |
- | 8) Brussels | + | |
- | 9) Bucharest | + | |
- | 10) Budapest | + | |
- | 11) Busingen | + | |
- | 12) Chisinau | + | |
- | 13) Copenhagen | + | |
- | 14) Dublin | + | |
- | 15) Gibraltar | + | |
- | 16) Guernsey | + | |
- | 17) Helsinki | + | |
- | 18) Isle_of_Man | + | |
- | 19) Istanbul | + | |
- | 20) Jersey | + | |
</ | </ | ||
- | Puis choisissez | + | Devenez |
< | < | ||
- | Please select the timezone. Use numbers or type names directly | + | [root@testvm1 /]# su - trainee |
- | region list, ' | + | Dernière connexion |
- | ================================================================================ | + | |
- | ================================================================================ | + | |
- | Installation | + | |
- | 1) [x] Language settings | + | [trainee@testvm1 ~]$ ls -l /mnt |
- | | + | total 0 |
- | 3) [!] Installation source | + | -rw-r--r--. 1 root users 0 28 oct. 13:59 test1.txt |
- | (Error setting up software | + | -rw-r--r--. 1 root users 0 28 oct. 13:59 test2.txt |
- | source) | + | -rw-r--r--. 1 trainee users 0 28 oct. 14:06 test3.txt |
- | 5) [!] Installation Destination | + | |
- | (No disks selected) | + | |
- | 7) [x] Network configuration | + | |
- | | + | |
- | 9) [!] User creation | + | |
- | (No user will be created) | + | |
- | Please make a selection from the above [' | + | [trainee@testvm1 ~]$ exit |
- | ' | + | déconnexion |
</ | </ | ||
- | ===Root password=== | + | Déconnectez-vous de la machine virtuelle **testvm1** : |
- | Pour définir le mot de passe root de la VM, choisissez l' | + | < |
+ | [root@testvm1 /]# [CTRL]+[VERR MAJ]+[5] | ||
+ | [root@redhat9 ~]# | ||
+ | </ | ||
+ | |||
+ | Connectez-vous à la machine virtuelle | ||
< | < | ||
- | ================================================================================ | + | [root@redhat9 ~]# virsh console testvm2 |
- | ================================================================================ | + | Connected to domain ' |
- | Installation | + | Escape character is ^] (Ctrl + ]) |
+ | [Enter] | ||
+ | [root@testvm2 ~]# | ||
+ | </ | ||
- | 1) [x] Language settings | + | Vérifiez la présence des trois fichiers dans le répertoire **/mountpoint** : |
- | | + | |
- | 3) [!] Installation source | + | |
- | | + | |
- | | + | |
- | 5) [!] Installation Destination | + | |
- | (No disks selected) | + | |
- | 7) [x] Network configuration | + | |
- | | + | |
- | 9) [!] User creation | + | |
- | (No user will be created) | + | |
- | Please make a selection from the above [' | + | < |
- | 'r' to refresh]: 8 | + | [root@testvm2 ~]# ls -l /mountpoint |
- | ================================================================================ | + | total 0 |
- | ================================================================================ | + | -rw-r--r--. 1 root users 0 Oct 28 13:59 test1.txt |
- | Root password | + | -rw-r--r--. 1 root users 0 Oct 28 13:59 test2.txt |
+ | -rw-r--r--. 1 trainee users 0 Oct 28 14:06 test3.txt | ||
+ | </ | ||
- | Please select new root password. You will have to type it twice. | + | =====LAB #3 - Configuration de NFSv4 avec Automounter===== |
- | Password: fenestros | + | ====Présentation==== |
- | Password (confirm): fenestros | + | |
- | ================================================================================ | + | |
- | ================================================================================ | + | |
- | Question | + | |
- | The password you have provided is weak: The password fails the dictionary check | + | L' |
- | - it is based on a dictionary word | + | |
- | Would you like to use it anyway? | + | |
- | Please respond | + | Automounter a été créée pour résoudre le problème des utilisateurs non privilégiés qui ne disposent pas des autorisations suffisantes pour utiliser la commande **mount**. Sans l'utilisation de la commande mount,les utilisateurs normaux ne peuvent pas accéder aux supports amovibles tels que les CD, les DVD et les lecteurs de disques amovibles. |
- | ================================================================================ | + | |
- | ================================================================================ | + | |
- | Installation | + | |
- | 1) [x] Language settings | + | En outre, si un système de fichiers local ou distant n'est pas monté au démarrage à l'aide de la configuration |
- | | + | |
- | 3) [!] Installation source | + | |
- | | + | |
- | | + | |
- | 5) [!] Installation Destination | + | |
- | (No disks selected) | + | |
- | 7) [x] Network | + | |
- | | + | |
- | 9) [ ] User creation | + | |
- | (No user will be created) | + | |
- | Please make a selection from the above ['b' to begin installation, ' | + | Les fichiers de configuration d'Automounter contiennent des informations sur le montage du système de fichiers, de la même manière que les entrées du fichier /etc/fstab. |
- | ' | + | |
- | </code> | + | |
- | ===Installation source=== | + | Bien que les systèmes de fichiers spécifiés dans /etc/fstab se montent au démarrage du système restent montés jusqu' |
- | Choisissez l'option **3** : | + | L'utilisation des ressources pour les systèmes de fichiers Automounter est équivalente à celle des systèmes de fichiers montés au démarrage car un système de fichiers n' |
- | < | + | L' |
- | ================================================================================ | + | |
- | ================================================================================ | + | |
- | Installation | + | |
- | 1) [x] Language settings | + | Lorsque le système de fichiers est à nouveau monté, le service autofs utilise la configuration de montage la plus récente, contrairement à un montage dans le fichier |
- | | + | |
- | 3) [!] Installation source | + | |
- | | + | |
- | | + | |
- | 5) [!] Installation Destination | + | |
- | (No disks selected) | + | |
- | 7) [x] Network | + | |
- | | + | |
- | 9) [ ] User creation | + | |
- | (No user will be created) | + | |
- | Please make a selection from the above [' | + | ====Le Service autofs==== |
- | ' | + | |
- | ================================================================================ | + | |
- | ================================================================================ | + | |
- | Installation source | + | |
- | Choose an installation source type. | + | Le service autofs prend en charge les mêmes systèmes de fichiers locaux et distants que le fichier /etc/fstab, y compris les protocoles de partage de fichiers NFS et SMB, et prend en charge les mêmes options de montage spécifiques au protocole, y compris les paramètres de sécurité. Les systèmes de fichiers montés par l' |
- | 1) CD/DVD | + | |
- | 2) local ISO file | + | Comme l' |
- | 3) Network | + | |
- | </ | + | La différence est qu'un système de fichiers Automounter reste démonté jusqu' |
+ | |||
+ | ====3.1 - Création d'un Fichier de Mappage Indirect==== | ||
+ | |||
+ | On parle de montage indirect lorsque l' | ||
+ | |||
+ | ===Configuration du Serveur=== | ||
- | L'ISO utilisé est de type **net-install**. Choisissez donc l' | + | Editez le fichier |
< | < | ||
- | Please make a selection from the above [' | + | [root@testvm2 ~]# vi / |
- | refresh]: 3 | + | |
- | ================================================================================ | + | |
- | ================================================================================ | + | |
- | Installation source | + | |
- | 1) Closest mirror | + | [root@testvm2 ~]# cat /etc/exports |
- | 2) http:// | + | / |
- | 3) https:// | + | /home |
- | 4) ftp:// | + | |
- | 5) nfs | + | |
</ | </ | ||
- | Choisissez l' | + | Redémarrez le service |
< | < | ||
- | Please make a selection from the above [' | + | [root@testvm2 ~]# systemctl restart nfs-server |
- | refresh]: 1 | + | </ |
- | ================================================================================ | + | |
- | ================================================================================ | + | |
- | Installation | + | |
- | 1) [x] Language settings | + | Devenez l' |
- | | + | |
- | 3) [x] Installation source | + | |
- | https:// | + | |
- | | + | |
- | 5) [!] Installation Destination | + | |
- | (No disks selected) | + | |
- | 7) [x] Network configuration | + | |
- | | + | |
- | 9) [ ] User creation | + | |
- | (No user will be created) | + | |
- | Please make a selection from the above [' | + | < |
- | ' | + | [root@testvm2 ~]# su - trainee |
+ | Last login: Tue Oct 29 13:56:07 CET 2024 on ttyS0 | ||
+ | |||
+ | [trainee@testvm2 ~]$ touch test4.txt | ||
</ | </ | ||
- | ===Software selection=== | + | ===Configuration du Client=== |
- | Choisissez l' | + | Déconnectez-vous de la machine virtuelle |
< | < | ||
- | ================================================================================ | + | [root@testvm2 ~]# [CTRL]+[VERR MAJ]+[5] |
- | ================================================================================ | + | [root@redhat9 ~]# |
- | Installation | + | </ |
- | 1) [x] Language settings | + | Connectez-vous à la machine virtuelle **testvm1** |
- | | + | |
- | 3) [x] Installation source | + | |
- | https:// | + | |
- | | + | |
- | 5) [!] Installation Destination | + | |
- | (No disks selected) | + | |
- | 7) [x] Network configuration | + | |
- | | + | |
- | 9) [ ] User creation | + | |
- | (No user will be created) | + | |
- | Please make a selection from the above [' | + | < |
- | ' | + | [root@redhat9 ~]# virsh console testvm1 |
- | ================================================================================ | + | Connected |
- | ================================================================================ | + | Escape character is ^] (Ctrl + ]) |
- | Software selection | + | [Enter] |
+ | [root@testvm1 /]# | ||
+ | </ | ||
- | Base environment | + | Configurez SELinux en mode **permissive** |
- | 1) [ ] Server with GUI 4) [ ] Workstation | + | < |
- | 2) [ ] Server | + | [root@testvm1 /]# setenforce permissive |
- | 3) [ ] Minimal Install | + | </ |
- | Please make a selection from the above [' | + | Arrêtez le service **firewalld** |
- | refresh]: 3 | + | |
- | ================================================================================ | + | |
- | ================================================================================ | + | |
- | Software selection | + | |
- | Base environment | + | < |
- | + | [root@testvm1 /]# systemctl stop firewalld | |
- | 1) [ ] Server with GUI 4) [ ] Workstation | + | |
- | 2) [ ] Server | + | |
- | 3) [x] Minimal Install | + | |
</ | </ | ||
- | Appuyez ensuite sur la touche | + | Installez le paquet |
< | < | ||
- | Please make a selection from the above [' | + | [root@testvm1 /]# dnf install autofs -y |
- | refresh]: c | + | </ |
- | ================================================================================ | + | |
- | ================================================================================ | + | |
- | Software selection | + | |
- | Additional software for selected environment | + | Créez ensuite le fichier de mappage indirect maître **/ |
+ | |||
+ | < | ||
+ | [root@testvm1 /]# vi / | ||
- | 1) [ ] Guest Agents | + | [root@testvm1 /]# cat /etc/auto.master.d/ |
- | 2) [ ] Standard | + | /home |
- | 3) [ ] Container Management | + | |
- | 4) [ ] .NET Core Development | + | |
- | 5) [ ] RPM Development Tools 12) [ ] Security Tools | + | |
- | 6) [ ] Development Tools 13) [ ] Smart Card Support | + | |
- | 7) [ ] Graphical Administration Tools | + | |
</ | </ | ||
- | Ne choisissez rien dans la liste et appuyez simplement sur la touche | + | Créez le fichier de mappage |
< | < | ||
- | Please make a selection from the above [' | + | [root@testvm1 /]# vi / |
- | refresh]: c | + | |
- | ================================================================================ | + | |
- | ================================================================================ | + | |
- | Installation | + | |
- | 1) [x] Language settings | + | [root@testvm1 /]# cat /etc/auto.home |
- | | + | * |
- | 3) [!] Installation source | + | </ |
- | (Processing...) (Processing...) | + | |
- | 5) [!] Installation Destination | + | |
- | (No disks selected) | + | |
- | 7) [x] Network configuration | + | |
- | | + | |
- | 9) [ ] User creation | + | |
- | (No user will be created) | + | |
- | Please make a selection from the above [' | + | <WRAP center round important 60%> |
- | ' | + | **Important** |
- | ================================================================================ | + | </ |
- | ================================================================================ | + | |
- | Installation | + | |
- | 1) [x] Language settings | + | Afin d' |
- | | + | |
- | 3) [x] Installation source | + | |
- | | + | |
- | | + | |
- | 5) [!] Installation Destination | + | |
- | (No disks selected) | + | |
- | 7) [x] Network configuration | + | |
- | | + | |
- | 9) [ ] User creation | + | |
- | (No user will be created) | + | |
- | Please make a selection from the above [' | + | < |
- | ' | + | [root@testvm1 /]# vi / |
+ | |||
+ | [root@testvm1 /]# cat / | ||
+ | ... | ||
+ | # In order of likelihood of use to accelerate lookup. | ||
+ | passwd: sss files systemd | ||
+ | shadow: | ||
+ | group: | ||
+ | hosts: | ||
+ | services: | ||
+ | netgroup: | ||
+ | automount: | ||
+ | ... | ||
</ | </ | ||
- | ===Installation Destination=== | + | Activez et démarrez le service |
- | + | ||
- | Choisissez l' | + | |
< | < | ||
- | ================================================================================ | + | [root@testvm1 /]# systemctl enable --now autofs |
- | ================================================================================ | + | |
- | Installation | + | |
- | 1) [x] Language settings | + | [root@testvm1 /]# systemctl status autofs |
- | (French (France)) | + | ● autofs.service - Automounts filesystems on demand |
- | 3) [x] Installation source | + | Loaded: loaded (/usr/lib/systemd/system/autofs.service; |
- | https://vault.centos.org/ | + | Active: active (running) since Tue 2024-10-29 13:55:10 CET; 19min ago |
- | | + | Main PID: 3425 (automount) |
- | 5) [!] Installation Destination | + | |
- | | + | Memory: 6.1M |
- | 7) [x] Network configuration | + | CPU: 68ms |
- | (Wired (enp1s0) connected) | + | CGroup: / |
- | 9) [ ] User creation | + | |
- | (No user will be created) | + | |
- | Please make a selection from the above [' | + | oct. 29 13:55:10 testvm1.ittraining.loc systemd[1]: Starting Automounts filesys> |
- | ' | + | oct. 29 13:55:10 testvm1.ittraining.loc systemd[1]: Started Automounts filesyst> |
- | Probing storage... | + | |
</ | </ | ||
- | Séléctionnez le disque **vda** et appuyez sur la touche **c** : | + | Vérifiez |
< | < | ||
- | ================================================================================ | + | [root@testvm1 /]# mount | tail |
- | ================================================================================ | + | none on / |
- | Installation Destination | + | fusectl on / |
+ | /dev/vda1 on /boot type xfs (rw, | ||
+ | none on / | ||
+ | sunrpc on / | ||
+ | 192.168.56.100:/ | ||
+ | tmpfs on /run/user/0 type tmpfs (rw, | ||
+ | / | ||
+ | -hosts on /net type autofs (rw, | ||
+ | / | ||
+ | </ | ||
- | 1) [x] : 5 GiB (vda) | + | Devenez l' |
- | 1 disk selected; 5 GiB capacity; 5 GiB free ... | + | < |
+ | [root@testvm1 /]# su - trainee | ||
+ | Dernière connexion : mardi 29 octobre 2024 à 13:55:17 CET sur ttyS0 | ||
+ | </ | ||
+ | |||
+ | Exécutez la commande **ls**. Vous devez voir le fichier **test4.txt** qui a été créé dans la machine virtuelle **testvm2** : | ||
+ | |||
+ | < | ||
+ | [trainee@testvm1 ~]$ ls | ||
+ | test4.txt | ||
- | Please make a selection from the above [' | + | [trainee@testvm1 ~]$ exit |
- | refresh]: c | + | |
</ | </ | ||
- | A ce stade il vous est possible | + | Déconnectez-vous de la machine virtuelle |
< | < | ||
- | ================================================================================ | + | [root@testvm1 /]# [CTRL]+[VERR MAJ]+[5] |
- | ================================================================================ | + | [root@redhat9 ~]# |
- | Partitioning Options | + | </ |
- | 1) [ ] Replace Existing Linux system(s) | + | Connectez-vous à la machine virtuelle **testvm2** : |
- | 2) [ ] Use All Space | + | |
- | 3) [ ] Use Free Space | + | |
- | 4) [ ] Manually assign mount points | + | |
- | Installation requires partitioning of your hard drive. Select what space to use | + | < |
- | for the install target or manually assign mount points. | + | [root@redhat9 ~]# virsh console testvm2 |
+ | Connected | ||
+ | Escape character is ^] (Ctrl + ]) | ||
+ | [Enter] | ||
+ | [root@testvm2 ~]# | ||
+ | </ | ||
- | Please make a selection from the above ['c' to continue, ' | + | Devenez l'utilisateur **trainee** et créez le fichier **test5.txt** |
- | refresh]: 2 | + | |
- | ================================================================================ | + | |
- | ================================================================================ | + | |
- | Partitioning Options | + | |
- | 1) [ ] Replace Existing Linux system(s) | + | < |
- | 2) [x] Use All Space | + | [root@testvm2 ~]# su - trainee |
- | 3) [ ] Use Free Space | + | Last login: Tue Oct 29 13:56:07 CET 2024 on ttyS0 |
- | 4) [ ] Manually assign mount points | + | |
- | Installation requires partitioning of your hard drive. Select what space to use | + | [trainee@testvm2 ~]$ touch test5.txt |
- | for the install target or manually assign mount points. | + | |
- | Please make a selection from the above [' | + | [trainee@testvm2 ~]$ ls |
- | refresh]: c | + | test4.txt |
</ | </ | ||
- | A ce stade il vous est possible | + | Déconnectez-vous de la machine virtuelle |
- | + | ||
< | < | ||
- | ================================================================================ | + | [root@testvm2 ~]# [CTRL]+[VERR MAJ]+[5] |
- | ================================================================================ | + | [root@redhat9 ~]# |
- | Partition Scheme Options | + | </ |
- | 1) [ ] Standard Partition | + | Connectez-vous à la machine virtuelle **testvm1** : |
- | 2) [x] LVM | + | |
- | 3) [ ] LVM Thin Provisioning | + | |
- | Select a partition scheme configuration. | + | < |
+ | [root@redhat9 ~]# virsh console testvm1 | ||
+ | Connected to domain ' | ||
+ | Escape character is ^] (Ctrl + ]) | ||
+ | [Enter] | ||
+ | [root@testvm1 /]# | ||
</ | </ | ||
- | Bien que préférable de choisir | + | Devenez |
< | < | ||
- | Please make a selection from the above [' | + | [trainee@testvm1 ~]$ ls |
- | refresh]: 1 | + | test4.txt |
- | ================================================================================ | + | |
- | ================================================================================ | + | |
- | Partition Scheme Options | + | |
- | 1) [x] Standard Partition | + | [trainee@testvm1 ~]$ exit |
- | 2) [ ] LVM | + | </ |
- | 3) [ ] LVM Thin Provisioning | + | |
- | Select a partition scheme configuration. | + | ====3.2 - Création d'un Fichier de Mappage Direct==== |
- | Please make a selection from the above ['c' to continue, ' | + | On parle de montage direct lorsqu'un système de fichiers est monté sur un point de montage immuable et connu. Un point de montage direct existe en tant que répertoire permanent, comme les autres répertoires normaux. |
- | refresh]: c | + | |
- | Generating updated storage configuration | + | |
- | Checking storage configuration... | + | |
- | </ | + | |
- | ===Démarrer l' | + | Déconnectez-vous de la machine virtuelle **testvm1** : |
- | De retour au menu principal, choisissez l' | + | < |
+ | [root@testvm1 /]# [CTRL]+[VERR MAJ]+[5] | ||
+ | [root@redhat9 ~]# | ||
+ | </ | ||
+ | |||
+ | Connectez-vous à la machine virtuelle | ||
< | < | ||
- | ================================================================================ | + | [root@redhat9 ~]# virsh console testvm2 |
- | ================================================================================ | + | Connected to domain ' |
- | Installation | + | Escape character is ^] (Ctrl + ]) |
+ | [Enter] | ||
+ | [root@testvm2 ~]# | ||
+ | </ | ||
- | 1) [x] Language settings | + | ===Configuration du Serveur=== |
- | | + | |
- | 3) [x] Installation source | + | |
- | | + | |
- | | + | |
- | 5) [x] Installation Destination | + | |
- | | + | |
- | | + | |
- | 7) [x] Network configuration | + | |
- | | + | |
- | 9) [ ] User creation | + | |
- | (No user will be created) | + | |
- | Please make a selection from the above [' | + | Éditez le fichier **/ |
- | ' | + | |
+ | < | ||
+ | [root@testvm2 ~]# vi / | ||
+ | |||
+ | [root@testvm2 ~]# cat / | ||
+ | / | ||
+ | /home | ||
+ | / | ||
</ | </ | ||
- | <WRAP center round important> | + | Redémarrez le service |
- | **Important** : Notez que nous n' | + | |
- | </WRAP> | + | < |
+ | [root@testvm2 ~]# systemctl restart nfs-server | ||
+ | </code> | ||
- | L' | + | Créez le répertoire **/ |
< | < | ||
- | ... | + | [root@testvm2 ~]# mkdir / |
- | Configuring storage | + | |
- | . | + | |
- | Installing boot loader | + | |
- | . | + | |
- | Performing post-installation setup tasks | + | |
- | . | + | |
- | Configuring installed system | + | [root@testvm2 ~]# chmod 777 / |
- | .......... | + | |
- | Writing network configuration | + | |
- | . | + | |
- | Creating users | + | |
- | .... | + | |
- | Configuring addons | + | |
- | Executing com_redhat_kdump addon | + | |
- | Executing org_fedora_oscap addon | + | |
- | . | + | |
- | Generating initramfs | + | |
- | . | + | |
- | Running post-installation scripts | + | |
- | . | + | |
- | Storing configuration files and kickstarts | + | |
- | .. | + | |
</ | </ | ||
- | ===Démarrer la VM=== | + | ===Configuration du Client=== |
- | A l' | + | Déconnectez-vous |
< | < | ||
- | Installation complete. Press ENTER to quit: | + | [root@testvm2 ~]# [CTRL]+[VERR MAJ]+[5] |
- | ... | + | [root@redhat9 ~]# |
- | [ | + | |
- | | + | |
- | [ | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | [ | + | |
- | [ | + | |
- | | + | |
- | [ OK ] Started Command Scheduler. | + | |
- | | + | |
- | [ 18.386454] IPv6: ADDRCONF(NETDEV_UP): | + | |
</ | </ | ||
- | ====1.5 | + | Connectez-vous à la machine virtuelle **testvm1** : |
- | Au prompt, connectez-vous en tant que **root** avec le mot de passe **fenestros** : | + | < |
+ | [root@redhat9 ~]# virsh console testvm1 | ||
+ | Connected to domain ' | ||
+ | Escape character is ^] (Ctrl + ]) | ||
+ | [Enter] | ||
+ | [root@testvm1 /]# | ||
+ | </ | ||
+ | |||
+ | Créez | ||
< | < | ||
- | CentOS Linux 8 | + | [root@testvm1 /]# vi /etc/auto.master.d/ |
- | Kernel 4.18.0-305.12.1.el8_4.x86_64 on an x86_64 | + | |
- | testvm1 login: root | + | [root@testvm1 |
- | Mot de passe : fenestros | + | /- / |
- | [root@testvm1 | + | |
</ | </ | ||
- | ===Réseau=== | + | Créez le fichier de mappage **/ |
- | Vérifiez la prise en compte d'une adresse IPv4 dans le réseau | + | < |
+ | [root@testvm1 /]# vi / | ||
+ | |||
+ | [root@testvm1 /]# cat / | ||
+ | / | ||
+ | </ | ||
+ | |||
+ | Redémarrez le service **autofs** | ||
< | < | ||
- | [root@testvm1 | + | [root@testvm1 |
- | 1: lo: < | + | |
- | link/loopback 00: | + | [root@testvm1 |
- | inet 127.0.0.1/8 scope host lo | + | ● autofs.service - Automounts filesystems on demand |
- | valid_lft forever preferred_lft forever | + | Loaded: loaded (/usr/ |
- | inet6 ::1/128 scope host | + | Active: active (running) since Tue 2024-10-29 14:40:16 CET; 8s ago |
- | | + | Main PID: 3612 (automount) |
- | 2: enp1s0: < | + | Tasks: 8 (limit: 23172) |
- | | + | |
- | inet 192.168.56.83/24 brd 192.168.56.255 scope global dynamic noprefixroute enp1s0 | + | CPU: 29ms |
- | valid_lft 3534sec preferred_lft 3534sec | + | CGroup: /system.slice/autofs.service |
- | inet6 fe80::6191:6417:8b53:bcb9/64 scope link noprefixroute | + | └─3612 / |
- | | + | |
+ | oct. 29 14:40:16 testvm1.ittraining.loc systemd[1]: Starting Automounts filesys> | ||
+ | oct. 29 14:40:16 testvm1.ittraining.loc systemd[1]: Started Automounts filesyst> | ||
</ | </ | ||
- | ===Internet=== | + | Vérifiez la pris en compte de la configuration : |
+ | |||
+ | < | ||
+ | [root@testvm1 /]# mount | tail | ||
+ | fusectl on / | ||
+ | /dev/vda1 on /boot type xfs (rw, | ||
+ | none on / | ||
+ | sunrpc on / | ||
+ | 192.168.56.100:/ | ||
+ | tmpfs on /run/user/0 type tmpfs (rw, | ||
+ | / | ||
+ | -hosts on /net type autofs (rw, | ||
+ | / | ||
+ | / | ||
+ | </ | ||
- | Vérifiez la connectivité de la VM : | + | Créez le fichier **/ |
< | < | ||
- | [root@testvm1 | + | [root@testvm1 |
- | PING www.free.fr (212.27.48.10) 56(84) bytes of data. | + | |
- | 64 bytes from www.free.fr (212.27.48.10): | + | |
- | 64 bytes from www.free.fr (212.27.48.10): | + | |
- | --- www.free.fr ping statistics --- | + | [root@testvm1 |
- | 2 packets transmitted, | + | test6.txt |
- | rtt min/avg/max/mdev = 29.887/ | + | |
</ | </ | ||
- | Avant de poursuivre, exécutez les deux commandes suivantes pour réparer les dépôts cassés | + | Déconnectez-vous |
< | < | ||
- | [root@centos8 ~]# sed -i ' | + | [root@testvm1 /]# [CTRL]+[VERR MAJ]+[5] |
- | [root@centos8 | + | [root@redhat9 |
</ | </ | ||
- | Détachez-vous de la VM : | + | Connectez-vous à la machine virtuelle **testvm2** |
< | < | ||
- | [root@testvm1 | + | [root@redhat9 |
- | [root@centos8 | + | Connected to domain ' |
+ | Escape character is ^] (Ctrl + ]) | ||
+ | [Enter] | ||
+ | [root@testvm2 | ||
</ | </ | ||
+ | Consultez ls contenu du répertoire **/ | ||
- | <WRAP center round important> | + | <code> |
- | **Important** : Notez l' | + | [root@testvm2 ~]# ls -l / |
- | </WRAP> | + | total 0 |
+ | -rw-r--r--. 1 nobody nobody 0 Oct 29 14:43 test6.txt | ||
+ | </ | ||
+ | |||
+ | Déconnectez-vous de la machine virtuelle | ||
+ | |||
+ | < | ||
+ | [root@testvm2 ~]# [CTRL]+[VERR MAJ]+[5] | ||
+ | [root@redhat9 ~]# | ||
+ | </code> | ||
----- | ----- | ||
- | Copyright © 2022 Hugh Norris | + | Copyright © 2024 Hugh Norris |