Vous êtes sur la page 1sur 52

ROYAUME DU MAROC

UNIVERSITE HASSAN Premier


FACULTE DES SCIENCES ET TECHNIQUES DE SETTAT

Département : Mathématiques et Informatique


Licence en Sciences et Techniques
Filière : Génie Informatique

 LOUHAIBI zakariae Pr Rachid Dakir


 BEN MOUSSA imad
 JEI nohaila
 ER-ROUIAM Fatima Zohra
 IHIKKI hamza

1
ROYAUME DU MAROC
UNIVERSITE HASSAN Premier
FACULTE DES SCIENCES ET TECHNIQUES DE SETTAT

Département : Mathématiques et Informatique


Licence en Sciences et Techniques
Filière : Génie Informatique

Centos7 : est une distribution Linux qui repose essentiellement sur Red Hat. Il
peut être utilisé pour faire fonctionner des serveurs HTTP, des serveurs DNS, des
serveurs de messagerie et quasiment tous les outils gérant des requêtes provenant
de clients.

Modes d’installations :
 Installation complète : comportant l’interface graphique avec
l’explorateur Windows.
 Installation minimale : également appelé Server Core, ce type
d’installation est dépourvu d’interface graphique (administration via des
lignes de commandes), et ce mode est privilégié pour renforcer la
sécurité du système d’exploitation.

1- L’installation minimale :
On clique sur le bouton échap puis on écrit « linux text » comme ci-dessous

2
ROYAUME DU MAROC
UNIVERSITE HASSAN Premier
FACULTE DES SCIENCES ET TECHNIQUES DE SETTAT

Département : Mathématiques et Informatique


Licence en Sciences et Techniques
Filière : Génie Informatique

Puis on configure chaque option :

1-Langage settings : French(France)

2-Time Settings : Africa/Casablanca timezone

3
ROYAUME DU MAROC
UNIVERSITE HASSAN Premier
FACULTE DES SCIENCES ET TECHNIQUES DE SETTAT

Département : Mathématiques et Informatique


Licence en Sciences et Techniques
Filière : Génie Informatique

3-Installation source : Local media

4-Software Selection : Minimal Install

4
ROYAUME DU MAROC
UNIVERSITE HASSAN Premier
FACULTE DES SCIENCES ET TECHNIQUES DE SETTAT

Département : Mathématiques et Informatique


Licence en Sciences et Techniques
Filière : Génie Informatique

5-Installation Destination : Automatic partitioning selecte

5
ROYAUME DU MAROC
UNIVERSITE HASSAN Premier
FACULTE DES SCIENCES ET TECHNIQUES DE SETTAT

Département : Mathématiques et Informatique


Licence en Sciences et Techniques
Filière : Génie Informatique

6-kdump : kdump is enabled by default

7- Network configuration : Wired (enp0s3) connected

2-installation en mode graphique :

6
ROYAUME DU MAROC
UNIVERSITE HASSAN Premier
FACULTE DES SCIENCES ET TECHNIQUES DE SETTAT

Département : Mathématiques et Informatique


Licence en Sciences et Techniques
Filière : Génie Informatique

On configure la langue puis on clique sur continuer :

7
ROYAUME DU MAROC
UNIVERSITE HASSAN Premier
FACULTE DES SCIENCES ET TECHNIQUES DE SETTAT

Département : Mathématiques et Informatique


Licence en Sciences et Techniques
Filière : Génie Informatique

8
ROYAUME DU MAROC
UNIVERSITE HASSAN Premier
FACULTE DES SCIENCES ET TECHNIQUES DE SETTAT

Département : Mathématiques et Informatique


Licence en Sciences et Techniques
Filière : Génie Informatique

A la fin de l’installation, on s’identifie par le login et le mdp qu’on a déjà definie f

9
ROYAUME DU MAROC
UNIVERSITE HASSAN Premier
FACULTE DES SCIENCES ET TECHNIQUES DE SETTAT

Département : Mathématiques et Informatique


Licence en Sciences et Techniques
Filière : Génie Informatique

On change d’abords le nom d’utilisateur par la commande :

« hostnamectl1 set-hostname server-info »

10
ROYAUME DU MAROC
UNIVERSITE HASSAN Premier
FACULTE DES SCIENCES ET TECHNIQUES DE SETTAT

Département : Mathématiques et Informatique


Licence en Sciences et Techniques
Filière : Génie Informatique

On peut aussi le changer en modifiant le fichier hostname dans le répertoire « etc » qui contient tous
les fichiers de configuration du système et les scripts du démarrage.

Ceci peut être aboutit par la commande :

Vi /etc/hostname

