Installer un Serveur Web sur un Réseau Local

Etape 1 : Installation du Système Linux DEBIAN

  1. Installer Debian à partir d’un CD “NetInst” version “Stable” ou “Old-Stable” (si 32bits)
  2. $ su   (pour passer en root)
  3. Vérifier /etc/apt/sources/list :
    1. deb http://ftp.fr.debian.org/debian/ jessie main contrib non-free  
      deb http://security.debian.org/ jessie/updates main
      deb http://ftp.fr.debian.org/debian/ jessie-updates main 
  4. # apt-get update && apt-get upgrade
  5. # apt-get install synaptic
  6. # apt-get install intel-microcode (si Microproc Intel ?   apt-get install inxi )
  7. #  apt-get install zip unzip
  8. journalctl -xb | grep -i error (pour corriger éventuelt install de certains drivers/pilotes)

Etape 2 : Installation du Serveur Web
Installation inspirée de l’article :  creating-your-own-webserver-and-hosting-a-website-from-your-linux-box

Installer Apache + PHP + PhpMySQL

# apt-get install apache2
# apt-cache policy apache2    (pour connaître la version des modules installés)
# apache2ctl configtest           (OK ?)
# more  /etc/apache2/apache2.conf   ( ou mieux : grep -v ‘#’  /etc/apache2/apache2.conf )
# service apache2 start            (démarrer le serveur web)

Tester l’accès au serveur web : On doit voir l’écran d’accueil Apache (en logo de cette page)
ifconfig
    (nous donne notre adresse IP locale : Exemple 172.20.0.66)
– Sur le serveur : Ouvrir un navigateur web et saisir l’adresse : http://localhost  ou http://127.0.0.1
– Sur un autre ordinateur : http://172.20.0.66

# apt-get install mysql-server      ( … saisir le mot de passe x 2)
(option: on peut éventuelt installer ‘mysql-client’ si on veut tester sur le serveur ?)
# whereis mysql
# service mysql start
# service mysql status

# apt-get install phpmyadmin   (installe Php :  … sélectionner Apache  … saisie de mots de passe)

install-phpmyadmin-1sur2

install-phpmyadmin-2sur2

Ecrire une 1ere page web :
# cd /var/www/html
# nano info.php

<?php
phpinfo ();
?>

et tester à l’adresse http://localhost/info.php

Installer un CMS :

  • WordPress : dans /var/www/html/wp
  • Drupal :  dans /var/www/html/drupal
  • Joomla : dans /var/www/html/joomla
  • SPIP :   dans /var/www/html/spip

Télécharger WordPress en Français : https://fr.wordpress.org
# cd Téléchargements
# unzip wordpress-4.*FR.zip   (décompresser hors /var/www car cela donne parfois des fichiers un peu partout !)
# cd wordpress
# mkdir /var/www/html/wp
# cp * -R /var/www/html/wp

Télécharger Joomla en Français : joomla-3-0-package-d-installation-et-patchs
cd Téléchargements
# unzip Joom*zip

# mkdir /var/www/html/joomla
# cp * -R /var/www/html/joomla

Télécharger Drupal en Français : http://www.drupal.fr
cd Téléchargements
# unzip drupal*zip

# mkdir /var/www/html/drupal
# cp * -R /var/www/html/drupal

Pour SPIP :
1. Installer la même version que celle en ligne : Télécharger SPIP selon versions
– Aller dans le BackOffice du site www.hitec.fr
– Lien en bas de page = SPIP 3.0.17 => Choisir la version 3.0.N (avec N >= 17)
2. Créer la BD MySQL :
3. Recopier les pages du site en ligne

Etape 3 : Installation Odoo
Installer Odoo9 selon la procédure 1P  sur Odoo.1ere-page.fr
# apt-get install pgadmin3  (Gestion BD Postgres)

Etape 4 : Installation Samba
# apt-get install samba  smbclient    (pour pouvoir partager fichiers et imprimantes)

# apt-get install pinta  gimp  (retouche d’images)

# apt-get install -y  firefox-esr-l10n-fr mozilla-firefox-adblock    (adblock et Fr)
# apt-get install -y xul-ext-adblock-plus xul-ext-firebug  (autre version selon Firefox ou autre navig)
# apt-get install -y vlc
# apt-get install -y inxi hardinfo sysinfo gparted unetbootin vim pluma
# apt-get install -y inxi hardinfo sysinfo gparted vim pluma
# apt-get install -y audacity lame brasero k3b transmission deja-dup clementine
# apt-get install -y unace rar unrar unar p7zip-rar p7zip zip unzip arj libuu0 mpack sharutils uudeview zip unzip
# apt-get install -y cdrdao asunder soundconverter inkscape
# apt-get install -y chromium pepperflashplugin-nonfree chromium-l10n
# apt-get install -y wine
# apt-get install -y evince   (lecteur PDF)
# apt-get install -y cups cups-*    (émulateur d’imprimante PDF)
# apt-get install -y gufw     (firewall)
# apt-get install -y exfat-utils exfat-fuse
# apt-get install -y ttf-mscorefonts*
# apt-get install -y x264 vlc-* libk3b6-extracodecs
# apt-get autoclean  -y && apt-get clean -y && apt-get autoremove -y

Ajouter OpenVPN ? (voir article)
Ajouter Photofiltre ? (voir article)