Arch Linux ARM Install Pi-Hole On A Raspberry Pi
Note
Pi-Hole is not officially supported on the Arch Linux operating system.
Prerequisites¶
- Installed and configured Arch Linux Arm operating system.
- Set a static IP address via DHCP or statically on the device.
-
Installed Arch Linux Install Aur Helper.
Note
Required to install package "pi-hole-server".
Environment¶
- Tested on to a Raspberry Pi 2 Model B.
- Using Nginx to server Pi-Hole's web interface.
- Using pi-hole-server package for local area network (LAN).
Install Pi-Hole¶
-
Install required packages.
# pikaur -Syu pi-hole-server nginx-mainline php-fpm php-sqlite inetutils
Info
Pi-Hole Chronometer (pihole -c) utilizes the command "hostname" and therefore the package "inetutils" is required.
-
Set Pi-Hole web interface administrator password.
# pihole -a -p <password>
- Enable PHP required extensions.
# nano /etc/php/php.ini
extension=curl extension=pdo_sqlite extension=sockets extension=sqlite3
- Create Nginx directory for site config.
# mkdir /etc/nginx/conf.d
- Set Nginx general settings.
# nano /etc/nginx/nginx.conf
include /etc/nginx/conf.d/*.conf;
- Create Nginx site config.
# cp /usr/share/pihole/configs/nginx.example.conf /etc/nginx/conf.d/pi-hole.conf
- Set system hosts correctly.
# nano /etc/hosts
127.0.0.1 localhost ip.address.of.pihole pi.hole myhostname
-
Stop and disable "systemd-resolved.service".
# systemctl stop systemd-resolved.service # systemctl disable systemd-resolved.service
Note
This is done because port 53 is used by "systemd-resolved.service" which will conflict with "pihole-FTL.service" port 53.
-
Set php-fpm.service overrides.
# systemctl edit php-fpm.service
[Service] ReadWritePaths = /srv/http/pihole ReadWritePaths = /run/pihole-ftl/pihole-FTL.port ReadWritePaths = /run/log/pihole/pihole.log ReadWritePaths = /run/log/pihole-ftl/pihole-FTL.log ReadWritePaths = /etc/pihole ReadWritePaths = /etc/hosts ReadWritePaths = /etc/hostname ReadWritePaths = /etc/dnsmasq.d/ ReadWritePaths = /proc/meminfo ReadWritePaths = /proc/cpuinfo ReadWritePaths = /sys/class/thermal/thermal_zone0/temp ReadWritePaths = /tmp
Note
This step is required to grant Pi-Hole web interface access to the necessary files/directories.
External Links¶
Last update: September 16, 2020