Install OpenHAB on a SUSE Linux Enterprise Server 15 machine


(Stefan) #1

this is a not yet finished tutorial, it only contains necessary information

Install OpenHAB on a SUSE Linux Enterprise Server 15 machine
Install Java
Find latest Zulu 8 rpm url from Download Page and call zypper with it

zypper install https://cdn.azul.com/zulu/bin/zulu8.33.0.1-jdk8.0.192-linux.x86_64.rpm

Install OpenHAB
Prerequisites: YaST2 - zypper install yast2
Open YaST -> Software -> Software Repositories and use Add to add https://dl.bintray.com/openhab/rpm-repo2/stable as additional repository, accept it’s key

Use Standard YaST Interface to install this packages:

  • openhab2
  • openhab2-addons (in case you like to have offline installation)
  • insserv-compat (needed for later making the service permanent)

Open Firewall
Open access to port 8080 so that OpenHAB webinterface can be viewed. Port 5007 for Language Server can be usefull too.

# firewall-cmd  --add-port=8080/tcp
# firewall-cmd  --add-port=5007/tcp

Firewall rules have to be run additionally with --permanent parameter to make them permanent, or afterwards a firewall-cmd --runtime-to-permanent has do be issued.

Make service permanent

# systemctl  enable openhab2.service

Configure OpenHAB
Configuration files can be found at /etc/openhab2/
Put your desired admin-user to openhab group and allow openhab group to write to that directory:

# usermod -a -G openhab _yourAdminUser_
# chmod g+ws /etc/openhab2/*

Reopen your SSH shell afterwards to apply this change.
New files will be created with correct group but no write access for the group. Either you give the group individual file access, or you set up ACL (or a cronjob) to fix file permissions regularly.