
Lass openHAB eine Weile laufen, evtl. löst sich das Problem "von selbst" (Update Problem der UI)
Code: Alles auswählen
lxc launch ubuntu:20.04 OpenHAB02 --profile default --profile macvlan
lxc list
OpenHAB02 192.168.78.48 (eth0)
Feste IP in der Fritzbox einrichten
lxc restart OpenHAB02
lxc list
OpenHAB02 192.168.78.142 (eth0)
lxc exec OpenHAB02 -- passwd ubuntu
ubuntu:XXXX
lxc exec OpenHAB02 -- nano /etc/ssh/sshd_config.d/XXXX.conf
Port XXXX
PasswordAuthentication yes
lxc exec OpenHAB02 -- systemctl restart ssh
lxc exec OpenHAB02 -- dpkg-reconfigure locales
lxc exec OpenHAB02 -- nano /etc/default/locale
LANG=de_DE.UTF-8
LANGUAGE=de_DE.UTF-8
LC_MESSAGES=de_DE.UTF-8
lxc exec OpenHAB02 -- nano /etc/environment
(hinzufügen)
LC_ALL=de_DE.UTF-8
LANG=de_DE.UTF-8
lxc exec OpenHAB02 -- update-locale
lxc exec OpenHAB02 -- dpkg-reconfigure tzdata
lxc exec OpenHAB02 -- timedatectl
lxc restart OpenHAB02
lxc list
lxc snapshot OpenHAB02 OpenHAB02-snap01
Code: Alles auswählen
Einrichtung auf dem Server
lxc exec OpenHAB02 -- apt update
lxc exec OpenHAB02 -- apt upgrade
lxc exec OpenHAB02 -- reboot
lxc restart OpenHAB02
lxc list
lxc exec OpenHAB02 -- apt update
lxc exec OpenHAB02 -- apt install unzip
-----------------------------------------------------------------------------------
Azul Zulu
(anlehnend an diese Vorlage)
https://www.fosstechnix.com/install-zulu-openjdk-version-11/
lxc exec OpenHAB02 -- apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 0xB1998361219BD9C9
lxc exec OpenHAB02 -- apt-add-repository 'deb http://repos.azulsystems.com/ubuntu stable main'
lxc exec OpenHAB02 -- apt update
lxc exec OpenHAB02 -- apt install zulu-11
lxc exec OpenHAB02 -- java -version
openjdk version "11.0.8" 2020-07-14 LTS
OpenJDK Runtime Environment Zulu11.41+23-CA (build 11.0.8+10-LTS)
OpenJDK 64-Bit Server VM Zulu11.41+23-CA (build 11.0.8+10-LTS, mixed mode)
lxc exec OpenHAB02 -- apt update
lxc exec OpenHAB02 -- apt upgrade
lxc exec OpenHAB02 -- java -version
openjdk version "11.0.11" 2021-04-20 LTS
OpenJDK Runtime Environment Zulu11.48+21-CA (build 11.0.11+9-LTS)
OpenJDK 64-Bit Server VM Zulu11.48+21-CA (build 11.0.11+9-LTS, mixed mode)
lxc restart OpenHAB02
lxc list
openHAB
-----------------------------------------------------------------------------------
(nach dieser Vorlage)
https://www.openhab.org/docs/installation/linux.html#manual-installation
lxc exec OpenHAB02 -- apt update
lxc exec OpenHAB02 -- adduser --system --no-create-home --group --disabled-login openhab
lxc exec OpenHAB02 -- adduser openhab dialout
lxc exec OpenHAB02 -- cd /tmp
lxc exec OpenHAB02 -- wget -O openhab-download.zip https://openhab.jfrog.io/artifactory/libs-milestone-local/org/openhab/distro/openhab/3.1.0.M5/openhab-3.1.0.M5.zip
lxc exec OpenHAB02 -- unzip openhab-download.zip -d /opt/openhab
lxc exec OpenHAB02 -- rm openhab-download.zip
lxc exec OpenHAB02 -- chown -hR openhab:openhab /opt/openhab
-----------------------------------------------------------------------------------
Einrichtung auf dem Container
ubuntu@OpenHAB02:~$
sudo su -s /bin/bash -c '/opt/openhab/start.sh' openhab
Mindestens 15 Minuten warten bis es weitergeht
service
ubuntu@OpenHAB02:~$
sudo nano /usr/lib/systemd/system/openhab.service
[Unit]
Description=openHAB - empowering the smart home
Documentation=https://www.openhab.org/docs/
Documentation=https://community.openhab.org
Wants=network-online.target
After=network-online.target
[Service]
User=openhab
Group=openhab
WorkingDirectory=/opt/openhab
#EnvironmentFile=-/etc/default/openhab
ExecStart=/opt/openhab/runtime/bin/karaf daemon
ExecStop=/opt/openhab/runtime/bin/karaf stop
Restart=on-failure
SuccessExitStatus=0 143
[Install]
WantedBy=multi-user.target
sudo systemctl daemon-reload
sudo systemctl enable openhab.service
sudo systemctl start openhab.service
sudo systemctl status openhab.service
Code: Alles auswählen
runtimeInfo:
version: 3.1.0.M5
buildString: Milestone Build
locale: de-DE
systemInfo:
configFolder: /opt/openhab/conf
userdataFolder: /opt/openhab/userdata
logFolder: /opt/openhab/userdata/logs
javaVersion: 11.0.11
javaVendor: Azul Systems, Inc.
javaVendorVersion: Zulu11.48+21-CA
osName: Linux
osVersion: 5.4.0-77-generic
osArchitecture: amd64
availableProcessors: 8
freeMemory: 534443272
totalMemory: 714080256
bindings:
- ntp
clientInfo:
device:
ios: false
android: false
androidChrome: false
desktop: true
iphone: false
ipod: false
ipad: false
edge: false
ie: false
firefox: true
macos: false
windows: true
cordova: false
phonegap: false
electron: false
nwjs: false
webView: false
webview: false
standalone: false
os: windows
pixelRatio: 1
prefersColorScheme: dark
isSecureContext: false
locationbarVisible: true
menubarVisible: true
navigator:
cookieEnabled: true
deviceMemory: N/A
hardwareConcurrency: 12
language: de
languages:
- de
- en-US
- en
onLine: true
platform: Win32
screen:
width: 1920
height: 1080
colorDepth: 24
support:
touch: false
pointerEvents: true
observer: true
passiveListener: true
gestures: false
intersectionObserver: true
themeOptions:
dark: dark
filled: true
pageTransitionAnimation: default
bars: light
homeNavbar: default
homeBackground: default
expandableCardAnimation: default
userAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:89.0) Gecko/20100101
Firefox/89.0
timestamp: 2021-06-25T15:23:06.788Z