This page (revision-13) was last changed on 10-May-2026 14:25 by Harry Metske

This page was created on 06-May-2026 07:07 by Harry Metske

Only authorized users are allowed to rename pages.

Only authorized users are allowed to delete pages.

Page revision history

Version Date Modified Size Author Changes ... Change note
13 10-May-2026 14:25 6 KB Harry Metske to previous
12 10-May-2026 10:48 6 KB Harry Metske to previous | to last
11 10-May-2026 10:41 6 KB Harry Metske to previous | to last
10 10-May-2026 10:34 5 KB Harry Metske to previous | to last
9 10-May-2026 10:33 5 KB Harry Metske to previous | to last Raspberry P setup 2026-04 ==> Raspberry PI setup 2026-04
8 10-May-2026 10:29 5 KB Harry Metske to previous | to last
7 10-May-2026 10:26 5 KB Harry Metske to previous | to last
6 10-May-2026 10:18 4 KB Harry Metske to previous | to last Raspberry P setuip 2026-04 ==> Raspberry P setup 2026-04
5 10-May-2026 10:18 4 KB Harry Metske to previous | to last
4 10-May-2026 09:46 2 KB Harry Metske to previous | to last
3 06-May-2026 07:23 2 KB Harry Metske to previous | to last
2 06-May-2026 07:09 2 KB Harry Metske to previous | to last
1 06-May-2026 07:07 1 KB Harry Metske to last

Page References

Incoming links Outgoing links

Version management

Difference between version and

At line 1 added 20 lines
[{TableOfContents}]
To install:
* /etc/netplan
* apache httpd
* java
* golang
* tomcat
* jspwiki
* dhmb
* zaptecbot
* prometheus/grafana
* letsencrypt
* pihole
* iptables
* ip6tables
* knockd
At line 2 changed one line
apt install apache2 net-tools openjdk-25-jdk-headless make gcc knockd plocate
apt install apache2 net-tools openjdk-25-jdk-headless make gcc knockd plocate certbot
At line 76 added 188 lines
saved /etc/netplan/01-network-manager-all.yaml:
{{{
network:
version: 2
#renderer: networkd
ethernets:
eth0:
dhcp4: no
addresses:
- 192.168.2.19/24
# gateway4: 192.168.2.254
routes:
- to: default
via: 192.168.2.254
nameservers:
addresses:
- 8.8.8.8
}}}
! LetsEncrypt install
See [previous install|https://www.computerhok.nl/wiki/Wiki.jsp?page=Raspberry%20Pi%20setup#section-Raspberry+Pi+setup-Letsencrypt]
! Prometheus install
{{{
groupadd prometheus
useradd -g prometheus prometheus --create-home --shell /usr/sbin/nologin
cd /tmp/
curl -L https://github.com/prometheus/prometheus/releases/download/v3.11.3/prometheus-3.11.3.linux-arm64.tar.gz -O
tar -xzf prometheus-3.11.3.linux-arm64.tar.gz
mv prometheus-3.11.3.linux-arm64 /usr/local
cd /usr/local
ln -s prometheus-3.11.3.linux-arm64 prometheus
cd prometheus
mkdir data
chown -R prometheus:prometheus /usr/local/prometheus
}}}
Copy the contents of /usr/local/prometheus/data from backup.
Create /etc/systemd/system/prometheus/service:
{{{
[Unit]
Description=Prometheus Server
Documentation=https://prometheus.io/docs/introduction/overview/
After=network-online.target
[Service]
User=prometheus
Restart=on-failure
ExecStart=/usr/local/prometheus/prometheus \
--config.file=/usr/local/prometheus/prometheus.yml \
--storage.tsdb.path=/usr/local/prometheus/data \
--storage.tsdb.retention.time=720d
[Install]
WantedBy=multi-user.target
}}}
{{{
systemctl daemon-reload
systemctl enable prometheus
systemctl start prometheus
! Install prometheus push gateway
{{{
cd /tmp
groupadd pushgateway
useradd -g pushgateway pushgateway --create-home --shell /usr/sbin/nologin
curl -sLO https://github.com/prometheus/pushgateway/releases/download/v1.11.2/pushgateway-1.11.2.linux-arm64.tar.gz
tar -xf pushgateway-1.11.2.linux-arm64.tar.gz
cp pushgateway-1.11.2.linux-arm64/pushgateway /usr/local/bin/
# install unit file:
cat > /etc/systemd/system/pushgateway.service << EOF
[Unit]
Description=Pushgateway
Wants=network-online.target
After=network-online.target
[Service]
User=pushgateway
Group=pushgateway
Type=simple
ExecStart=/usr/local/bin/pushgateway \
--web.listen-address=":9091" \
--web.telemetry-path="/metrics" \
--persistence.file="/tmp/metric.store" \
--persistence.interval=5m \
--log.level="info" \
--log.format="logfmt"
[Install]
WantedBy=multi-user.target
EOF
systemctl daemon-reload
systemctl start pushgateway
}}}
{{{
systemctl daemon-reload
systemctl enable pushgateway
systemctl start pushgateway
}}}
Add this to /usr/local/prometheus/prometheus.yml:
{{{
- job_name: 'pushgateway'
honor_labels: true
static_configs:
- targets: [['localhost:9091']
}}}
Testing pushgateway:
{{{
echo -e "# TYPE temperature gauge\n# HELP temperature The temperature in Celsius\ntemperature 5.9" | curl --data-binary @- http://localhost:9091/metrics/job/openweather
}}}
And checkout [http://www.computerhok.nl:9091|http://www.computerhok.nl:9091/]
! Install node exporter
{{{
groupadd node-exporter
useradd -g node-exporter node-exporter --create-home --shell /usr/sbin/nologin
cd /tmp/
curl -L https://github.com/prometheus/node_exporter/releases/download/v1.11.1/node_exporter-1.11.1.linux-arm64.tar.gz -O
tar -xzf node_exporter-1.11.1.linux-arm64.tar.gz
mv node_exporter-1.11.1.linux-arm64 /usr/local
cd /usr/local
ln -s node_exporter-1.11.1.linux-arm64 node-exporter
}}}
Create /etc/systemd/system/node-exporter.service:
{{{
[Unit]
Description=Prometheus Node Exporter
Documentation=https://prometheus.io/docs/guides/node-exporter/
After=network-online.target
[[Service]
User=node-exporter
Restart=on-failure
ExecStart=/usr/local/node-exporter/node_exporter
[Install]
WantedBy=multi-user.target
}}}
{{{
systemctl daemon-reload
systemctl enable node-exporter
systemctl start node-exporter
}}}
! Install grafana
{{{
wget -q -O - https://packages.grafana.com/gpg.key | sudo apt-key add -
echo "deb https://packages.grafana.com/oss/deb stable main" | sudo tee -a /etc/apt/sources.list.d/grafana.list
apt-get update && apt-get install -y grafana
}}}
{{{
wget -qO - https://packages.grafana.com/gpg.key | gpg --dearmor -o /usr/share/keyrings/grafana-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/grafana-keyring.gpg] https://packages.grafana.com/oss/deb stable main" > /etc/apt/sources.list.d/grafana.list
apt-get update && apt-get install -y grafana
systemctl enable grafana-server
systemctl start grafana-server
}}}