Category Archives: raspberry pi

setting up a DNS server for my local network

root@raspberrypi-1:/home/pi# cat  /etc/powerdns/bind/home.zone
$ORIGIN home     ; base for unqualified names
$TTL 1h                 ; default time-to-live
@                       IN      SOA ns.home hostmaster.home (
                                1; serial
                                1d; refresh
                                2h; retry
                                4w; expire
                                1h; minimum time-to-live
                        )
                        IN      NS      ns
                        IN      A       192.168.1.6
ns                      IN      A       192.168.1.6
raspberrypi-1           IN      A       192.168.1.6
raspberrypi-2           IN      A       192.168.1.26
root@raspberrypi-1:/home/pi# cat /etc/powerdns/bindbackend.conf 
zone "home" {
        type master;
        file "/etc/powerdns/bind/home.zone";
        allow-update { none; };
};

Source here

installing inotool on the Raspberry Pi

For the basic install and configuration example, see my previous post inotool for busy people

When installing on a R-pi, few tools will not be installed by default on Raspbian, proceed to install all of them *before* attempting to clone the git repository.


apt-get install python-configobj python-setuptools git python-jinja2 python-serial

Enjoy!

raspberry pi GPIO project

The idea is to plot temperature, light an humidity inside my house.

2013-02-24 00.51.50

source of inspiration

Raspberry pi: installing lighttpd + php


root@raspberrypi-2:/home/pi# apt-get install lighttpd php5-cgi
[...]
root@raspberrypi-2:/home/pi# lighty-enable-mod fastcgi-php
Met dependency: fastcgi
Enabling fastcgi-php: ok
Enabling fastcgi: ok
Run /etc/init.d/lighttpd force-reload to enable changes
root@raspberrypi-2:/home/pi# invoke-rc.d lighttpd force-reload
[ ok ] Reloading web server configuration: lighttpd.

playing with geoip in the raspberry


apt-get install php5-cli
apt-get install php5-geoip

get geoip datbase


zgrep Fail /var/log/{auth*,secure*} >fail.log
cat fail.log | sed 's/.*from\(.*\)port.*/\1/g' | sort -n | uniq > failIP.text

php code is available here