Nginx, PHP, and GNUPG for Raspbian (Pi Zero)

September 16th, 2016 @ 18:23 Ubuntu Packages

This certainly falls under the "more interesting than practical" of things I've done.

Since I've recently aquired a few Raspberry Pi Zero's, I've been playing around with running Nginx and PHP on them, and experimenting with a functional web server on the Raspbian platform. Somewhere along the way I built all packages I actively maintain for Raspbian Jessie.

For those interested (and crazy enough) to run a full Nginx/PHP stack on a Raspberry Pi Zero, the following script can be used to get you started.


Add the debian repository

sudo sh -c 'echo "deb jessie raspbian" > /etc/apt/sources.list.d/'

Install secure https transport for apt

sudo apt-get install apt-transport-https

Upgrade gnupg2 to 2.1.x for ECC key support (for gpg package verification)

sudo apt-get --allow-unauthenticated update sudo apt-get --allow-unauthenticated install gnupg2 -y

ldconfig gpg2

sudo ln -s /etc/ /etc/ sudo ldconfig

Download GPG Signing Key from Keybase

wget --quiet -O - | sudo apt-key add -

Update to verify packages can be downloaded and authenticated

sudo apt-get update

Install Nginx, and PHP

sudo apt-get install nginx-mainline php7.0-fpm ```

Note these instructions are identitical to my main repository, and are packages using the same scripts used to provide them. Nginx is compiled without Google PageSpeed. Both Nginx and PHP are compiled against the latest version of OpenSSL (1.0.2h) without uint128 support. Raspbian is slow on a Pi Zero. Consequently tasks such as generateing dhparams will take a long time. Be patient.