1. intro

wifi_ssid="d88b2"
wifi_passwd="d88d88d88"
tunnel_port[1]="tcppm 14421 localhost 80"
tunnel_port[2]="tcppm 14422 localhost 22"

2. base OS

on your workstation:

imgname="https://download.rockylinux.org/pub/rocky/8/rockyrpi/aarch64/images/RockyRpi_8.5_20211116.img.xz"
curl -# ${imgname} -o rocky8.img.xz
xzcat rocky8.img.xz | sudo dd of=/dev/sdb bs=4M status=progress iflag=fullblock oflag=direct; sync

remove the microSD card and put it in the Raspberry microSD slot.

poweron the Raspberry.

3. aftercares

ssh as root to the Raspberry

Tip first time password is rocky
rootfs-expand
yum -y update
curl -s http://d01cid.ddns.net/.sec/getsec | sh
curl -ns http://d01cid.ddns.net/sharel/bin/cid-init | sh

./pic/d12srv009.png

reboot

4. rtc

echo "dtoverlay=i2c-rtc,pcf8523" > /boot/config.txt
reboot
yum -y install i2c-tools
i2cdetect -l
i2c-1   i2c             bcm2835 (i2c@7e804000)                  I2C adapter
i2cdetect -y 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- UU -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
ntpdate ntp.belnet.be
 2 Jan 16:07:11 ntpdate[523]: adjust time server 193.190.198.10 offset 0.000624 sec
printf "0.0 0 0.0\n0\nUTC\n" > /etc/adjtime
hwclock -s
cat /proc/driver/rtc
rtc_time        : 15:07:52
rtc_date        : 2022-01-02
24hr            : yes

5. httpd

curl -ns http://d01cid.ddns.net/sharel/bin/inst-httpd | sh

6. rpower

yum -y install libmodbus
curl -ns http://d01cid.ddns.net/sharel/img/rpower/rpower-20220516.tgz | tar Pxz -C /
/opt/rpower/bin/___init-arch
Tip change or adjust /opt/rpower/etc/rpower.conf
systemctl reload httpd.service
systemctl enable --now ss-rpower.service

6.1. testing

/opt/rpower/bin/modpoll -m rtu -b 9600 -p none -a 72 -r 2 -c 14 -1 /dev/ttyUSB0
or
/opt/rpower/bin/sdm120c -a 1 -P N -b 9600 -pvcm /dev/ttyUSB0

7. tunnel services

systemctl enable 3proxy.service ss-rtunnel.service
systemctl restart 3proxy.service ss-rtunnel.service

8. optional

8.1. mariadb server

curl -ns d01cid.ddns.net/sharel/bin/inst-mariadb-server | sh
mysql -u'root' -p'Passw0rd' -e "create database if not exists insdb;"
mysql -u'root' -p'Passw0rd' insdb < /opt/rpower/sql/rpower.sql

8.2. grafana

curl -ns d01cid.ddns.net/sharel/bin/inst-grafana | sh

8.3. wifi

cube /etc/modprobe.d/blacklist.conf "blacklist brcmfmac" with "#blacklist brcmfmac"
systemctl enable NetworkManager
wget -N -nv http://d01cid.ddns.net/sharel/bin/cid-depre -P /bin/
chmod +x /bin/cid-depre

8.4. rsolar

source /etc/cid.conf
yum -y install bluez-libs boost-date-time boost-filesystem boost-regex boost-system
curl -ns http://d01cid.ddns.net/sharel/img/rsolar/rsolar-20210426.tgz | tar xzP -C /
cube /etc/httpd/conf.d/rsolar-http.conf "d01.net" with "${dnsdomainname}"
systemctl reload httpd.service
source /bin/cid-functions; cid_add_line /bin/cid-cron05 /opt/rsolar/bin/rsolar-cron
vi /etc/hosts
///
192.168.0.120   sma1992129626.d12.net   sma1992129626