Compile PHP 7 for Raspberry Pi (with memcached)

The PHP version that comes with Raspbian is the 5.4.45 at the time I’m writing this. Recently I’ve installed OwnCloud 8.2.2, which recommends PHP 5.6 or newer, so, I decided to compile a newer version by myself. Indeed I tried with a couple of newer versions: 5.6.18 and 7.0.3, both with php-fpm support.

After compiling, configuring and running both versions as separated php-fpm sockets, I runned this benchmark script to compare them, and these were the results:



It’s awesome, isn’t it? 🙂

Continue reading

Configure a DNS server with your Raspberry Pi

This is just a quick recipe so you can have a DNS server on your local network. In my case, I wanted to log every DNS query made from my network into a custom file.

This is useful if you want to know, for example as was my case, where your mobile phone is accessing to when it’s connected to your wireless network after installing an app (among other hacker/spy things that I’m not going even to mention 🙂 ).

Continue reading