1. step 1: put CentOS-Userland-7 on a microSD card

wget http://mirror.centos.org/altarch/7/isos/armhfp/CentOS-Userland-7-armv7hl-Minimal-1708-RaspberryPi3.img.xz
zcat CentOS-Userland-7-armv7hl-Minimal-1708-RaspberryPi3.img.xz | dd of=/dev/sdb bs="4M" status="progress" iflag="fullblock" oflag="direct"
sync
Tip the microSD is /dev/sdb in our case, adapt if needed.

2. step 2: preparation

ssh root@srv008e # centos
rootfs-expand
yum -y update
curl -s http://d01cid.ddns.net/sharel/bin/cid-init | sh
yum -y install i2c-tools
source /bin/cid-functions
cid_add_line /boot/config.txt "dtparam=i2c_arm=on"
echo "i2c-dev" > /etc/modules-load.d/i2c.conf
cid_add_line /boot/config.txt "dtoverlay=i2c-rtc,pcf8523"
echo "i2c-dev" > /etc/modules-load.d/rtc.conf
echo "i2c-bcm2708" >> /etc/modules-load.d/rtc.conf
echo "rtc-pcf8523" >> /etc/modules-load.d/rtc.conf
reboot
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 -- 6a 6b -- -- -- --
70: -- -- -- -- -- -- -- --
source /bin/cid-functions
cid_add_line /etc/rc.local "hwclock -s"

3. step 3: the magic

yum -y install rrdtool
curl -s http://d01cid.ddns.net/sharel/tar/rmeter-1.02.tgz | tar xz -C /opt/
cube /opt/rmeter/bin/rmeter-collector "get-ads1115" with "get-adcpiplus"
/opt/rmeter/bin/rmeter-init
vi /opt/rmeter/bin/get-adcpiplus
#!/usr/bin/python
# 01feb2017: (re)initial version (ary)
from ADCPi import ADCPi
adc = ADCPi(0x6a, 0x6b, 12)
p1 = adc.read_voltage(1)
p2 = adc.read_voltage(2)
p3 = adc.read_voltage(3)
p4 = adc.read_voltage(4)
print "%.02f %.02f %.02f %.02f" % (p1, p2, p3, p4)
yum -y install gcc git python-devel i2c-tools-python
git clone https://github.com/abelectronicsuk/ABElectronics_Python_Libraries.git
cd ABElectronics_Python_Libraries/
python setup.py install
cd
vi /usr/lib/systemd/system/ss-rmeter.service
#
# rmeter service
# 31aug2017: initial version (ary)
#

[Unit]
Description=ss-meter
After=network.service xinetd.service

[Service]
Type=simple
ExecStart=/opt/rmeter/bin/rmeter-collector
ExecStop=/usr/bin/pkill rmeter-collector
RemainAfterExit=yes

[Install]
WantedBy=multi-user.target
systemctl enable ss-rmeter.service
systemctl start ss-rmeter.service

4. step 4: samba

yum -y install samba samba-client cifs-utils
vi /etc/samba/smb.conf
#
[global]
        workgroup = D01
        server string = %h (samba server %v)
        bind interfaces only = yes
        log level = 0
        log file = /var/log/samba/log.%m
        max log size = 50
        printing = bsd

[rmeter]
        comment = rmeter share
        path = /opt/rmeter/
        read only = yes
        browseable = yes
        force user = root
        force group = smbgroup
        write list = @smbgroup
        create mask = 0660
        directory mask = 0770
        force create mode = 0660
        force directory mode = 0770
groupadd smbgroup
useradd -G smbgroup cidusr
echo "cidusr:Passw0rd" | chpasswd
echo "Passw0rd" > /tmp/pwd
echo "Passw0rd" >> /tmp/pwd
smbpasswd -a "cidusr" -s < /tmp/pwd
rm -f /tmp/pwd
systemctl enable smb.service
systemctl start smb.service

5. step 5: wifi

5.1. as a dhcp client

nmcli device wifi list
===========================
  Wi-Fi scan list (wlan0)
===========================
*  SSID             MODE   CHAN  RATE       SIGNAL  BARS  SECURITY
 -------------------------------------------------------------------------------
   d01b             Infra  13    54 Mbit/s  92      ▂▄▆█  --
   d01s             Infra  13    54 Mbit/s  72      ▂▄▆_  --
nmcli device wifi connect d01b
Note nmcli connection delete d01b

5.2. as an accesspoint

rpm -q --quiet "dnsmasq" || yum -y install dnsmasq
systemctl disable dnsmasq.service
nmcli connection add type "wifi" ifname "wlan0" con-name "acp0" ssid "0000"
nmcli connection modify "acp0" 802-11-wireless.band "bg"
nmcli connection modify "acp0" 802-11-wireless.channel "2"
nmcli connection modify "acp0" 802-11-wireless.mode "ap"
nmcli connection modify "acp0" autoconnect "yes"
nmcli connection modify "acp0" ipv4.addresses "1.1.1.1/24"
nmcli connection modify "acp0" ipv4.method "shared"
nmcli connection up "acp0"
Note nmcli connection delete acp0

6. reference