====== Configurer un Raspberry Pi 2 sous Ubuntu avec l'interface graphique MATE ====== Utilisation comme poste de travail, d'apprentissage de GNU/Linux et de la programmation. ===== Téléchargement et préparation de la carte microSD ===== * Matériel nécessaire : * un Raspberry Pi version 2, avec une alimentation * clavier, souris USB * connexion filaire à internet * une carte micro-SD (8 ou 16 GB recommandés) * un écran (de PC ou téléviseur) avec connexion HDMI * [[wp>fr:Raspberry_Pi|Raspberry Pi]] * [[wp>Raspberry_Pi|Raspberry Pi]] * [[https://www.raspberrypi.org]] * [[https://www.raspberrypi-france.fr/]] * [[https://www.framboise314.fr/]] * [[https://www.raspberrypi.org/documentation/installation/installing-images/README.md|Installing operating system images]] (cf. balenaEtcher, a graphical SD card writing tool) * [[https://www.raspberrypi.org/downloads/]] * [[https://ubuntu-mate.org/raspberry-pi/|Ubuntu MATE for the Raspberry Pi Model B 2, 3 and 3+]] (choisir la version 32 bits recommandées pour le RPi2 et son processeur ARMv7) ===== Installation ===== * Démarrer le Raspberry Pi 2 avec la carte flashée préalablement * Indiquer les choix * Langue : français * Clavier : belge * User : username pwd … * PC : namix * Fin d'installation et redémarrage * relever l'IP du serveur par la commande "ip a" dans un terminal * mises à jour : * sudo apt-get update * sudo apt-get upgrade * SSH : vérifier l'installation de openssh-server * Connexion à partir d'une autre machine : ssh ubuntu@ip_adress (remplacer ip_adress par la valeur relevée) * Clé SSH * générer sur le PC connecté une paire de clés privée/publique si non disponible (ex : ssh-keygen -o -b 4096 -t rsa) * copier la clé publique sur le serveur * ssh-copy-id -i ~/.ssh/id_rsa.pub user@ip_adress * tester la connexion qui doit fonctionner sans mdp : ssh user@ip_adress * sudo apt-get autoremove * sudo apt-get autoclean ===== Outils complémentaires ===== * Bureau à distance : sudo apt-get install remmina * test UMONS - bureau à distance (ordinateur : rdsl.umons.ac.be, protocole : RDP, identifiant : nummat@umons.ac.be) FIXME (à partir d'ici...) * [[http://www.codingepiphany.com/2015/03/13/the-raspberry-pi-2-desktop-experience/]] * [[http://computers.tutsplus.com/articles/how-to-install-alternative-web-browsers-on-the-raspberry-pi--mac-60717]] * sudo apt-get install iceweasel iceweasel-l10n-fr nautilus libreoffice-l10n-fr * sudo apt-get update ... upgrade ... * sudo apt-get install inkscape → ok en fonctionnement (graphisme vectoriel) ===== Environnement Python ===== * Python3 : [[https://www.raspberrypi.org/documentation/usage/python/]] python3 idle3 python3-pip python3-venv ( python3 idle3 python3-pip installé en standard) * sudo apt-get install python3-venv * sudo apt-get install build-essential python3-dev g++ : outils nécessaires pour des compilations de libraire dont l'installation n'est pas nécessaire (déjà OK) * sudo apt-get install libblas-dev liblapack-dev gfortran → dépendances nécessaires scipy * sudo apt-get install libfreetype6-dev libpng12-dev libjpeg8-dev → dépendances de matplotlib (seule libjpeg8-dev installée, le reste est satisfait) * sudo -H pip3 install --upgrade pip * python tools : utiliser "sudo pip3 install python3-tools", car "pip3 install" renvoie des messages d'erreur (accès) * sudo pip3 install jupyter → (inclut ipython3) doc : [[http://jupyter.readthedocs.org/en/latest/index]] * sudo apt-get install python3-matplotlib (numpy OK) * sudo apt-get install python3-scipy * la plupart des autres paquets devraient être installés via pip3 * non installé (python 3.4.3-1) : Anaconda : [[http://stackoverflow.com/questions/39371772/how-to-install-anaconda-on-raspberry-pi-3-model-b]] * [[https://www.continuum.io/content/conda-support-raspberry-pi-2-and-power8-le]] * cd Téléchargements * wget http://repo.continuum.io/miniconda/Miniconda3-latest-Linux-armv7l.sh * sudo md5sum Miniconda3-latest-Linux-armv7l.sh * sudo /bin/bash Miniconda3-latest-Linux-armv7l.sh * ...