Skip to content

Compare: Installation on Debian

Showing with 59 additions and 3 deletions.
  1. +59 −3 Installation-on-Debian.md
62 changes: 59 additions & 3 deletions Installation-on-Debian.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## Installation on Raspbian:
To make the installation as simple as possible, we have created an installation script for you. It will setup your Raspberry Pi as a full blown Photobooth. This means, Photobooth is started in fullscreen on startup and the automatic camera mount is disabled. If you encounter any issues or want more freedom to configure your Pi, we recommend you look at the detailed installation instruction below.
To make the installation as simple as possible, we have created an installation script for you. It will setup your Raspberry Pi (using Apache Webserver) as a full blown Photobooth. This means, Photobooth is started in fullscreen on startup and the automatic camera mount is disabled. If you encounter any issues or want more freedom to configure your Pi, we recommend you look at the detailed installation instruction below.

```
wget https://raw.githubusercontent.com/andreknieriem/photobooth/master/install-raspbian.sh
Expand All @@ -15,10 +15,66 @@ sudo apt update
sudo apt dist-upgrade
```

### Install dependencies
### Install a Webserver
Currently Apache and NGINX Webserver are supported.
NGINX has a smaller memory footprint and typically better performance, which is especially important on the Raspberry Pis, but it needs some additional steps until you're good to go.

#### Install Apache & PHP
```
sudo apt install -y libapache2-mod-php
```

#### or Install NGINX & PHP
```
sudo apt install -y nginx php-fpm
```
<details><summary><b>Additional needed steps for NGINX</b></summary>

Now we need to start the server with:
```
sudo /etc/init.d/nginx start
```
Once NGINX is installed we need to enable PHP in NGINX:
```
sudo nano /etc/nginx/sites-enabled/default
```
Find the line `index index.html index.htm;` and add `index.php` after `index` (the line now should look like this: `index index.php index.html index.htm;`).

Now scroll down until you find a section with the following content:
```
# pass the PHP scripts to FastCGI server
#
# location ~ \.php$ {
```

Edit by removing the `#` characters on the following lines:
```
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php7.3-fpm.sock;
}
```
It should look like this:
```
location ~ \.php$ {
include snippets/fastcgi-php.conf;
#
# # With php-fpm (or other unix sockets):
fastcgi_pass unix:/run/php/php7.3-fpm.sock;
# # With php-cgi (or other tcp sockets):
# fastcgi_pass 127.0.0.1:9000;
}
```

Now we need to restart the server with:
```
sudo /etc/init.d/nginx restart
```
</details>

### Install dependencies
```
sudo apt install -y git libapache2-mod-php php-gd gphoto2
sudo apt install -y git php-gd gphoto2
```

To install all client dependencies you also have to [install yarn](https://yarnpkg.com/lang/en/docs/install/#debian-stable):
Expand Down