{"id":1615,"date":"2022-11-19T13:41:37","date_gmt":"2022-11-19T12:41:37","guid":{"rendered":"https:\/\/www.webodesign.net\/?page_id=1615"},"modified":"2023-01-06T15:35:36","modified_gmt":"2023-01-06T14:35:36","slug":"installation-dun-serveur-lamp","status":"publish","type":"page","link":"https:\/\/www.webodesign.net\/?page_id=1615","title":{"rendered":"Installation d&rsquo;un serveur LAMP"},"content":{"rendered":"\n<div class=\"wp-block-uagb-container uagb-block-c09fefca alignfull uagb-is-root-container\"><div class=\"uagb-container-inner-blocks-wrap\">\n<div class=\"wp-block-uagb-container uagb-block-e0fb21c4\">\n<div class=\"wp-block-uagb-advanced-heading uagb-block-3f0f1988\"><h2 class=\"uagb-heading-text\">Installation d&rsquo;un serveur LAMP<br>L:Linux \/ A:Apache \/ M:MariaDB \/ P:PHP<\/h2><\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-24\" style=\"padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px\">\n<div class=\"wp-block-column is-layout-constrained wp-container-22\">\n<div class=\"wp-block-group is-layout-flow\">\n<div class=\"wp-block-group is-layout-constrained\" style=\"border-style:none;border-width:0px;border-radius:0px\">\t\t\t\t<div class=\"wp-block-uagb-table-of-contents uagb-toc__align-left uagb-toc__columns-1  uagb-block-c5e53b20     \"\n\t\t\t\t\tdata-scroll= \"1\"\n\t\t\t\t\tdata-offset= \"30\"\n\t\t\t\t\tstyle=\"\"\n\t\t\t\t>\n\t\t\t\t<div class=\"uagb-toc__wrap\">\n\t\t\t\t\t\t<div class=\"uagb-toc__title\">\n\t\t\t\t\t\t\tSommaire\t\t\t\t\t\t\t\t\t\t\t\t\t<svg xmlns=\"https:\/\/www.w3.org\/2000\/svg\" viewBox= \"0 0 384 512\"><path d=\"M192 384c-8.188 0-16.38-3.125-22.62-9.375l-160-160c-12.5-12.5-12.5-32.75 0-45.25s32.75-12.5 45.25 0L192 306.8l137.4-137.4c12.5-12.5 32.75-12.5 45.25 0s12.5 32.75 0 45.25l-160 160C208.4 380.9 200.2 384 192 384z\"><\/path><\/svg>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class='uagb-toc__separator'><\/div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"uagb-toc__list-wrap\">\n\t\t\t\t\t\t<ol class=\"uagb-toc__list\"><li class=\"uagb-toc__list\"><a href=\"#installation-et-configuration-du-serveur-apache\" class=\"uagb-toc-link__trigger\">Installation et configuration du serveur Apache<\/a><li class=\"uagb-toc__list\"><a href=\"#installation-de-php\" class=\"uagb-toc-link__trigger\">Installation de PHP<\/a><li class=\"uagb-toc__list\"><a href=\"#installation-de-mariadb\" class=\"uagb-toc-link__trigger\">Installation de mariadb<\/a><\/ol>\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t<\/div>\n\n\n\n<div class=\"wp-block-group has-border-color has-vivid-cyan-blue-border-color has-background is-layout-flow\" style=\"border-style:dotted;border-width:2px;border-radius:8px;background-color:#fffdf8;padding-right:7px;padding-bottom:15px;padding-left:7px\">\n<h3 class=\"has-text-color wp-block-heading\" id=\"3-iii-cr%C3%A9ation-dun-admin-pour-phpmyadmin\" style=\"color:#fffdf8;padding-top:0;padding-right:0;padding-bottom:0;padding-left:0;font-size:1px\">Installation et configuration du serveur Apache<\/h3>\n\n\n\n<div class=\"qubely-block-accordion  qubely-block-d34844\" data-item-toggle=\"true\">\n<div class=\"wp-block-qubely-accordion-item qubely-block-56746b\"><div class=\"qubely-accordion-item qubely-type-fill qubely-accordion-active\"><div class=\"qubely-accordion-panel qubely-icon-position-right\"><span class=\"qubely-accordion-panel-handler\" role=\"button\"><span class=\"qubely-accordion-panel-handler-label\">Installation et configuration du serveur Apache<\/span><span class=\"qubely-accordion-icon fa fa-plus\"><\/span><\/span><\/div><div class=\"qubely-accordion-body\" style=\"display:block\"><div itemprop=\"text\">\n<div class=\"wp-block-uagb-advanced-heading uagb-block-4debf9f8\"><h4 class=\"uagb-heading-text\">Installation d&rsquo;Apache<\/h4><\/div>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text\/x-sh&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;showPanel&quot;:false,&quot;language&quot;:&quot;Shell&quot;,&quot;modeName&quot;:&quot;shell&quot;}\">sudo apt-get update &amp; upgrade\nsudo apt-get install apache2\n\/\/ Installer le d\u00e9marrage automatique d'apache : \nsudo systemctl enable apache2\nsudo systemctl status apache2\t\/\/ V\u00e9rifier l'\u00e9tat du service\nsudo apache2ctl -v\t\t\/\/ pour connaitre la version d'apache\nsystemctl restart apache2<\/pre><\/div>\n\n\n\n<p>On obtient le retour suivant :<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img decoding=\"async\" loading=\"lazy\" width=\"812\" height=\"260\" src=\"https:\/\/www.webodesign.net\/wp-content\/uploads\/2022\/11\/inst_lamp_02.png\" alt=\"\" class=\"wp-image-1617\" srcset=\"https:\/\/www.webodesign.net\/wp-content\/uploads\/2022\/11\/inst_lamp_02.png 812w, https:\/\/www.webodesign.net\/wp-content\/uploads\/2022\/11\/inst_lamp_02-300x96.png 300w, https:\/\/www.webodesign.net\/wp-content\/uploads\/2022\/11\/inst_lamp_02-768x246.png 768w\" sizes=\"(max-width: 812px) 100vw, 812px\" \/><\/figure>\n\n\n\n<div class=\"wp-block-uagb-advanced-heading uagb-block-8d228d8c\"><h4 class=\"uagb-heading-text\">Configuration d&rsquo;Apache<\/h4><\/div>\n\n\n\n<p class=\"has-text-color has-medium-font-size\" style=\"color:#09548a;font-style:normal;font-weight:600\">On active 4 modules sur le serveur Apache :<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text\/x-sh&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;showPanel&quot;:false,&quot;language&quot;:&quot;Shell&quot;,&quot;modeName&quot;:&quot;shell&quot;}\">\/\/ Le mode rewrite permet la r\u00e9\u00e9criture  d url, c est-\u00e0-dire de voir sur les liens \n\/\/ en fran\u00e7ais constitutifs de la page\nsudo a2enmod rewrite\n\n\/\/ Pour avoir un site en https qui va pouvoir g\u00e9rer les certificats\t\nsudo a2enmod ssl\n\n\/\/ Pour la compression et la mise en cache du site internet (acc\u00e9l\u00e9ration du chargement des pages)\nsudo a2enmod deflate\n\n\/\/ Va permettre d interagir avec les ent\u00eates http\nsudo a2enmod headers \n\nsudo systemctl restart apache2<\/pre><\/div>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-5\">\n<div class=\"wp-block-column is-layout-flow\">\n<p class=\"has-text-color has-medium-font-size\" style=\"color:#09548a;font-style:normal;font-weight:600\">Pour masquer l&rsquo;affichage de la version d&rsquo;Apache sur les pages d&rsquo;erreurs :<\/p>\n\n\n\n<p>Editer le fichier \u00ab\u00a0apache2.conf\u00a0\u00bb et ajouter la ligne suivante \u00e0 la fin du fichier :<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text\/x-sh&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;showPanel&quot;:false,&quot;language&quot;:&quot;Shell&quot;,&quot;modeName&quot;:&quot;shell&quot;}\">sudo nano \/etc\/apache2\/apache2.conf\n\/\/ et \u00e0 la fin du fichier : \nServerTokens Prod <\/pre><\/div>\n\n\n\n<div class=\"wp-block-group has-border-color has-cyan-bluish-gray-border-color has-foreground-color has-tertiary-background-color has-text-color has-background is-layout-flow\" style=\"border-width:3px;border-radius:20px;margin-top:10px;margin-bottom:10px;padding-top:3px;padding-right:3px;padding-bottom:3px;padding-left:3px\">\n<div class=\"wp-block-uagb-icon-list uagb-block-98a02598\"><div class=\"uagb-icon-list__wrap\">\n<div class=\"wp-block-uagb-icon-list-child uagb-block-f0e77daa\"><a target=\"_self\" aria-label=\"Le r\u00e9pertoire site-available contient les sites disponibles mais pas forc\u00e9ment actifs. \" rel=\"noopener noreferrer\" href=\"#\"> <\/a><span class=\"uagb-icon-list__source-wrap\"><svg xmlns=\"https:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\"><path d=\"M256 31.1c-141.4 0-255.1 93.12-255.1 208c0 49.62 21.35 94.98 56.97 130.7c-12.5 50.37-54.27 95.27-54.77 95.77c-2.25 2.25-2.875 5.734-1.5 8.734c1.249 3 4.021 4.766 7.271 4.766c66.25 0 115.1-31.76 140.6-51.39c32.63 12.25 69.02 19.39 107.4 19.39c141.4 0 255.1-93.13 255.1-207.1S397.4 31.1 256 31.1zM127.1 271.1c-17.75 0-32-14.25-32-31.1s14.25-32 32-32s32 14.25 32 32S145.7 271.1 127.1 271.1zM256 271.1c-17.75 0-31.1-14.25-31.1-31.1s14.25-32 31.1-32s31.1 14.25 31.1 32S273.8 271.1 256 271.1zM383.1 271.1c-17.75 0-32-14.25-32-31.1s14.25-32 32-32s32 14.25 32 32S401.7 271.1 383.1 271.1z\"><\/path><\/svg><\/span><span class=\"uagb-icon-list__label\">Le r\u00e9pertoire site-available contient les sites disponibles mais pas forc\u00e9ment actifs. <\/span><\/div>\n\n\n\n<div class=\"wp-block-uagb-icon-list-child uagb-block-bbc85b0b\"><a target=\"_self\" aria-label=\"Le r\u00e9pertoire site-enable contient les sites actifs.\" rel=\"noopener noreferrer\" href=\"#\"> <\/a><span class=\"uagb-icon-list__source-wrap\"><svg xmlns=\"https:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\"><path d=\"M256 31.1c-141.4 0-255.1 93.12-255.1 208c0 49.62 21.35 94.98 56.97 130.7c-12.5 50.37-54.27 95.27-54.77 95.77c-2.25 2.25-2.875 5.734-1.5 8.734c1.249 3 4.021 4.766 7.271 4.766c66.25 0 115.1-31.76 140.6-51.39c32.63 12.25 69.02 19.39 107.4 19.39c141.4 0 255.1-93.13 255.1-207.1S397.4 31.1 256 31.1zM127.1 271.1c-17.75 0-32-14.25-32-31.1s14.25-32 32-32s32 14.25 32 32S145.7 271.1 127.1 271.1zM256 271.1c-17.75 0-31.1-14.25-31.1-31.1s14.25-32 31.1-32s31.1 14.25 31.1 32S273.8 271.1 256 271.1zM383.1 271.1c-17.75 0-32-14.25-32-31.1s14.25-32 32-32s32 14.25 32 32S401.7 271.1 383.1 271.1z\"><\/path><\/svg><\/span><span class=\"uagb-icon-list__label\">Le r\u00e9pertoire site-enable contient les sites actifs.<\/span><\/div>\n\n\n\n<div class=\"wp-block-uagb-icon-list-child uagb-block-073aa554\"><a target=\"_self\" aria-label=\"On remarque que dans &quot;DocumentRoot, se trouve not\u00e9 la racine du site\u00a0 \/var\/www\/html\" rel=\"noopener noreferrer\" href=\"#\"> <\/a><span class=\"uagb-icon-list__source-wrap\"><svg xmlns=\"https:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\"><path d=\"M256 31.1c-141.4 0-255.1 93.12-255.1 208c0 49.62 21.35 94.98 56.97 130.7c-12.5 50.37-54.27 95.27-54.77 95.77c-2.25 2.25-2.875 5.734-1.5 8.734c1.249 3 4.021 4.766 7.271 4.766c66.25 0 115.1-31.76 140.6-51.39c32.63 12.25 69.02 19.39 107.4 19.39c141.4 0 255.1-93.13 255.1-207.1S397.4 31.1 256 31.1zM127.1 271.1c-17.75 0-32-14.25-32-31.1s14.25-32 32-32s32 14.25 32 32S145.7 271.1 127.1 271.1zM256 271.1c-17.75 0-31.1-14.25-31.1-31.1s14.25-32 31.1-32s31.1 14.25 31.1 32S273.8 271.1 256 271.1zM383.1 271.1c-17.75 0-32-14.25-32-31.1s14.25-32 32-32s32 14.25 32 32S401.7 271.1 383.1 271.1z\"><\/path><\/svg><\/span><span class=\"uagb-icon-list__label\">On remarque que dans \u00ab\u00a0DocumentRoot, se trouve not\u00e9 la racine du site\u00a0 \/var\/www\/html<\/span><\/div>\n<\/div><\/div>\n<\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow\">\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" loading=\"lazy\" width=\"472\" height=\"511\" src=\"https:\/\/www.webodesign.net\/wp-content\/uploads\/2022\/11\/inst_lamp_04.png\" alt=\"\" class=\"wp-image-1619\" srcset=\"https:\/\/www.webodesign.net\/wp-content\/uploads\/2022\/11\/inst_lamp_04.png 472w, https:\/\/www.webodesign.net\/wp-content\/uploads\/2022\/11\/inst_lamp_04-277x300.png 277w\" sizes=\"(max-width: 472px) 100vw, 472px\" \/><\/figure>\n<\/div>\n<\/div>\n\n\n\n<p>Ex\u00e9cuter un navigateur et entrer l&rsquo;adresse IP du serveur dans la barre d&rsquo;adresse pour v\u00e9rifier que le serveur Apache est install\u00e9 et op\u00e9rationnel.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" loading=\"lazy\" width=\"1024\" height=\"287\" src=\"https:\/\/www.webodesign.net\/wp-content\/uploads\/2022\/11\/inst_lamp_03-1024x287.png\" alt=\"\" class=\"wp-image-1618\" srcset=\"https:\/\/www.webodesign.net\/wp-content\/uploads\/2022\/11\/inst_lamp_03-1024x287.png 1024w, https:\/\/www.webodesign.net\/wp-content\/uploads\/2022\/11\/inst_lamp_03-300x84.png 300w, https:\/\/www.webodesign.net\/wp-content\/uploads\/2022\/11\/inst_lamp_03-768x215.png 768w, https:\/\/www.webodesign.net\/wp-content\/uploads\/2022\/11\/inst_lamp_03.png 1034w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n<\/div><\/div><\/div><\/div>\n<\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-group has-border-color has-vivid-cyan-blue-border-color has-background is-layout-flow\" style=\"border-style:dotted;border-width:2px;border-radius:8px;background-color:#fffdf8;padding-right:7px;padding-bottom:15px;padding-left:7px\">\n<h3 class=\"has-text-color wp-block-heading\" id=\"3-iii-cr%C3%A9ation-dun-admin-pour-phpmyadmin\" style=\"color:#fffdf8;padding-top:0;padding-right:0;padding-bottom:0;padding-left:0;font-size:1px\">Installation de PHP<\/h3>\n\n\n\n<div class=\"qubely-block-accordion  qubely-block-d34844\" data-item-toggle=\"true\">\n<div class=\"wp-block-qubely-accordion-item qubely-block-e6f6f4\"><div class=\"qubely-accordion-item qubely-type-fill qubely-accordion-active\"><div class=\"qubely-accordion-panel qubely-icon-position-right\"><span class=\"qubely-accordion-panel-handler\" role=\"button\"><span class=\"qubely-accordion-panel-handler-label\">Installation de PHP<\/span><span class=\"qubely-accordion-icon fa fa-plus\"><\/span><\/span><\/div><div class=\"qubely-accordion-body\" style=\"display:block\"><div itemprop=\"text\">\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text\/x-sh&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;showPanel&quot;:false,&quot;language&quot;:&quot;Shell&quot;,&quot;modeName&quot;:&quot;shell&quot;}\">sudo apt-get install -y php<\/pre><\/div>\n\n\n\n<p>Installation de quelques paquets suppl\u00e9mentaires pour compl\u00e9ter l&rsquo;installation de PHP sur notre serveur. Par exemple, pour permettre les interactions entre PHP et notre instance MariaDB.<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text\/x-sh&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;showPanel&quot;:false,&quot;language&quot;:&quot;Shell&quot;,&quot;modeName&quot;:&quot;shell&quot;}\">sudo apt-get install -y php-pdo php-mysql php-zip php-gd php-mbstring php-curl php-xml php-pear php-bcmath php-imagick php-intl php-json\n\nphp -v <\/pre><\/div>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" loading=\"lazy\" width=\"601\" height=\"86\" src=\"https:\/\/www.webodesign.net\/wp-content\/uploads\/2022\/11\/inst_lamp_05.png\" alt=\"\" class=\"wp-image-1627\" srcset=\"https:\/\/www.webodesign.net\/wp-content\/uploads\/2022\/11\/inst_lamp_05.png 601w, https:\/\/www.webodesign.net\/wp-content\/uploads\/2022\/11\/inst_lamp_05-300x43.png 300w\" sizes=\"(max-width: 601px) 100vw, 601px\" \/><\/figure>\n\n\n\n<p>Pour v\u00e9rifier que l&rsquo;installation de la version de php est valide, on cr\u00e9\u00e9 un fichier phpinfo.php :<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text\/x-sh&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;showPanel&quot;:false,&quot;language&quot;:&quot;Shell&quot;,&quot;modeName&quot;:&quot;shell&quot;}\">sudo nano \/var\/www\/html\/phpinfo.php\t\n\/\/ dont le contenu est le suivant\u2026v\u00e9rification ci-dessous\n&lt;?php\nphpinfo();\n?&gt;<\/pre><\/div>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" loading=\"lazy\" width=\"1018\" height=\"333\" src=\"https:\/\/www.webodesign.net\/wp-content\/uploads\/2022\/11\/inst_lamp_06.png\" alt=\"\" class=\"wp-image-1628\" srcset=\"https:\/\/www.webodesign.net\/wp-content\/uploads\/2022\/11\/inst_lamp_06.png 1018w, https:\/\/www.webodesign.net\/wp-content\/uploads\/2022\/11\/inst_lamp_06-300x98.png 300w, https:\/\/www.webodesign.net\/wp-content\/uploads\/2022\/11\/inst_lamp_06-768x251.png 768w\" sizes=\"(max-width: 1018px) 100vw, 1018px\" \/><\/figure>\n\n\n\n<p>Cette page est utile uniquement pour v\u00e9rification, donc on la supprime.<\/p>\n\n\n\n<pre class=\"wp-block-code has-background-color has-text-color\" style=\"border-width:5px;border-radius:5px;padding-top:5px;padding-bottom:5px;padding-left:15px\"><code lang=\"bash\" class=\"language-bash line-numbers\"><\/code><\/pre>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text\/x-sh&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;showPanel&quot;:false,&quot;language&quot;:&quot;Shell&quot;,&quot;modeName&quot;:&quot;shell&quot;}\">sudo rm \/var\/www\/html\/phpinfo.php<\/pre><\/div>\n<\/div><\/div><\/div><\/div>\n<\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-group has-border-color has-vivid-cyan-blue-border-color has-background is-layout-flow\" style=\"border-style:dotted;border-width:2px;border-radius:8px;background-color:#fffdf8;padding-right:7px;padding-bottom:15px;padding-left:7px\">\n<h3 class=\"has-text-color wp-block-heading\" id=\"3-iii-cr%C3%A9ation-dun-admin-pour-phpmyadmin\" style=\"color:#fffdf8;padding-top:0;padding-right:0;padding-bottom:0;padding-left:0;font-size:1px\">Installation de mariadb<\/h3>\n\n\n\n<div class=\"qubely-block-accordion  qubely-block-d34844\" data-item-toggle=\"true\">\n<div class=\"wp-block-qubely-accordion-item qubely-block-86e288\"><div class=\"qubely-accordion-item qubely-type-fill qubely-accordion-active\"><div class=\"qubely-accordion-panel qubely-icon-position-right\"><span class=\"qubely-accordion-panel-handler\" role=\"button\"><span class=\"qubely-accordion-panel-handler-label\">Installation de mariadb<\/span><span class=\"qubely-accordion-icon fa fa-plus\"><\/span><\/span><\/div><div class=\"qubely-accordion-body\" style=\"display:block\"><div itemprop=\"text\">\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text\/x-sh&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;showPanel&quot;:false,&quot;language&quot;:&quot;Shell&quot;,&quot;modeName&quot;:&quot;shell&quot;}\">sudo apt-get install -y mariadb-server\nsudo mariadb -v<\/pre><\/div>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" loading=\"lazy\" width=\"707\" height=\"156\" src=\"https:\/\/www.webodesign.net\/wp-content\/uploads\/2022\/11\/inst_lamp_07.png\" alt=\"\" class=\"wp-image-1629\" srcset=\"https:\/\/www.webodesign.net\/wp-content\/uploads\/2022\/11\/inst_lamp_07.png 707w, https:\/\/www.webodesign.net\/wp-content\/uploads\/2022\/11\/inst_lamp_07-300x66.png 300w\" sizes=\"(max-width: 707px) 100vw, 707px\" \/><\/figure>\n\n\n\n<p>Suite \u00e0 l&rsquo;installation, ex\u00e9cuter le script \u00ab\u00a0mariadb-secure-installation\u00a0\u00bb afin de s\u00e9curiser un minimum l&rsquo;installation de MariaDB.<\/p>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-10\">\n<div class=\"wp-block-column is-layout-flow\" style=\"flex-basis:35%\">\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text\/x-sh&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;showPanel&quot;:false,&quot;language&quot;:&quot;Shell&quot;,&quot;modeName&quot;:&quot;shell&quot;}\">sudo mariadb-secure-installation<\/pre><\/div>\n\n\n\n<p>En r\u00e9sum\u00e9, on va pouvoir d\u00e9finir un mot de passe pour le compte \u00ab\u00a0root\u00a0\u00bb de MariaDB, emp\u00eacher les connexions distantes sur notre instance \u00e0 l&rsquo;aide du compte \u00ab\u00a0root\u00a0\u00bb, emp\u00eacher les connexions anonymes et supprimer la base de test.<\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow\">\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" loading=\"lazy\" width=\"678\" height=\"333\" src=\"https:\/\/www.webodesign.net\/wp-content\/uploads\/2022\/11\/inst_lamp_08.png\" alt=\"\" class=\"wp-image-1630\" srcset=\"https:\/\/www.webodesign.net\/wp-content\/uploads\/2022\/11\/inst_lamp_08.png 678w, https:\/\/www.webodesign.net\/wp-content\/uploads\/2022\/11\/inst_lamp_08-300x147.png 300w\" sizes=\"(max-width: 678px) 100vw, 678px\" \/><\/figure>\n<\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-13\">\n<div class=\"wp-block-column is-layout-flow\" style=\"flex-basis:35%\">\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" loading=\"lazy\" width=\"684\" height=\"911\" src=\"https:\/\/www.webodesign.net\/wp-content\/uploads\/2022\/11\/inst_lamp_09.png\" alt=\"\" class=\"wp-image-1631\" srcset=\"https:\/\/www.webodesign.net\/wp-content\/uploads\/2022\/11\/inst_lamp_09.png 684w, https:\/\/www.webodesign.net\/wp-content\/uploads\/2022\/11\/inst_lamp_09-225x300.png 225w\" sizes=\"(max-width: 684px) 100vw, 684px\" \/><\/figure>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow\">\n<ul>\n<li>On a pas encore configur\u00e9 MariaDB donc on valide [Entrer]<\/li>\n\n\n\n<li>Et on ne bascule pas sur l&rsquo;authentification unix_socket \u00e0 [n]<\/li>\n\n\n\n<li>Enfin on indique que l&rsquo;on veut changer le mot de passe root \u00e0 [Y]<br>Entrer le mot de passe (puis confirmer)<\/li>\n\n\n\n<li>Remove anonymous users ? [Y]<\/li>\n\n\n\n<li>Disallow root login remotely ? [Y]<\/li>\n\n\n\n<li>Remove test database and access to it ? [Y]<\/li>\n\n\n\n<li>Reload priviledge tables now ? [Y] (recharge de l&rsquo;ensemble des privil\u00e8ges)<\/li>\n<\/ul>\n<\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-16\">\n<div class=\"wp-block-column is-layout-flow\" style=\"flex-basis:35%\">\n<p>On a termin\u00e9 l&rsquo;installation minimaliste de notre instance MariaDB. Pour v\u00e9rifier que l&rsquo;on a bien acc\u00e8s \u00e0 notre instance de MariaDB on saisi :<\/p>\n\n\n\n<pre class=\"wp-block-code has-background-color has-text-color\" style=\"border-width:5px;border-radius:5px;padding-top:5px;padding-bottom:5px;padding-left:15px\"><code lang=\"bash\" class=\"language-bash line-numbers\">sudo mysql -u root -p<\/code><\/pre>\n\n\n\n<p>&#8230; puis on entre le mot de passe root.<\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow\">\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" loading=\"lazy\" width=\"709\" height=\"187\" src=\"https:\/\/www.webodesign.net\/wp-content\/uploads\/2022\/11\/inst_lamp_11.png\" alt=\"\" class=\"wp-image-1632\" srcset=\"https:\/\/www.webodesign.net\/wp-content\/uploads\/2022\/11\/inst_lamp_11.png 709w, https:\/\/www.webodesign.net\/wp-content\/uploads\/2022\/11\/inst_lamp_11-300x79.png 300w\" sizes=\"(max-width: 709px) 100vw, 709px\" \/><\/figure>\n<\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-19\">\n<div class=\"wp-block-column is-layout-flow\" style=\"flex-basis:35%\">\n<p>Et on v\u00e9rifie que l&rsquo;on a bien acc\u00e8s \u00e0 la base de donn\u00e9es :<\/p>\n\n\n\n<pre class=\"wp-block-code has-background-color has-text-color\" style=\"border-width:5px;border-radius:5px;padding-top:5px;padding-bottom:5px;padding-left:15px\"><code lang=\"bash\" class=\"language-bash line-numbers\">show databases;<\/code><\/pre>\n\n\n\n<p>On voit affich\u00e9 la liste les bases de donn\u00e9es par d\u00e9faut de MariaDB<\/p>\n\n\n\n<p>On entre\u2026<\/p>\n\n\n\n<pre class=\"wp-block-code has-background-color has-text-color\" style=\"border-width:5px;border-radius:5px;padding-top:5px;padding-bottom:5px;padding-left:15px\"><code lang=\"bash\" class=\"language-bash line-numbers\">exit<\/code><\/pre>\n\n\n\n<p>\u2026 pour quitter la console et on termine par \u2026<\/p>\n\n\n\n<pre class=\"wp-block-code has-background-color has-text-color\" style=\"border-width:5px;border-radius:5px;padding-top:5px;padding-bottom:5px;padding-left:15px\"><code lang=\"bash\" class=\"language-bash line-numbers\">systemctl restart mariadb<\/code><\/pre>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow\">\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" loading=\"lazy\" width=\"309\" height=\"192\" src=\"https:\/\/www.webodesign.net\/wp-content\/uploads\/2022\/11\/inst_lamp_12.png\" alt=\"\" class=\"wp-image-1633\" srcset=\"https:\/\/www.webodesign.net\/wp-content\/uploads\/2022\/11\/inst_lamp_12.png 309w, https:\/\/www.webodesign.net\/wp-content\/uploads\/2022\/11\/inst_lamp_12-300x186.png 300w\" sizes=\"(max-width: 309px) 100vw, 309px\" \/><\/figure>\n<\/div>\n<\/div>\n\n\n\n<p><\/p>\n<\/div><\/div><\/div><\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow\" style=\"flex-basis:22%\">\n\n<div class=\"cleanlogin-container\">\t\t\n\n\t<form class=\"cleanlogin-form\" method=\"post\" action=\"https:\/\/www.webodesign.net\/?page_id=2385\" onsubmit=\"submit.disabled = true; return true;\">\n\t\t\t\n\t\t<fieldset>\n\n\t\t\t\t\t\t<div class=\"cleanlogin-field\">\n                <label for=\"log\">Identifiant<\/label>\n\t\t\t\t<input class=\"cleanlogin-field-username\" type=\"text\" name=\"log\" placeholder=\"Identifiant\" aria-label=\"Identifiant\">\n\t\t\t<\/div>\n\t\t\t\n\t\t\t<div class=\"cleanlogin-field\">\n                <label for=\"pwd\">Mot de passe<\/label>\n\t\t\t\t<input class=\"cleanlogin-field-password\" type=\"password\" id=\"pwd\" name=\"pwd\" placeholder=\"Mot de passe\" aria-label=\"Mot de passe\">\n                <i class=\"bi bi-eye-slash\" id=\"togglePassword\"><\/i>\n\t\t\t<\/div>\n\n\t\t\t\t\t\n\t\t\t<input type=\"hidden\" name=\"clean_login_wpnonce\" value=\"e994c14fba\">\n            \n\t\t\t\t\t<\/fieldset>\n\t\t\n\t\t<fieldset>\n\t\t\t<input class=\"cleanlogin-field\" type=\"submit\" value=\"Se connecter\" name=\"submit\">\n\t\t\t<input type=\"hidden\" name=\"action\" value=\"login\">\n\t\t\t\n\t\t\t<div class=\"cleanlogin-field cleanlogin-field-remember\">\n\t\t\t\t<input type=\"checkbox\" id=\"rememberme\" name=\"rememberme\" value=\"forever\">\n\t\t\t\t<label for=\"rememberme\">Se souvenir de moi\u00a0?<\/label>\n\t\t\t<\/div>\n\t\t<\/fieldset>\n\n\t\t\n\t\t<div class=\"cleanlogin-form-bottom\">\n\t\t\t\n            \n\t\t\t\t\t\t\t\t\t\n\t\t<\/div>\n\t\t\n\t<\/form>\n\n<\/div>\n\n<script>\nconst togglePassword = document.querySelector('#togglePassword');\nconst password = document.querySelector('#pwd');\n\ntogglePassword.addEventListener('click', function (e) {\n    const type = password.getAttribute('type') === 'password' ? 'text' : 'password';\n    password.setAttribute('type', type);\n    this.classList.toggle('bi-eye');\n});\n<\/script>\n<\/div>\n<\/div>\n<\/div><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Installation d&rsquo;un serveur LAMPL:Linux \/ A:Apache \/ M:MariaDB \/ P:PHP Installation et configuration du serveur Apache Installation de PHP Installation de mariadb<\/p>\n","protected":false},"author":3,"featured_media":1778,"parent":658,"menu_order":5,"comment_status":"closed","ping_status":"closed","template":"","meta":{"qubely_global_settings":"","qubely_interactions":"","_uag_custom_page_level_css":""},"uagb_featured_image_src":{"full":["https:\/\/www.webodesign.net\/wp-content\/uploads\/2022\/12\/install-lamp-server.png",940,490,false],"thumbnail":["https:\/\/www.webodesign.net\/wp-content\/uploads\/2022\/12\/install-lamp-server-150x150.png",150,150,true],"medium":["https:\/\/www.webodesign.net\/wp-content\/uploads\/2022\/12\/install-lamp-server-300x156.png",300,156,true],"medium_large":["https:\/\/www.webodesign.net\/wp-content\/uploads\/2022\/12\/install-lamp-server-768x400.png",768,400,true],"large":["https:\/\/www.webodesign.net\/wp-content\/uploads\/2022\/12\/install-lamp-server.png",940,490,false],"1536x1536":["https:\/\/www.webodesign.net\/wp-content\/uploads\/2022\/12\/install-lamp-server.png",940,490,false],"2048x2048":["https:\/\/www.webodesign.net\/wp-content\/uploads\/2022\/12\/install-lamp-server.png",940,490,false],"qubely_landscape":["https:\/\/www.webodesign.net\/wp-content\/uploads\/2022\/12\/install-lamp-server.png",940,490,false],"qubely_portrait":["https:\/\/www.webodesign.net\/wp-content\/uploads\/2022\/12\/install-lamp-server-540x320.png",540,320,true],"qubely_thumbnail":["https:\/\/www.webodesign.net\/wp-content\/uploads\/2022\/12\/install-lamp-server-140x100.png",140,100,true]},"uagb_author_info":{"display_name":"R\u00e9mi","author_link":"https:\/\/www.webodesign.net\/?author=3"},"uagb_comment_info":0,"uagb_excerpt":"Installation d&rsquo;un serveur LAMPL:Linux \/ A:Apache \/ M:MariaDB \/ P:PHP Installation et configuration du serveur Apache Installation de PHP Installation de mariadb","_links":{"self":[{"href":"https:\/\/www.webodesign.net\/index.php?rest_route=\/wp\/v2\/pages\/1615"}],"collection":[{"href":"https:\/\/www.webodesign.net\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.webodesign.net\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.webodesign.net\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.webodesign.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1615"}],"version-history":[{"count":12,"href":"https:\/\/www.webodesign.net\/index.php?rest_route=\/wp\/v2\/pages\/1615\/revisions"}],"predecessor-version":[{"id":2167,"href":"https:\/\/www.webodesign.net\/index.php?rest_route=\/wp\/v2\/pages\/1615\/revisions\/2167"}],"up":[{"embeddable":true,"href":"https:\/\/www.webodesign.net\/index.php?rest_route=\/wp\/v2\/pages\/658"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.webodesign.net\/index.php?rest_route=\/wp\/v2\/media\/1778"}],"wp:attachment":[{"href":"https:\/\/www.webodesign.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1615"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}