Skip to content

5. Install PiHole

Bogdan Tudorache edited this page Oct 4, 2022 · 3 revisions

A. Update and Upgrade

Your first action after you are in must definitely be updating and upgrading your Raspberry OS, given that it's Linux based, the commands are the same

sudo apt-get update

pi@subzero:~ $ sudo apt-get update
Hit:1 http://archive.raspberrypi.org/debian bullseye InRelease
Get:2 http://raspbian.raspberrypi.org/raspbian bullseye InRelease [15.0 kB]
Fetched 15.0 kB in 1s (11.8 kB/s)
Reading package lists... Done
pi@subzero:~ $ 

sudo apt-get upgrade

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
The following package was automatically installed and is no longer required:
  libfuse2
Use 'sudo apt autoremove' to remove it.
The following packages have been kept back:
  raspberrypi-ui-mods userconf-pi
The following packages will be upgraded:
  alacarte arandr avahi-daemon base-files bash bind9-dnsutils bind9-host bind9-libs chromium-browser
  chromium-browser-l10n chromium-codecs-ffmpeg-extra cifs-utils console-setup console-setup-linux cups
  cups-client cups-common cups-core-drivers cups-daemon cups-ipp-utils cups-pk-helper cups-ppdc
  cups-server-common curl dhcpcd5 dirmngr distro-info-data dnsutils dphys-swapfile dpkg dpkg-dev ffmpeg
  firmware-atheros firmware-brcm80211 firmware-libertas firmware-misc-nonfree firmware-realtek
  gir1.2-gdkpixbuf-2.0 gir1.2-gtk-3.0 gnome-session-bin gnome-session-common gnome-session-noshell gnupg
  gnupg-l10n gnupg-utils gpg gpg-agent gpg-wks-client gpg-wks-server gpgconf gpgsm gpgv gstreamer1.0-plugins-good
  gtk-update-icon-cache gzip keyboard-configuration libavahi-client3 libavahi-common-data libavahi-common3
  libavahi-core7 libavahi-glib1 libavcodec58 libavdevice58 libavfilter7 libavformat58 libavresample4 libavutil56
  libbasicusageenvironment1 libc-bin libc-dev-bin libc-devtools libc-l10n libc6 libc6-dbg libc6-dev
  libcamera-apps libcamera-tools libcamera0 libcups2 libcupsimage2 libcurl3-gnutls libcurl4 libdpkg-perl
  libegl-mesa0 libexpat1 libexpat1-dev libfreetype-dev libfreetype6 libfreetype6-dev libfribidi0 libgbm1
  libgdk-pixbuf-2.0-0 libgdk-pixbuf2.0-common libgl1-mesa-dri libglapi-mesa libgles2-mesa libglx-mesa0
  libgnutls30 libgroupsock8 libgssapi-krb5-2 libgtk-3-0 libgtk-3-common libk5crypto3 libkrb5-3 libkrb5support0
  libldap-2.4-2 libldb2 liblivemedia77 liblzma5 libmutter-7-0 libnm0 libntfs-3g883 libpam-chksshpwd
  libpam-modules libpam-modules-bin libpam-runtime libpam-systemd libpam0g libpcre2-16-0 libpcre2-8-0
  libpcre2-posix2 libpoppler-cpp0v5 libpoppler-glib8 libpoppler-qt5-1 libpoppler102 libpostproc55
  libpulse-mainloop-glib0 libpulse0 libpulsedsp libraspberrypi-bin libraspberrypi-dev libraspberrypi-doc
  libraspberrypi0 libsdl2-2.0-0 libsmbclient libsnmp-base libsnmp40 libssl1.1 libswresample3 libswscale5
  libsystemd0 libtirpc-common libtirpc-dev libtirpc3 libudev1 libusageenvironment3 libvlc-bin libvlc5 libvlccore9
  libwbclient0 libxml2 libxslt1.1 lighttpd linux-libc-dev locales logrotate lxinput lxpanel lxpanel-data
  lxplug-bluetooth lxplug-cputemp lxplug-ejecter lxplug-magnifier lxplug-network lxplug-ptbatt lxplug-updater
  lxplug-volumepulse mesa-va-drivers mesa-vdpau-drivers mutter mutter-common nano ntfs-3g openssh-client
  openssh-server openssh-sftp-server openssl pcmanfm php7.4-cgi php7.4-cli php7.4-common php7.4-intl php7.4-json
  php7.4-opcache php7.4-readline php7.4-sqlite3 php7.4-xml pi-bluetooth piwiz pixflat-icons poppler-utils
  publicsuffix pulseaudio pulseaudio-module-bluetooth pulseaudio-utils python-pip-whl python3-ldb python3-pip
  python3-sense-hat raspberrypi-bootloader raspberrypi-kernel raspberrypi-net-mods raspberrypi-sys-mods
  raspi-config rc-gui realvnc-vnc-server rp-prefapps rpd-plym-splash rpi-chromium-mods rpi-eeprom rpi-imager
  rpi-wayland rsyslog samba-libs ssh systemd systemd-sysv systemd-timesyncd tzdata udev unzip usb.ids vcdbg vlc
  vlc-bin vlc-data vlc-l10n vlc-plugin-access-extra vlc-plugin-base vlc-plugin-notify vlc-plugin-qt
  vlc-plugin-samba vlc-plugin-skins2 vlc-plugin-video-output vlc-plugin-video-splitter vlc-plugin-visualization
  wireless-regdb xcompmgr xserver-common xserver-xorg-core xwayland xz-utils zlib1g zlib1g-dev
244 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
Need to get 336 MB/446 MB of archives.
After this operation, 117 MB disk space will be freed.
Do you want to continue? [Y/n] 

B. Install Pihole

This is actually very simple, you can even do it in a one-liner command: curl -sSL https://install.pi-hole.net | bash

Or alternatively follow the normal git clone :

git clone --depth 1 https://github.com/pi-hole/pi-hole.git Pi-hole
cd "Pi-hole/automated install/"
sudo bash basic-install.sh

Contact:

πŸ”—πŸŒ³ All-in-One

πŸ’Ό LinkedIn

πŸ“© E-mail

Clone this wiki locally