Create cps image authored by Seyfried's avatar Seyfried
# Mit diesen Schritten kann man eine VM als Template für ein CPS-Image vorbereiten.
```
## Building a CPS cloud image
# Debian 12
echo blacklist rfkill >> /etc/modprobe.d/blacklist.conf
echo blacklist cfg80211 >> /etc/modprobe.d/blacklist.conf
# Grafana
apt update && apt install -y libfontconfig1
Anleitung auf https://grafana.com/grafana/download?platform=linux
systemctl enable grafana-server
# InfluxDB2
Anleitung auf https://docs.influxdata.com/influxdb/v2.7/install/?t=Linux
systemctl enable influxdb
# InfluxDB2 CLI
Anleitung https://docs.influxdata.com/influxdb/v2.7/tools/influx-cli/
# NodeRed
https://nodered.org/docs/getting-started/aws (cf. Running on AWS EC2 with Ubuntu)
//deb.nodesource.com/setup_current.x | -E bash -
apt-get install -y nodejs build-essential npm
npm install -g --unsafe-perm node-red
npm install -g --unsafe-perm pm2
pm2 start `which node-red` -- -v
pm2 save
pm2 startup
# Template erzeugen
apt-get update
apt-get upgrade -y
apt-get install -y acpid ntp
**Snapshot**
hostname localhost
echo "localhost" > /etc/hostname
rm -f /etc/udev/rules.d/70*
rm -f /var/lib/dhcp/dhclient.*
rm -f /etc/ssh/*key*
cat /dev/null > /var/log/wtmp 2>/dev/null
logrotate -f /etc/logrotate.conf 2>/dev/null
rm -f /var/log/*-* /var/log/*.gz 2>/dev/null
history -c
unset HISTFILE
halt -p
```
\ No newline at end of file