On peut aussi vérifier le nom de l’utilisateur en saisissant la commande : « hostnmaectl » :

11
ROYAUME DU MAROC
UNIVERSITE HASSAN Premier
FACULTE DES SCIENCES ET TECHNIQUES DE SETTAT

Département : Mathématiques et Informatique


Licence en Sciences et Techniques
Filière : Génie Informatique

Apres le changement du nom de l’utilisateur, on est censé maintenant de configurer la carte réseau
par la commande graphique nmtui

On aura alors une interface comme le montre ci-dessous :

On clique sur le bouton « modifier une connexion »

12
ROYAUME DU MAROC
UNIVERSITE HASSAN Premier
FACULTE DES SCIENCES ET TECHNIQUES DE SETTAT

Département : Mathématiques et Informatique


Licence en Sciences et Techniques
Filière : Génie Informatique

On sélectionne emp0s3 puis on la modifie :

On donne à notre machine l’adresse : 172.16.0.5

Puis on coche la case « connecter automatiquement » et on valide.

13
ROYAUME DU MAROC
UNIVERSITE HASSAN Premier
FACULTE DES SCIENCES ET TECHNIQUES DE SETTAT

Département : Mathématiques et Informatique


Licence en Sciences et Techniques
Filière : Génie Informatique

On vérifie le changement qu’on a effectué en saisissant la commande :

« cat /etc/sysconfig/network-scripts/ifcfg-emp0s3 »

14
ROYAUME DU MAROC
UNIVERSITE HASSAN Premier
FACULTE DES SCIENCES ET TECHNIQUES DE SETTAT

Département : Mathématiques et Informatique


Licence en Sciences et Techniques
Filière : Génie Informatique

