{"id":2546,"date":"2016-09-01T18:57:50","date_gmt":"2016-09-01T16:57:50","guid":{"rendered":"http:\/\/blog.nebule.org\/?page_id=2546"},"modified":"2019-05-12T20:07:24","modified_gmt":"2019-05-12T18:07:24","slug":"linux-debian-8","status":"publish","type":"page","link":"http:\/\/blog.nebule.org\/?page_id=2546","title":{"rendered":"Linux Debian 8"},"content":{"rendered":"<h1>Installation Linux Debian 8<\/h1>\n<p>Date : 30\/08\/2016<br \/>\nOS : Linux <a title=\"Debian\" href=\"http:\/\/www.debian.org\/\" target=\"_blank\">Debian<\/a> 8 &lsquo;Jessie&rsquo; oldstable<br \/>\nD\u00e9p\u00f4ts : main<br \/>\nServeur web : Apache 2.4.10<br \/>\nLangage : PHP 5.6.7<br \/>\nVersion : 020161102<br \/>\nStatus : en cours.<br \/>\nServeur : <a title=\"debian8.test.nebule.net\" href=\"http:\/\/debian8.test.nebule.net\" target=\"_blank\">debian8.test.nebule.net<\/a> (RAM:256Mo DD:2+2Go)<\/p>\n<h2>Introduction<\/h2>\n<p style=\"text-align: justify;\">L&rsquo;installation du syst\u00e8me d&rsquo;exploitation se fait classiquement sans particularit\u00e9. Le r\u00e9seau <span style=\"text-decoration: underline;\">doit<\/span> \u00eatre fonctionnel, les derni\u00e8res mises \u00e0 jours <span style=\"text-decoration: underline;\">doivent<\/span> \u00eatre appliqu\u00e9es (normalement fait au cours de l&rsquo;installation).<\/p>\n<p style=\"text-align: justify;\">Le serveur ne <span style=\"text-decoration: underline;\">doit pas<\/span> d\u00e9j\u00e0 contenir d&rsquo;autre site web, sinon il faut adapter la configuration.<\/p>\n<p style=\"text-align: justify;\">Sur un serveur qui va recevoir beaucoup d&rsquo;objets, on <span style=\"text-decoration: underline;\">peut<\/span> s\u00e9parer <code>\/var\/www<\/code> sur une partition ou un disque d\u00e9di\u00e9 et cons\u00e9quent.<\/p>\n<h2 style=\"text-align: justify;\">Installation version condens\u00e9e<\/h2>\n<p style=\"text-align: justify;\">Lancer en tant que <em>root<\/em> :<\/p>\n<p style=\"text-align: justify; padding-left: 30px;\"><code>aptitude install -y libapache2-mod-php5 php5-gd<br \/>\nURL=\"http:\/\/sylabe.com\/o\/871d0e2a2dd623da97e0cc5ca313a56e1a55a410d2b5f9b69042379f4222f189\"<br \/>\nwget $URL -O \/root\/020161102.nebule.full.tgz<br \/>\ntar zxf \/root\/020161102.nebule.full.tgz -C \/var\/www\/html<br \/>\nrm \/var\/www\/html\/index.html<br \/>\ncat &gt; \/etc\/apache2\/sites-available\/000-default.conf &lt;&lt; EOF<br \/>\n&lt;VirtualHost *:80&gt;<br \/>\nServerAdmin webmaster@localhost<br \/>\nDocumentRoot \/var\/www\/html<br \/>\nphp_value max_execution_time 300<br \/>\nphp_value upload_max_filesize 2M<br \/>\nphp_value post_max_size 2M<br \/>\nErrorLog \\${APACHE_LOG_DIR}\/error.log<br \/>\nCustomLog \\${APACHE_LOG_DIR}\/access.log combined<br \/>\n&lt;\/VirtualHost&gt;<br \/>\nEOF<br \/>\ncat &gt; \/etc\/apache2\/sites-available\/default-ssl.conf &lt;&lt; EOF<br \/>\n&lt;VirtualHost *:443&gt;<br \/>\nServerAdmin webmaster@localhost<br \/>\nDocumentRoot \/var\/www\/html<br \/>\nphp_value max_execution_time 300<br \/>\nphp_value upload_max_filesize 2M<br \/>\nphp_value post_max_size 2M<br \/>\nErrorLog \\${APACHE_LOG_DIR}\/error.log<br \/>\nCustomLog \\${APACHE_LOG_DIR}\/access.log combined<br \/>\nSSLEngine On<br \/>\nSSLCertificateFile \/etc\/ssl\/private\/localhost.nebule.crt<br \/>\n&lt;\/VirtualHost&gt;<br \/>\nEOF<br \/>\nmake-ssl-cert \/usr\/share\/ssl-cert\/ssleay.cnf \/etc\/ssl\/private\/localhost.nebule.crt<br \/>\na2enmod ssl<br \/>\na2enmod php5<br \/>\na2ensite default-ssl.conf<br \/>\nservice apache2 restart<br \/>\nchown -R 33.33 \/var\/www\/html<br \/>\nchmod -R u+rw \/var\/www\/html<\/code><\/p>\n<p style=\"text-align: justify;\">Dans un navigateur, ouvrir l&rsquo;adresse du serveur et attendre la fin de la phase de pr\u00e9paration&#8230;<br \/>\n<img decoding=\"async\" loading=\"lazy\" class=\"alignnone wp-image-1313\" src=\"\/wp-content\/uploads\/nebule\/2012\/10\/li2.png\" alt=\"li\" width=\"16\" height=\"16\" \/>\u00c2\u00a0<img decoding=\"async\" loading=\"lazy\" class=\"alignnone wp-image-2781\" src=\"\/wp-content\/uploads\/nebule\/2016\/09\/process-stop.png\" alt=\"process-stop\" width=\"16\" height=\"16\" srcset=\"\/wp-content\/uploads\/nebule\/2016\/09\/process-stop.png 256w, \/wp-content\/uploads\/nebule\/2016\/09\/process-stop-150x150.png 150w\" sizes=\"(max-width: 16px) 100vw, 16px\" \/> Noter en bas le mot de passe de l&rsquo;entit\u00e9 de l&rsquo;instance du serveur.<\/p>\n<p style=\"text-align: justify;\">Lancer en tant que <em>root<\/em> :<\/p>\n<p style=\"text-align: justify; padding-left: 30px;\"><code>chown 0.0 \/var\/www\/html<br \/>\nchmod 755 \/var\/www\/html<br \/>\nchown 0.0 \/var\/www\/html\/index.php<br \/>\nchmod 644 \/var\/www\/html\/index.php<br \/>\nchown 0.0 \/var\/www\/html\/nebule.env<br \/>\nchmod 644 \/var\/www\/html\/nebule.env<br \/>\nchown 0.0 \/var\/www\/html\/e<br \/>\nchmod 644 \/var\/www\/html\/e<br \/>\necho \"defaultCurrentEntity = \"$(cat \/var\/www\/html\/e) &gt;&gt; \/var\/www\/html\/nebule.env<\/code><\/p>\n<p style=\"text-align: justify;\">&#8230;<\/p>\n<h2 style=\"text-align: justify;\">Installation version pas \u00e0 pas<\/h2>\n<h3 style=\"text-align: justify;\"><code>[a]<\/code> Service web<\/h3>\n<p style=\"text-align: justify;\">Le bootstrap et la librairie ont besoin pour fonctionner correctement de :<\/p>\n<ul>\n<li style=\"text-align: justify;\">Un serveur web.<\/li>\n<li style=\"text-align: justify;\">Un interpr\u00e9teur PHP.<\/li>\n<li style=\"text-align: justify;\">La librairie GD de PHP.<\/li>\n<\/ul>\n<p style=\"text-align: justify;\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone wp-image-1313\" src=\"\/wp-content\/uploads\/nebule\/2012\/10\/li2.png\" alt=\"li\" width=\"16\" height=\"16\" \/>\u00c2\u00a0D&rsquo;autres serveurs web que Apache2 sont normalement fonctionnels mais n&rsquo;ont pas \u00e9t\u00e9 test\u00e9s.<\/p>\n<p style=\"text-align: justify;\">Installation des paquets :<br \/>\n<code># aptitude install libapache2-mod-php5 php5-gd<\/code><\/p>\n<h3 style=\"text-align: justify;\"><code>[b]<\/code> T\u00e9l\u00e9chargement<\/h3>\n<p style=\"text-align: justify;\">T\u00e9l\u00e9charger sur le serveur l&rsquo;archive compl\u00e8te :<br \/>\n<code># URL=\"http:\/\/sylabe.com\/o\/871d0e2a2dd623da97e0cc5ca313a56e1a55a410d2b5f9b69042379f4222f189\"<br \/>\n# wget $URL -O \/root\/020161102.nebule.full.tgz<br \/>\n# sha256sum \/root\/<\/code><code>020161102.nebule.full.tgz<\/code><\/p>\n<p style=\"text-align: justify;\">Le r\u00e9sultat du hash sha256 <span style=\"text-decoration: underline;\">doit<\/span> \u00eatre imp\u00e9rativement \u00e9gale strictement \u00e0 :<\/p>\n<p style=\"text-align: center;\"><span style=\"color: #800000;\"><code>871d0e2a2dd623da97e0cc5ca313a56e1a55a410d2b5f9b69042379f4222f189<\/code><\/span><\/p>\n<p style=\"text-align: justify;\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone wp-image-1313\" src=\"\/wp-content\/uploads\/nebule\/2012\/10\/li2.png\" alt=\"li\" width=\"16\" height=\"16\" \/> Il est important de v\u00e9rifier la valeur de cette empreinte. Si elle ne correspond pas il faut <span style=\"text-decoration: underline;\">imp\u00e9rativement<\/span> re-t\u00e9l\u00e9charger le fichier. Cela est d\u00fc \u00e0 une corruption (volontaire ou non) du contenu du fichier. Le t\u00e9l\u00e9chargement peut se faire sur un autre site web tant que la valeur de la signature est strictement identique.<\/p>\n<h3 style=\"text-align: justify;\"><code>[c]<\/code> D\u00e9compression<\/h3>\n<p style=\"text-align: justify;\">Le contenu du fichier t\u00e9l\u00e9charg\u00e9 va \u00eatre mis en place dans l&rsquo;arborescence d\u00e9di\u00e9e au service web <code>\/var\/www\/html<\/code>.<\/p>\n<p style=\"text-align: justify;\">Les applications pouvant avec le temps devenir grosses consommatrices d&rsquo;espace disque, il est pr\u00e9f\u00e9rable d\u00e8s l&rsquo;installation du syst\u00e8me d&rsquo;exploitation de r\u00e9server une partition d\u00e9di\u00e9e au service web (<code>\/var\/www<\/code>). Cette s\u00e9paration permettra en cas de saturation de l&rsquo;espace disque de ne pas perturber le fonctionnement du syst\u00e8me d&rsquo;exploitation.<\/p>\n<p style=\"text-align: justify;\">D\u00e9compresser l&rsquo;archive dans le dossier de destination :<br \/>\n<code># tar zxf \/root\/020161102.nebule.full.tgz -C \/var\/www\/html<br \/>\n#\u00c2\u00a0rm \/var\/www\/html\/index.html <\/code><\/p>\n<h3 style=\"text-align: justify;\"><code>[d]<\/code> Modification du site web<\/h3>\n<p style=\"text-align: justify;\">Le site web par d\u00e9faut doit \u00eatre modifi\u00e9, on le remplace par facilit\u00e9 :<br \/>\n<code># cat &gt; \/etc\/apache2\/sites-available\/000-default.conf &lt;&lt; EOF<br \/>\n&lt;VirtualHost *:80&gt;<br \/>\nServerAdmin webmaster@localhost<br \/>\nDocumentRoot \/var\/www\/html<br \/>\nphp_value max_execution_time 300<br \/>\nphp_value upload_max_filesize 2M<br \/>\nphp_value post_max_size 2M<br \/>\nErrorLog \\${APACHE_LOG_DIR}\/error.log<br \/>\nCustomLog \\${APACHE_LOG_DIR}\/access.log combined<br \/>\n&lt;\/VirtualHost&gt;<br \/>\nEOF<br \/>\n# cat &gt; \/etc\/apache2\/sites-available\/default-ssl.conf &lt;&lt; EOF<br \/>\n&lt;VirtualHost *:443&gt;<br \/>\nServerAdmin webmaster@localhost<br \/>\nDocumentRoot \/var\/www\/html<br \/>\nphp_value max_execution_time 300<br \/>\nphp_value upload_max_filesize 2M<br \/>\nphp_value post_max_size 2M<br \/>\nErrorLog \\${APACHE_LOG_DIR}\/error.log<br \/>\nCustomLog \\${APACHE_LOG_DIR}\/access.log combined<br \/>\nSSLEngine On<br \/>\nSSLCertificateFile \/etc\/ssl\/private\/localhost.nebule.crt<br \/>\n&lt;\/VirtualHost&gt;<br \/>\nEOF<br \/>\n# make-ssl-cert \/usr\/share\/ssl-cert\/ssleay.cnf \/etc\/ssl\/private\/localhost.nebule.crt<br \/>\n# a2enmod ssl<br \/>\n# a2enmod php5<br \/>\n# a2ensite default-ssl.conf<br \/>\n# service apache2 restart<\/code><\/p>\n<p style=\"text-align: justify;\">Les deux fichiers modifi\u00e9s peuvent \u00eatre adapt\u00e9s \u00e0 posteriori pour vos propres besoins.<\/p>\n<h3 style=\"text-align: justify;\"><code>[e]<\/code> Augmentation des droits<\/h3>\n<p style=\"text-align: justify;\">Modifier les droits du dossier du serveur web :<br \/>\n<code># chown -R 33.33 \/var\/www\/html<br \/>\n# chmod -R u+rw \/var\/www\/html<\/code><\/p>\n<h3 style=\"text-align: justify;\"><code>[f]<\/code> Premier lancement<\/h3>\n<p style=\"text-align: justify;\">Dans un navigateur, ouvrir l&rsquo;adresse du serveur <a title=\"Mon site web ou son adresse IP.\" href=\"http:\/\/monsiteweb\/\" target=\"_blank\">http:\/\/monsiteweb\/<\/a> et attendre la fin de la phase de pr\u00e9paration. \u00c7a peut \u00eatre long, il y a plusieurs \u00e9tapes et rechargements de la page&#8230;<\/p>\n<p style=\"text-align: center;\"><a href=\"\/wp-content\/uploads\/nebule\/2016\/09\/shot-2016-11-03_13-18-33.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-medium wp-image-2747\" src=\"\/wp-content\/uploads\/nebule\/2016\/09\/shot-2016-11-03_13-18-33-600x301.png\" alt=\"shot-2016-11-03_13-18-33\" width=\"600\" height=\"301\" srcset=\"\/wp-content\/uploads\/nebule\/2016\/09\/shot-2016-11-03_13-18-33-600x301.png 600w, \/wp-content\/uploads\/nebule\/2016\/09\/shot-2016-11-03_13-18-33-1024x514.png 1024w, \/wp-content\/uploads\/nebule\/2016\/09\/shot-2016-11-03_13-18-33.png 1920w\" sizes=\"(max-width: 600px) 100vw, 600px\" \/><\/a><br \/>\n<em>Bugg connu du bootstrap. Faire [F5] ou recharger la page pour continuer.<\/em><\/p>\n<p style=\"text-align: center;\"><a href=\"\/wp-content\/uploads\/nebule\/2016\/09\/shot-2016-11-03_13-18-43.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-medium wp-image-2748\" src=\"\/wp-content\/uploads\/nebule\/2016\/09\/shot-2016-11-03_13-18-43-600x301.png\" alt=\"shot-2016-11-03_13-18-43\" width=\"600\" height=\"301\" srcset=\"\/wp-content\/uploads\/nebule\/2016\/09\/shot-2016-11-03_13-18-43-600x301.png 600w, \/wp-content\/uploads\/nebule\/2016\/09\/shot-2016-11-03_13-18-43-1024x514.png 1024w, \/wp-content\/uploads\/nebule\/2016\/09\/shot-2016-11-03_13-18-43.png 1920w\" sizes=\"(max-width: 600px) 100vw, 600px\" \/><\/a><br \/>\n<em>Bugg connu du bootstrap. Si les droits ont bien \u00e9t\u00e9 pos\u00e9s, faire [F5] ou recharger la page pour continuer.<\/em><\/p>\n<p style=\"text-align: center;\"><a href=\"\/wp-content\/uploads\/nebule\/2016\/09\/shot-2016-11-03_13-18-54.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-medium wp-image-2749\" src=\"\/wp-content\/uploads\/nebule\/2016\/09\/shot-2016-11-03_13-18-54-600x301.png\" alt=\"shot-2016-11-03_13-18-54\" width=\"600\" height=\"301\" srcset=\"\/wp-content\/uploads\/nebule\/2016\/09\/shot-2016-11-03_13-18-54-600x301.png 600w, \/wp-content\/uploads\/nebule\/2016\/09\/shot-2016-11-03_13-18-54-1024x514.png 1024w, \/wp-content\/uploads\/nebule\/2016\/09\/shot-2016-11-03_13-18-54.png 1920w\" sizes=\"(max-width: 600px) 100vw, 600px\" \/><\/a><br \/>\n<em>Informations importantes !<\/em><\/p>\n<p style=\"text-align: justify;\"><img decoding=\"async\" loading=\"lazy\" class=\"alignleft wp-image-1313\" src=\"\/wp-content\/uploads\/nebule\/2012\/10\/li2.png\" alt=\"li\" width=\"32\" height=\"32\" \/><img decoding=\"async\" loading=\"lazy\" class=\" wp-image-2781 alignleft\" src=\"\/wp-content\/uploads\/nebule\/2016\/09\/process-stop.png\" alt=\"process-stop\" width=\"32\" height=\"32\" srcset=\"\/wp-content\/uploads\/nebule\/2016\/09\/process-stop.png 256w, \/wp-content\/uploads\/nebule\/2016\/09\/process-stop-150x150.png 150w\" sizes=\"(max-width: 32px) 100vw, 32px\" \/> Noter en bas le mot de passe de l&rsquo;entit\u00e9 de l&rsquo;instance du serveur.<br \/>\nCette entit\u00e9 permettra par la suite de modifier les options (et les applications plus tard).<\/p>\n<p style=\"text-align: center;\"><a href=\"\/wp-content\/uploads\/nebule\/2016\/09\/shot-2016-11-03_13-20-171.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-medium wp-image-2751\" src=\"\/wp-content\/uploads\/nebule\/2016\/09\/shot-2016-11-03_13-20-171-600x301.png\" alt=\"shot-2016-11-03_13-20-17\" width=\"600\" height=\"301\" srcset=\"\/wp-content\/uploads\/nebule\/2016\/09\/shot-2016-11-03_13-20-171-600x301.png 600w, \/wp-content\/uploads\/nebule\/2016\/09\/shot-2016-11-03_13-20-171-1024x514.png 1024w, \/wp-content\/uploads\/nebule\/2016\/09\/shot-2016-11-03_13-20-171.png 1920w\" sizes=\"(max-width: 600px) 100vw, 600px\" \/><\/a><br \/>\n<em> Le serveur est pr\u00eat.<\/em><\/p>\n<h3 style=\"text-align: justify;\"><code>[g]<\/code> R\u00e9duction des droits<\/h3>\n<p style=\"text-align: justify;\">Modifier les droits du dossier du serveur web ainsi que de certains fichiers :<br \/>\n<code># chown 0.0 \/var\/www\/html<br \/>\n# chmod 755 \/var\/www\/html<br \/>\n# chown 0.0 \/var\/www\/html\/index.php<br \/>\n# chmod 644 \/var\/www\/html\/index.php<br \/>\n# chown 0.0 \/var\/www\/html\/nebule.env<br \/>\n# chmod 644 \/var\/www\/html\/nebule.env<br \/>\n# chown 0.0 \/var\/www\/html\/e<br \/>\n# chmod 644 \/var\/www\/html\/e<\/code><\/p>\n<h3 style=\"text-align: justify;\"><code>[h]<\/code> Reconnaissance du certificat du serveur web<\/h3>\n<p style=\"text-align: justify;\">&#8230;<\/p>\n<h3 style=\"text-align: justify;\"><code>[i]<\/code> Changement des options<\/h3>\n<p style=\"text-align: justify;\">Ajouter l&rsquo;entit\u00e9 du serveur comme entit\u00e9 par d\u00e9faut. Il faut modifier l&rsquo;option defaultCurrentEntity dans le fichier nebule.env :<br \/>\n<code># echo \"defaultCurrentEntity = \"$(cat \/var\/www\/html\/e) &gt;&gt; \/var\/www\/html\/nebule.env<\/code><br \/>\nRecharger la page web avec l&rsquo;argument <code>f<\/code> pour que la modification soit appliqu\u00e9e. Par exemple <a title=\"Mon site web ou son adresse IP.\" href=\"http:\/\/monsiteweb\/.f\" target=\"_blank\">http:\/\/monsiteweb\/?f<\/a><\/p>\n<p style=\"text-align: justify;\">&#8230;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Installation Linux Debian 8 Date : 30\/08\/2016 OS : Linux Debian 8 &lsquo;Jessie&rsquo; oldstable D\u00e9p\u00f4ts : main Serveur web : Apache 2.4.10 Langage : PHP 5.6.7 Version : 020161102 Status : en cours. Serveur : debian8.test.nebule.net (RAM:256Mo DD:2+2Go) Introduction L&rsquo;installation du syst\u00e8me d&rsquo;exploitation se fait classiquement sans particularit\u00e9. Le r\u00e9seau doit \u00eatre fonctionnel, les derni\u00e8res &hellip; <a href=\"http:\/\/blog.nebule.org\/?page_id=2546\" class=\"more-link\">Continuer la lecture de <span class=\"screen-reader-text\">Linux Debian 8<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"parent":2535,"menu_order":1,"comment_status":"open","ping_status":"open","template":"","meta":[],"_links":{"self":[{"href":"http:\/\/blog.nebule.org\/index.php?rest_route=\/wp\/v2\/pages\/2546"}],"collection":[{"href":"http:\/\/blog.nebule.org\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"http:\/\/blog.nebule.org\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"http:\/\/blog.nebule.org\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/blog.nebule.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2546"}],"version-history":[{"count":36,"href":"http:\/\/blog.nebule.org\/index.php?rest_route=\/wp\/v2\/pages\/2546\/revisions"}],"predecessor-version":[{"id":3164,"href":"http:\/\/blog.nebule.org\/index.php?rest_route=\/wp\/v2\/pages\/2546\/revisions\/3164"}],"up":[{"embeddable":true,"href":"http:\/\/blog.nebule.org\/index.php?rest_route=\/wp\/v2\/pages\/2535"}],"wp:attachment":[{"href":"http:\/\/blog.nebule.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2546"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}