This repository has been archived by the owner on Nov 8, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
software.raspberrypi
Pascal de Sélys edited this page Dec 19, 2018
·
28 revisions
- Install raspbian in the raspberry pi
- Download rasbpian os stretch lite
- Use etcher for install raspbian in sd card
pi@raspberrypi:~ $ sudo raspi-config
Select "Interfacing" options and enable:
- I2C
- SSH
Select "Update" for update OS
Save you sd card 😏 use log2ram (1)
pi@raspberrypi:~ $ curl -Lo log2ram.tar.gz https://github.com/azlux/log2ram/archive/master.tar.gz
pi@raspberrypi:~ $ tar xf log2ram.tar.gz
pi@raspberrypi:~ $ cd log2ram-master
pi@raspberrypi:~ $ chmod +x install.sh && sudo ./install.sh
pi@raspberrypi:~ $ cd ..
pi@raspberrypi:~ $ rm -r log2ram-master
pi@raspberrypi:~ $ nano /etc/systemd/system/log2ram.service
Install openbox (2)
pi@raspberrypi:~ $ sudo apt-get install --no-install-recommends xserver-xorg x11-xserver-utils xinit openbox
pi@raspberrypi:~ $ sudo apt-get install firefox chromium-browser
pi@raspberrypi:~ $ sudo apt install supervisor
pi@raspberrypi:~ $ sudo apt install python3.5
pi@raspberrypi:~ $ sudo apt install python3-virtualenv
pi@raspberrypi:~ $ sudo apt install nginx
pi@raspberrypi:~ $ git clone https://github.com/scwall/cocktail_engine.git
Openbox Configuration (2)
pi@raspberrypi:~ $ sudo nano /etc/xdg/openbox/autostart
# Disable any form of screen saver / screen blanking / power management
xset s off
xset s noblank
xset -dpms
# Start firefox
firefox
.bash_profile Configuration (2)
pi@raspberrypi:~ $ sudo nano .bash_profile
[[ -z $DISPLAY && $XDG_VTNR -eq 1 ]] && startx -- -nocursor`
add all modules in firefox to the folder firefox_addons
pi@raspberrypi:~ $ sudo touch /etc/nginx/sites-available/cocktailengine
pi@raspberrypi:~ $ sudo nano /etc/nginx/sites-available/cocktailengine
server {
listen 14050; server_name ~^.*$;
root /home/pi/cocktail_engine/;
location /static {
alias /home/pi/cocktail_engine/static/;
}
location /media/ {
alias /home/pi/cocktail_engine/media/;
}
location / {
satisfy any;
allow 192.168.0.1/24;
allow 192.168.1.1/24;
allow 127.0.0.1;
deny all;
auth_basic "Restricted Content";
auth_basic_user_file /etc/nginx/.htpasswd;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_redirect off;
proxy_pass http://127.0.0.1:8000;
}
}
Change the address ip "192.168.0.1" and "192.168.1.1 to your configuration router and the port at your convenience
pi@raspberrypi:~ $ sudo ln -s /etc/nginx/sites-available/cocktailengine /etc/nginx/sites-enabled/cocktailengine
Create for final project course openclassrooms