On crée une nouvelle carte réseau virtuelle dans Virtual box (adapter #6) puis on la configure de
notre machine physique

on suit le chemin : Centre Réseau et Partage -> Modifier les paramètres de la carte -> on choisit notre
carte graphique virtuelle (VirtualBox Host-Only Newtrok #6)->Propriétés

15
ROYAUME DU MAROC
UNIVERSITE HASSAN Premier
FACULTE DES SCIENCES ET TECHNIQUES DE SETTAT

Département : Mathématiques et Informatique


Licence en Sciences et Techniques
Filière : Génie Informatique

On choisit Protocole Internet version 4 (TCP/IPv4)

16
ROYAUME DU MAROC
UNIVERSITE HASSAN Premier
FACULTE DES SCIENCES ET TECHNIQUES DE SETTAT

Département : Mathématiques et Informatique


Licence en Sciences et Techniques
Filière : Génie Informatique

On configure la carte comme ci-dessous :

On la donne l’adresse : 172.16.0.55

Puis le masque : 255.255.0.0

17
ROYAUME DU MAROC
UNIVERSITE HASSAN Premier
FACULTE DES SCIENCES ET TECHNIQUES DE SETTAT

Département : Mathématiques et Informatique


Licence en Sciences et Techniques
Filière : Génie Informatique

Revenons à notre machine Centos7 puis on configure son mode de connexion :

La première carte graphique aura un mode : réseau interne privé (Host-Only Adapter)

Puis on sélectionne la carte réseau virtuelle #6 qui a comme adresse : 172.16.0.55

18
ROYAUME DU MAROC
UNIVERSITE HASSAN Premier
FACULTE DES SCIENCES ET TECHNIQUES DE SETTAT

Département : Mathématiques et Informatique


Licence en Sciences et Techniques
Filière : Génie Informatique

On ping l’adresse du serveur centos7 et la carte réseau virtuelle qu’on a créé à partir de notre
machine hote :

19
ROYAUME DU MAROC
UNIVERSITE HASSAN Premier
FACULTE DES SCIENCES ET TECHNIQUES DE SETTAT

Département : Mathématiques et Informatique


Licence en Sciences et Techniques
Filière : Génie Informatique

On ajoute on autre carte réseau à notre serveur centos7 en mode bridge :

On démarre notre machine et on vérifie s’elle a accès à l’internet en pingant le dns google :

Ping 8.8.8.8

20
ROYAUME DU MAROC
UNIVERSITE HASSAN Premier
FACULTE DES SCIENCES ET TECHNIQUES DE SETTAT

Département : Mathématiques et Informatique


Licence en Sciences et Techniques
Filière : Génie Informatique

Il faut installer le paquet Net-tools afin de pouvoir exécuter la commande ifconfig

Centos7 télécharge les paquets à partir des liens officiels qui se trouvent dans les fichiers dans le
répertoire /etc/yum.repos.d/

21
ROYAUME DU MAROC
UNIVERSITE HASSAN Premier
FACULTE DES SCIENCES ET TECHNIQUES DE SETTAT

Département : Mathématiques et Informatique


Licence en Sciences et Techniques
Filière : Génie Informatique

Pour installer net-tools on utilise yum qui vérifie les dépendances logiciels (si un logiciel X a besoin
d’un autre logiciel X2 afin d’être installé, ce gestionnaire des paquets assure l’installation
automatique de X2 ce qui n’est pas faisable par les autres gestionnaires des paquets comme rpm)

On installe net-tools par la commande : yum install net-tools comme la montre la photo ci-dessous :

22
ROYAUME DU MAROC
UNIVERSITE HASSAN Premier
FACULTE DES SCIENCES ET TECHNIQUES DE SETTAT

Département : Mathématiques et Informatique


Licence en Sciences et Techniques
Filière : Génie Informatique

Maintenant on pourra exécuter la commande ifconfig sans erreur :

23
ROYAUME DU MAROC
UNIVERSITE HASSAN Premier
FACULTE DES SCIENCES ET TECHNIQUES DE SETTAT

Département : Mathématiques et Informatique


Licence en Sciences et Techniques
Filière : Génie Informatique

Pour gérer notre serveur Centos7 à distance on a deux solutions possibles :

 Soit en mode commande : on utilise Putty


 Soit en mode Interface graphique(GUI) : on utilise Web admin

1-installation de putty :
On va utiliser le protocole SSH qui permet de créer un canal sécurisé entre notre machine hôte et
notre serveur et se base sur le protocole 22

Avant l’installation de ce dernier, on doit vérifier s’il existe déjà dans notre serveur en utilisant la
commande : « rpm –qa | grep ssh »

24
ROYAUME DU MAROC
UNIVERSITE HASSAN Premier
FACULTE DES SCIENCES ET TECHNIQUES DE SETTAT

Département : Mathématiques et Informatique


Licence en Sciences et Techniques
Filière : Génie Informatique

On remarque que l’ssh existe déjà dans la machine, il nous reste de vérifier s’il est en état de
fonctionnement ou en état d’arrêt par la commande : « systemctl status sshd »

25
ROYAUME DU MAROC
UNIVERSITE HASSAN Premier
FACULTE DES SCIENCES ET TECHNIQUES DE SETTAT

Département : Mathématiques et Informatique


Licence en Sciences et Techniques
Filière : Génie Informatique

On active le service ssh lors du démarrage du serveur par la commande :

26
ROYAUME DU MAROC
UNIVERSITE HASSAN Premier
FACULTE DES SCIENCES ET TECHNIQUES DE SETTAT

Département : Mathématiques et Informatique


Licence en Sciences et Techniques
Filière : Génie Informatique

« systemctl enable sshd »

On peut aussi remplacer l’état status ou enable par :

 Start : pour démarrer le service


 Restart : pour le redémarrer
 Stop : pour arrêter le service

On ouvre maintenant putty et saisit l’adresse : 172.16.0.5 puis on ouvre la connexion

27
ROYAUME DU MAROC
UNIVERSITE HASSAN Premier
FACULTE DES SCIENCES ET TECHNIQUES DE SETTAT

Département : Mathématiques et Informatique


Licence en Sciences et Techniques
Filière : Génie Informatique

On entre le login et le mot de passe et enfin on aura accès totale à notre serveur à distance

On essaye la commande ifconfig dans putty qui nous affiche :

 L’adresse de la carte réseau du serveur : 172.16.0.5


 L’adresse du wifi
 L’adresse du localhost : 127.0.01

28
ROYAUME DU MAROC
UNIVERSITE HASSAN Premier
FACULTE DES SCIENCES ET TECHNIQUES DE SETTAT

Département : Mathématiques et Informatique


Licence en Sciences et Techniques
Filière : Génie Informatique

2-Webmin :
On configure d’abords le pare-feu pour accepter tous les paquets provenant du port 22 (dans le
serveur en non pas putty)

On exécute les commandes :

 systemctl start firewall : pour activer le pare-feu


 Firewall-cmd –permanent –add-port =22/tcp : pour autoriser les services et les paquets
provenant du port 22
 Firewall-cmd –reload : pour prendre en considération les changements

29
ROYAUME DU MAROC
UNIVERSITE HASSAN Premier
FACULTE DES SCIENCES ET TECHNIQUES DE SETTAT

Département : Mathématiques et Informatique


Licence en Sciences et Techniques
Filière : Génie Informatique

On affiche alors les listes des ports qu’on a configuré par la commande : « firewall-cmd --list-
ports ». Et on vérifie l’existence du port 22

On installe maintenant Webmin qui permet de contrôler notre serveur à distance à travers une
interface graphique

Pour Installer webmin on exécute la commande : « yum install webmin »

Mais notre serveur ne va pas trouver le lien de téléchargement dans ses dépôts. Alors on doit créer
un dépôt qui contient le lien de téléchargement de Webmin

30
ROYAUME DU MAROC
UNIVERSITE HASSAN Premier
FACULTE DES SCIENCES ET TECHNIQUES DE SETTAT

Département : Mathématiques et Informatique


Licence en Sciences et Techniques
Filière : Génie Informatique

Ceci est réalisable par la commande : « vi /etc/yum.repos.d/webmin.repo »

Puis on copie ceci dans le fichier :

[Webmin]
name=Webmin Distribution Neutral
#baseurl=http://download.webmin.com/download/yum
mirrorlist=http://download.webmin.com/download/yum/mirrorlist
enabled=1

31
ROYAUME DU MAROC
UNIVERSITE HASSAN Premier
FACULTE DES SCIENCES ET TECHNIQUES DE SETTAT

Département : Mathématiques et Informatique


Licence en Sciences et Techniques
Filière : Génie Informatique

Maintenant on télécharge wget qui permet de télécharger les paquets directement de l’internet à
travers les protocoles http, https, ftp

On utilise la commande : « yum install wget »

32
ROYAUME DU MAROC
UNIVERSITE HASSAN Premier
FACULTE DES SCIENCES ET TECHNIQUES DE SETTAT

Département : Mathématiques et Informatique


Licence en Sciences et Techniques
Filière : Génie Informatique

On commence d’installer la clé d’intégrité GPG qui est utilisé pour signer les packages Webmin

Afin que le system aura confiance du nouveau dépôt qu’on a crée

On utilise : « wget http://www.webmin.com/jcameron-key.asc»

33
ROYAUME DU MAROC
UNIVERSITE HASSAN Premier
FACULTE DES SCIENCES ET TECHNIQUES DE SETTAT

Département : Mathématiques et Informatique


Licence en Sciences et Techniques
Filière : Génie Informatique

Puis on exécute aussi la commande : « rpm --import jcameron-key.asc »

Maintenant on commence l’installation de webmin : « yum install webmin »

34
ROYAUME DU MAROC
UNIVERSITE HASSAN Premier
FACULTE DES SCIENCES ET TECHNIQUES DE SETTAT

Département : Mathématiques et Informatique


Licence en Sciences et Techniques
Filière : Génie Informatique

On démarre le service webmin : « service webmin start »

35
ROYAUME DU MAROC
UNIVERSITE HASSAN Premier
FACULTE DES SCIENCES ET TECHNIQUES DE SETTAT

Département : Mathématiques et Informatique


Licence en Sciences et Techniques
Filière : Génie Informatique

Autoriser le port 10000 de webmin qui nous permet d’acceder au serveur à distance à l’aide d’une
interface graphique :

« firewall-cmd –permanent –add-port=10000/tcp »

On vérifie si le port est ajouté en affichant la liste des ports qu’on a autorisé par le parfeu

« firewall-cmd –list-ports »

On accède à Webmin en accédant au lien : https://172.16.0.5:10000

36
ROYAUME DU MAROC
UNIVERSITE HASSAN Premier
FACULTE DES SCIENCES ET TECHNIQUES DE SETTAT

Département : Mathématiques et Informatique


Licence en Sciences et Techniques
Filière : Génie Informatique

Webmin offre aussi une interface console pour exécuter les commandes à distance

On exécute la commande ifconfig à partir de la fenêtre commande de Webmin

37
ROYAUME DU MAROC
UNIVERSITE HASSAN Premier
FACULTE DES SCIENCES ET TECHNIQUES DE SETTAT

Département : Mathématiques et Informatique


Licence en Sciences et Techniques
Filière : Génie Informatique

WINDOWS SERVER 2016 :

Windows Server 2016 est un système d’exploitation qui joue le rôle d’un serveur
développé par MICROSOFT.
On insère l’image ISO du Windows server 2016 dans la nouvelle machine virtuelle
créé dans Virtual box

38
ROYAUME DU MAROC
UNIVERSITE HASSAN Premier
FACULTE DES SCIENCES ET TECHNIQUES DE SETTAT

Département : Mathématiques et Informatique


Licence en Sciences et Techniques
Filière : Génie Informatique

On configure les cartes réseaux tels que :


 La 1er carte réseau : mode réseau interne privé (Host-only Adapter) puis on
choisit la carte réseau virtuelle ayant l’adresse : 172.16.0.55

39
ROYAUME DU MAROC
UNIVERSITE HASSAN Premier
FACULTE DES SCIENCES ET TECHNIQUES DE SETTAT

Département : Mathématiques et Informatique


Licence en Sciences et Techniques
Filière : Génie Informatique

 La 2eme carte réseau : en mode Pont (Bridge)

40
ROYAUME DU MAROC
UNIVERSITE HASSAN Premier
FACULTE DES SCIENCES ET TECHNIQUES DE SETTAT

Département : Mathématiques et Informatique


Licence en Sciences et Techniques
Filière : Génie Informatique

On démarre la machine puis on choisit nos configurations convenables :

41
ROYAUME DU MAROC
UNIVERSITE HASSAN Premier
FACULTE DES SCIENCES ET TECHNIQUES DE SETTAT

Département : Mathématiques et Informatique


Licence en Sciences et Techniques
Filière : Génie Informatique

On choisit l’Edition Datacenter qui offre une GUI facile à manipuler

42
ROYAUME DU MAROC
UNIVERSITE HASSAN Premier
FACULTE DES SCIENCES ET TECHNIQUES DE SETTAT

Département : Mathématiques et Informatique


Licence en Sciences et Techniques
Filière : Génie Informatique

On clique sur le bouton Next puis on attend jusqu’à la terminaison de l’installation


Lorsque la machine se redémarre on doit saisir un mot de passe pour la machine
comme suit :

43
ROYAUME DU MAROC
UNIVERSITE HASSAN Premier
FACULTE DES SCIENCES ET TECHNIQUES DE SETTAT

Département : Mathématiques et Informatique


Licence en Sciences et Techniques
Filière : Génie Informatique

Apres l’installation et l’allumage de la machine on doit changer d’abords le nom de


l’ordinateur par : « WINSERV »

44
ROYAUME DU MAROC
UNIVERSITE HASSAN Premier
FACULTE DES SCIENCES ET TECHNIQUES DE SETTAT

Département : Mathématiques et Informatique


Licence en Sciences et Techniques
Filière : Génie Informatique

45
ROYAUME DU MAROC
UNIVERSITE HASSAN Premier
FACULTE DES SCIENCES ET TECHNIQUES DE SETTAT

Département : Mathématiques et Informatique


Licence en Sciences et Techniques
Filière : Génie Informatique

On configure la 1ère carte réseau puis on affecte à notre serveur l’adresse IP :


172.16.0.6

46
ROYAUME DU MAROC
UNIVERSITE HASSAN Premier
FACULTE DES SCIENCES ET TECHNIQUES DE SETTAT

Département : Mathématiques et Informatique


Licence en Sciences et Techniques
Filière : Génie Informatique

On arrête le parfeu de notre serveur :

47
ROYAUME DU MAROC
UNIVERSITE HASSAN Premier
FACULTE DES SCIENCES ET TECHNIQUES DE SETTAT

Département : Mathématiques et Informatique


Licence en Sciences et Techniques
Filière : Génie Informatique

Puis on active le bureau à distance comme le montre l’image ci-dessous :

48
ROYAUME DU MAROC
UNIVERSITE HASSAN Premier
FACULTE DES SCIENCES ET TECHNIQUES DE SETTAT

Département : Mathématiques et Informatique


Licence en Sciences et Techniques
Filière : Génie Informatique

On essaye de vérifier la connexion entre notre machine hôte et notre serveur :


Ping 172.16.0.6 –t (on ping à partir de la machine hôte)

49
ROYAUME DU MAROC
UNIVERSITE HASSAN Premier
FACULTE DES SCIENCES ET TECHNIQUES DE SETTAT

Département : Mathématiques et Informatique


Licence en Sciences et Techniques
Filière : Génie Informatique

On Ajoute un Administrateur puis on l’affecte toutes les droits d’accès :

50
ROYAUME DU MAROC
UNIVERSITE HASSAN Premier
FACULTE DES SCIENCES ET TECHNIQUES DE SETTAT

Département : Mathématiques et Informatique


Licence en Sciences et Techniques
Filière : Génie Informatique

On ouvre la connexion bureau à distance à partir de notre machine hôte pour


accéder à notre serveur à distance (à l’aide du rdp)
Puis on saisit l’adresse du serveur 172.16.0.6 puis on saisit notre mot de passe :

51
ROYAUME DU MAROC
UNIVERSITE HASSAN Premier
FACULTE DES SCIENCES ET TECHNIQUES DE SETTAT

Département : Mathématiques et Informatique


Licence en Sciences et Techniques
Filière : Génie Informatique

52

Vous aimerez peut-être aussi