{"id":241,"date":"2014-01-26T05:48:48","date_gmt":"2014-01-26T10:48:48","guid":{"rendered":"http:\/\/www.hoplawego.com\/blog\/?p=241"},"modified":"2015-05-21T20:33:46","modified_gmt":"2015-05-22T00:33:46","slug":"installer-redhat-ou-centos-ou-oel","status":"publish","type":"post","link":"https:\/\/www.hoplawego.com\/blog\/installer-redhat-ou-centos-ou-oel\/","title":{"rendered":"Installer RedHat ou CentOS ou OEL"},"content":{"rendered":"<p style=\"margin: 0in; font-family: Calibri; font-size: 10.0pt;\">Vous voulez une proc\u00e9dure simple pour installer la base de RedHat?<\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 10.0pt;\">En voici une.<\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 10.0pt;\">Je d\u00e9sactive SELINUX qui \u00e0 mon humble avis ne fait que compliquer toute la patente \ud83d\ude42<\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\"><span style=\"font-weight: bold;\">Installer RedHat en d\u00e9marrant sur le DVD<\/span><\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\"><span style=\"font-weight: bold;\">Installation de base et\u00a0Choisir Web Server<\/span><\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\"><span style=\"font-weight: bold;\">Configurer le r\u00e9seau<\/span><\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\">A l\u2019installation, si vous n\u2019avez pas configur\u00e9 les cartes r\u00e9seaux \u00e0 l\u2019interface graphique, utilisez le syst\u00e8me de configuration par la commande:<\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\"><span style=\"font-weight: bold;\">system-config-network<\/span><\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\">configurer les bonnes adresses pour toutes les cartes et ensuite aller les forcer \u00e0 d\u00e9marrer automatiquement: (le faire pour chaque carte r\u00e9seau)<\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\"><span style=\"font-weight: bold;\">vi \/etc\/sysconfig\/network-scripts\/ifcfg-eth0<\/span><\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\"><span style=\"font-style: italic;\">\u00a0 \u00a0 \u00a0mettre ONBOOT=yes<\/span><\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\"><span style=\"font-weight: bold;\">vi \/etc\/sysconfig\/network-scripts\/ifcfg-eth1<\/span><\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\"><span style=\"font-style: italic;\">\u00a0 \u00a0 \u00a0mettre ONBOOT=yes<\/span><\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\"><span style=\"font-weight: bold;\">vi \/etc\/sysconfig\/network-scripts\/ifcfg-eth2<\/span><\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\"><span style=\"font-style: italic;\">\u00a0 \u00a0 \u00a0mettre ONBOOT=yes<\/span><\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\"><span style=\"font-weight: bold;\">vi \/etc\/sysconfig\/network-scripts\/ifcfg-eth3<\/span><\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\"><span style=\"font-style: italic;\">\u00a0 \u00a0 \u00a0mettre ONBOOT=yes<\/span><\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\">Red\u00e9marrer les cartes r\u00e9seaux:<\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\"><span style=\"font-weight: bold; font-style: italic;\">service network restart<\/span><\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\">Utilisez la commande suivante pour valider la configuration:<\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\"><span style=\"font-weight: bold;\">ifconfig -a<\/span><\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\">Vous pouvez tester les connexions:<\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\"><span style=\"font-weight: bold;\">ping \u201cadresse de la passerelle\u201d<\/span><\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\"><span style=\"font-weight: bold;\">Configurer le SSH<\/span><\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\">Sauvegarder la config de base<\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\"><span style=\"font-weight: bold;\">cp \/etc\/ssh\/sshd_config \/etc\/ssh\/sshd_config.bak<\/span><\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\">Vider le fichier et remplacer le contenu par celui fourni.<\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\"><span style=\"font-weight: bold;\">vi \/etc\/ssh\/sshd_config<\/span><\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\"><span style=\"font-weight: bold;\">Configurer le NTP<\/span><\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\">Sauvegarder la config de base<\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\"><span style=\"font-weight: bold;\">cp \/etc\/ntp.conf\u00a0\/etc\/ntp.conf.bak<\/span><\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\">Modifier<\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\"><span style=\"font-weight: bold;\">vi \/etc\/ntp.conf<\/span><\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\">en rempla\u00e7ant les serveurs de red hat pour ceux de l\u2019entreprise dans les sections:<\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\"><span style=\"font-weight: bold;\">server 1.redhat<\/span><\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\"><span style=\"font-weight: bold;\">server 2.redhat<\/span><\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\"><span style=\"font-weight: bold;\">D\u00e9sactiver le SELINUX<\/span><\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\"><span style=\"font-weight: bold;\">vi \/etc\/selinux\/config<\/span><\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\">effacer le contenu du fichier et y ins\u00e9rer ceci:<\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\">#<\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\"><span style=\"font-weight: bold; font-style: italic;\">SELINUX=disabled<\/span><\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\"><span style=\"font-weight: bold; font-style: italic;\">SELINUXTYPE=targeted<\/span><\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\"><span style=\"font-weight: bold; font-style: italic;\">SETLOCALDEFS=0<\/span><\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\"><span style=\"font-weight: bold; font-style: italic;\">#<\/span><\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\">Red\u00e9marrer. Pour v\u00e9rifier que SELINUX est bel et bien d\u00e9sactiv\u00e9, rouler la commande suivante:<\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\"><span style=\"font-weight: bold;\">sestatus<\/span><\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\">le r\u00e9sultat devrait \u00eatre:\u00a0<span style=\"font-weight: bold; font-style: italic;\">SELinux status:\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 disabled<\/span><\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\"><span style=\"font-weight: bold;\">D\u00e9sactiver le pare-feu<\/span><\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\"><span style=\"font-weight: bold;\">chkconfig iptables off<\/span><\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\"><span style=\"font-weight: bold;\">service iptables save<\/span><\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\"><span style=\"font-weight: bold;\">service iptables stop<\/span><\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\">Vous devriez voir un output semblable:<\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\"><span style=\"font-weight: bold;\">iptables: Flushing firewall rules: \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0[\u00a0 OK\u00a0 ]<\/span><\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\"><span style=\"font-weight: bold;\">iptables: Setting chains to policy ACCEPT: filter \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0[\u00a0 OK\u00a0 ]<\/span><\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\"><span style=\"font-weight: bold;\">iptables: Unloading modules: \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0[\u00a0 OK\u00a0 ]<\/span><\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\"><span style=\"font-weight: bold;\">\u00a0<\/span><\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\"><span style=\"font-weight: bold;\">\u2013&gt; Red\u00e9marrer le serveur &lt;\u2013<\/span><\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\">Utiliser la commande suivante:<\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\"><span style=\"font-weight: bold;\">shutdown -r now<\/span><\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\"><span style=\"font-weight: bold;\">Mettre le syst\u00e8me \u00e0 jour<\/span><\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\">Enregistrer le serveur dans le compte Red Hat<\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\"><span style=\"font-weight: bold;\">subscription-manager register \u2013username=USERNAME \u2013password=PASSWORD<\/span><\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\"><span style=\"font-weight: bold;\">subscription-manager subscribe \u2013auto<\/span><\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\">D\u00e9marrer le processus de mise \u00e0 jour<\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\"><span style=\"font-weight: bold;\">yum update<\/span><\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\">Appuyer &lt;Y&gt; lorsque le syst\u00e8me le demande. Il se peut qu\u2019il le le demande plusieurs fois.<\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\">Quand c\u2019est termin\u00e9, nettoyer la metadata<\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\"><span style=\"font-weight: bold;\">yum clean metadata<\/span><\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\"><span style=\"font-weight: bold;\">\u2013&gt; Red\u00e9marrer le serveur &lt;\u2013<\/span><\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\">Utiliser la commande suivante:<\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\"><span style=\"font-weight: bold;\">shutdown -r now<\/span><\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\"><span style=\"font-weight: bold;\">Mettre le syst\u00e8me \u00e0 jour (suite)<\/span><\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\">Au red\u00e9marrage, retenter la commande suivante.<\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\"><span style=\"font-weight: bold;\">yum update<\/span><\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\">S\u2019il y\u2019a de nouvelles mise \u00e0 jour, les appliquer et red\u00e9marrer, s\u2019il n\u2019y plus de mise a jour, continuer la proc\u00e9dure.<\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\"><span style=\"font-weight: bold;\">Configuration Apache.<\/span><\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\">Forcer le d\u00e9marrage de APACHE en m\u00eame temps que le serveur:<\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\"><span style=\"font-weight: bold;\">chkconfig httpd on<\/span><\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\">Pour valider, v\u00e9rifier que le r\u00e9sultat de la commande suivante:<\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\"><span style=\"font-weight: bold;\">chkconfig \u2013list |grep httpd<\/span><\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\">soit le suivant aux points 2,3,4,5<\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\"><span style=\"font-weight: bold;\">httpd\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 0:arr\u00eat\u00a0\u00a0\u00a0\u00a0 1:arr\u00eat\u00a0\u00a0\u00a0\u00a0 2:marche\u00a0\u00a0\u00a0\u00a0 3:marche\u00a0\u00a0\u00a0\u00a0 4:marche\u00a0\u00a0\u00a0\u00a0 5:marche\u00a0\u00a0\u00a0\u00a0 6:arr\u00eat<\/span><\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\">Pour le d\u00e9marrer:<\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\"><span style=\"font-weight: bold;\">service httpd start<\/span><\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\">Pour v\u00e9rifier que le port 80 est bel et bien utilis\u00e9:<\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\"><span style=\"font-weight: bold;\">netstat -anp |grep \u201c:80\u2033<\/span><\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\">Vous devriez avoir un r\u00e9sultat semblable:<\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\"><span style=\"font-weight: bold;\">tcp\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 0\u00a0\u00a0\u00a0\u00a0\u00a0 0 :::80\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 :::*\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 LISTEN\u00a0\u00a0\u00a0\u00a0\u00a0 1950\/httpd\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\">Utilisez un fureteur externe pour se brancher sur l\u2019adresse IP sur serveur et vous devriez maintenant voir la page de d\u00e9marrage de Apache.<\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\"><span style=\"font-weight: bold;\">Configurer les param\u00e8tres de Apache<\/span><\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\">Se d\u00e9placer dans le bon dossier:<\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\"><span style=\"font-weight: bold;\">cd \/etc\/httpd\/conf<\/span><\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\">Sauvegarder la configuration de base:<\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\"><span style=\"font-weight: bold;\">cp httpd.conf httpd.conf.bak<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Vous voulez une proc\u00e9dure simple pour installer la base de RedHat? En voici une. Je d\u00e9sactive SELINUX qui \u00e0 mon humble avis ne fait que compliquer toute la patente \ud83d\ude42 Installer RedHat en d\u00e9marrant sur le DVD Installation de base et\u00a0Choisir Web Server Configurer le r\u00e9seau A l\u2019installation, si vous n\u2019avez pas configur\u00e9 les cartes &hellip; <\/p>\n","protected":false},"author":1,"featured_media":242,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[21],"tags":[36,34,35,37],"class_list":["post-241","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux-et-bsd","tag-centos","tag-linux","tag-redhat","tag-selinux","grid-sizer"],"_links":{"self":[{"href":"https:\/\/www.hoplawego.com\/blog\/wp-json\/wp\/v2\/posts\/241","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hoplawego.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hoplawego.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hoplawego.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hoplawego.com\/blog\/wp-json\/wp\/v2\/comments?post=241"}],"version-history":[{"count":2,"href":"https:\/\/www.hoplawego.com\/blog\/wp-json\/wp\/v2\/posts\/241\/revisions"}],"predecessor-version":[{"id":244,"href":"https:\/\/www.hoplawego.com\/blog\/wp-json\/wp\/v2\/posts\/241\/revisions\/244"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.hoplawego.com\/blog\/wp-json\/wp\/v2\/media\/242"}],"wp:attachment":[{"href":"https:\/\/www.hoplawego.com\/blog\/wp-json\/wp\/v2\/media?parent=241"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hoplawego.com\/blog\/wp-json\/wp\/v2\/categories?post=241"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hoplawego.com\/blog\/wp-json\/wp\/v2\/tags?post=241"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}