Installez un Webserver, Git, WiringPi, NodeJS et les Librairies Python pour votre Raspberry Pi
#!/bin/bash
function pause {
echo "Appuyez sur ENTER pour continuer"
read
}
# Mise à jour des listes`
echo "Avant d'installer on va mettre à jours nos listes..."
sudo apt-get update
rep=1
while [ "$rep" -eq 1 ]; do
clear
printf "Menu d'installation :\n\n"
echo "1. Installez un Webserver"
echo "2. Installez GIT"
echo "3. Installez la librairie python GPIO"
echo "4. Installez la librairie WiringPi"
echo "5. Ajoutez NodeJS et Node-RED"
echo -e "q. Quitter\n"
echo "Retrouver pleins d'astuce sur notre site web : http://creativpi.fr"
echo "Entrez un numéro pour lancer l'installation ou tapez q pour quitter."
read -r choix
case "$choix" in
1)
#Apache
echo "Installation d'Apache"
sudo apt-get install apache2 -y
cd /var/www/html/
#php
echo "Installationd de PHP5"
sudo apt-get install php5 libapache2-mod-php5 -y
mv index.html index.php
touch index.php
sudo /etc/init.d/apache2 reload
#mySQL
echo "Installation de mySQL - Un mot de passe va être demandé"
sudo apt-get install mysql-server php5-mysql -y
echo "Vous pouvez vérifier l'installation d'Apache à cette adresse : http://localhost/"
pause ;;
2)
#Git
sudo apt-get install git-core
git --version
echo "Installation de Git réussi !"
pause ;;
3)
echo "Installation de la librairie python-dev python-gpio python-serial python-smbus python-picamera"
sudo apt-get install python-dev python-rpi.gpio python-serial python-picamera
pause ;;
4)
# On change de dossier
cd /home/pi/
# WiringPi
echo "Installation de la lib WiringPi"
git clone git://git.drogon.net/wiringPi
cd wiringpi/
git pull origin
./build
gpio -v
echo "Tous les ports GPIO"
gpio readall
pause ;;
5)
echo "Installation de NodeJS et NodeRED"
wget http://node-arm.herokuapp.com/node_latest_armhf.deb
sudo dpkg -i node_latest_armhf.deb
node -v
sudo apt-get install nodered
pause ;;
q)
echo "Consultez notre site web : http://creativpi.fr, Au revoir"
pause
rep=0 ;;
*)
pause ;;
esac
done
Installez rapidement un Serveur Web, git, des librairies python, WiringPi, nodejs et Node-RED pour votre Raspberry Pi. Pratique et utile quand vous venez d'installer Raspbian.