Skip to content

Instantly share code, notes, and snippets.

@Apocrathia
Last active March 23, 2016 21:29
Show Gist options
  • Save Apocrathia/cf61665cec5a19c25889 to your computer and use it in GitHub Desktop.
Save Apocrathia/cf61665cec5a19c25889 to your computer and use it in GitHub Desktop.
Quick script to get openHAB installed on your Debian (Jessie) based system.
#!/bin/bash
echo "This script will install and start openHAB on your system"
echo "Grabbing the openHAB Repository Key"
echo "deb http://dl.bintray.com/openhab/apt-repo stable main" | sudo tee /etc/apt/sources.list.d/openhab.list
curl 'https://bintray.com/user/downloadSubjectPublicKey?username=openhab' | sudo apt-key add -
echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu xenial main" | tee -a /etc/apt/sources.list.d/webupd8.list
echo "deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu xenial main" | tee -a /etc/apt/sources.list.d/webupd8.list
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys EEA14886
apt-get update
echo "Updating Apt and installing openHAB with Oracle Java 7"
sudo apt-get -y install openhab-runtime oracle-java7-installer
echo "Enabling and starting openHAB"
sudo systemctl enable openhab
sudo systemctl start openhab
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment