ich möchte Euch gerne die BETA Anleitung zur Installation des RaspberryMatic Images auf einem Raspbian zur Verfügung stellen. Über Verbesserungsvorschläge freue ich mich.
Die Anleitung ist nicht für Linux Einsteiger gedacht sondern für den Poweruser der seinen Raspi gerne noch für weitere Aufgaben nutzen möchte.
Zur Datenübernahme gelten die gleichen Bedingungen wie für das RaspberryMatic Image. (2) Datenübernahme von CCU2 oder LXCCU:
Java ist bereits erhalten und muss nicht extra installiert werden.
Nicht funktionsfähige Punkte bzw. unnötige Punkte in der GUI
- Netzwerkkonfiguration
- SSH Konfiguration
- Timeserver
- Firewall
- automatischer Start nach Reboot, bitte vorerst mit /etc/init.d/occ starten
Nach erfolgreichem testen solltet Ihr dringend das root Passwort ändern!
Viel Spass beim Testen
Stryke
Code: Alles auswählen
#Vorraussetzungen
#--------------------------------------------------
# 16GB SD Karte
# raspbian-ua-netinst - Raspbian unattended netinstaller
# https://github.com/debian-pi/raspbian-ua-netinst
# Nach der Anleitung auf obiger Seite eine SD Karte vorbereiten.
# Bevor von der SD Karte installiert wird, die angehängte Datei installer-config.txt auf die SD-Karte kopieren
# von der SD Karte booten und warten, Ihr erhaltet dadurch ein Raspbian Basic Image
# Mit der installer-config.txt erhaltet Ihr eine 12 GB Große root Partition, der Rest bleibt vorerst frei
# User: root Passwort: 1
# mit dem Parameter rootsize=+12288M in der installer-config.txt könnt Ihr die Größe der root Partition festlegen.
# Mindesten 2GB sollten für /usr/local frei bleiben!
#raspi_basic_config
#--------------------------------------------------
dpkg-reconfigure locales
# de_DE ISO-8859-1
# de_DE.UTF-8 UTF-8
# de_DE@euro ISO-8859-15
# de_DE.UTF-8 UTF-8 als Haupt locales wählen
dpkg-reconfigure tzdata
# Europa -> Berlin
apt-get -q=2 install libatomic1 libdaemon0 curl libpcap0.8 lighttpd iptables ifplugd unzip inetutils-syslogd fdflush setserial i2c-tools msmtp pcregrep rsync rpi-update openvpn tcl udhcpc dma i2c-tools mtd-utils
rpi-update
# /usr/local muss eine eigene Partition sein, nur dann funktioniert es mit den Backups!
#Eigene Partition /usr/local erstellen
echo -e "n\np\n3\n\n+2G\nw" | fdisk /dev/mmcblk0
reboot
echo "/dev/mmcblk0p3 /usr/local ext4 errors=remount-ro,noatime 0 0" >> /etc/fstab
mkfs.ext4 /dev/mmcblk0p3
# Achtung manuelle Eingabe erforderlich
mount /usr/local
mkdir /usr/local/bin
mkdir /usr/local/etc
mkdir /usr/local/games
mkdir /usr/local/include
mkdir /usr/local/lib
mkdir /usr/local/sbin
mkdir /usr/local/share
mkdir /usr/local/src
mkdir /usr/local/share/man
ln -s /usr/local/share/man /usr/local/man
#RaspberryMatic Image laden und unter /mnt/image mounten
#--------------------------------------------------
#wget -O RaspberryMatic-2.15.5-3.img.zip "http://update.homematic.com/firmware/download?cmd=download&version=2.15.5&serial=TMP&lang=de&product=HM-IMAGE-RASPBERRYMATIC"
wget -O /root/RaspberryMatic-2.15.5-3.img.zip "http://update.homematic.com/firmware/download?cmd=download&version=2.15.5&serial=TMP&lang=de&product=HM-IMAGE-RASPBERRYMATIC"
unzip RaspberryMatic-2.15.5-3.img.zip
# Das entpacken benötigt ca. 10 Minuten, nicht ungeduldig werden
mkdir /mnt/image
mount /root/raspberrymatic-2.15.5-3.img /mnt/image -ooffset=$((22528*512))
#copy /bin
#--------------------------------------------------
mkdir -p /opt/hm/bin
mkdir -p /opt/hm/sbin
cp /mnt/image/bin/ReGaHss /opt/hm/bin
cp /mnt/image/bin/SetInterfaceClock /opt/hm/bin
cp /mnt/image/bin/checkDHCP /opt/hm/bin
cp /mnt/image/bin/crypttool /opt/hm/bin
cp /mnt/image/bin/dhcp.script /opt/hm//bin
cp /mnt/image/bin/dhcp_check.script /opt/hm/bin
cp /mnt/image/bin/eq3configcmd /opt/hm/bin
cp /mnt/image/bin/eq3configd /opt/hm/bin
cp /mnt/image/bin/hm_autoconf /opt/hm/bin
cp /mnt/image/bin/hm_deldev /opt/hm/bin
cp /mnt/image/bin/hm_startup /opt/hm/bin
cp /mnt/image/bin/hs485d /opt/hm/bin
cp /mnt/image/bin/hs485dLoader /opt/hm/bin
cp /mnt/image/bin/hss_led /opt/hm/bin
cp /mnt/image/bin/mountSD /opt/hm/bin
cp /mnt/image/bin/ntpclient /opt/hm/bin
cp /mnt/image/bin/rfd /opt/hm/bin
cp /mnt/image/bin/setHWClock.sh /opt/hm/bin
cp /mnt/image/bin/setclock /opt/hm/bin
cp /mnt/image/bin/setfirewall.tcl /opt/hm/bin
cp /mnt/image/bin/setlgwkey.sh /opt/hm/bin
cp /mnt/image/bin/ssdpd /opt/hm/bin
cp /mnt/image/bin/tclsh /opt/hm/bin
cp /mnt/image/bin/update_firmware_pre /opt/hm/bin
cp /mnt/image/bin/update_firmware_run /opt/hm/bin
cp /mnt/image/bin/yaku-ns /opt/hm/bin
cp /mnt/image/sbin/daemonize /opt/hm/sbin
ln -s /opt/hm/bin/ReGaHss /bin
ln -s /opt/hm/bin/SetInterfaceClock /bin
ln -s /opt/hm/bin/checkDHCP /bin
ln -s /opt/hm/bin/crypttool /bin
ln -s /opt/hm/bin/dhcp.script /bin
ln -s /opt/hm/bin/dhcp_check.script /bin
ln -s /opt/hm/bin/eq3configcmd /bin
ln -s /opt/hm/bin/eq3configd /bin
ln -s /opt/hm/bin/hm_autoconf /bin
ln -s /opt/hm/bin/hm_deldev /bin
ln -s /opt/hm/bin/hm_startup /bin
ln -s /opt/hm/bin/hs485d /bin
ln -s /opt/hm/bin/hs485dLoader /bin
ln -s /opt/hm/bin/mountSD /bin
ln -s /opt/hm/bin/rfd /bin
ln -s /opt/hm/bin/setclock /bin
ln -s /opt/hm/bin/setfirewall.tcl /bin
ln -s /opt/hm/bin/setlgwkey.sh /bin
ln -s /opt/hm/bin/ssdpd /bin
ln -s /opt/hm/bin/tclsh /bin
ln -s /opt/hm/bin/update_firmware_pre /bin
ln -s /opt/hm/bin/update_firmware_run /bin
ln -s /usr/sbin/syslogd /sbin/syslogd
ln -s /usr/bin/vi /bin
ln -s /opt/hm/sbin/daemonize /sbin
#copy firmware & HM specific
#--------------------------------------------------
cp -R /mnt/image/firmware /
cp /mnt/image/boot/VERSION /boot
cp -R /mnt/image/opt/HMServer /opt
#copy lib
#--------------------------------------------------
mkdir -p /opt/hm/lib
cp /mnt/image/lib/libLanDeviceUtils.so /opt/hm/lib
cp /mnt/image/lib/libUnifiedLanComm.so /opt/hm/lib
cp /mnt/image/lib/libXmlRpc.so /opt/hm/lib
cp /mnt/image/lib/libelvutils.so /opt/hm/lib
cp /mnt/image/lib/libeq3config.so /opt/hm/lib
cp /mnt/image/lib/libfirewall.tcl /opt/hm/lib
cp /mnt/image/lib/libhsscomm.so /opt/hm/lib
cp /mnt/image/lib/libtcl8.2.so /opt/hm/lib
cp /mnt/image/lib/libxmlparser.so /opt/hm/lib
cp /mnt/image/lib/tclrega.so /opt/hm/lib
cp /mnt/image/lib/tclrpc.so /opt/hm/lib
cp /mnt/image/lib/tclticks.so /opt/hm/lib
cp -R /mnt/image/lib/tcl8.2 /opt/hm/lib
ln -s /opt/hm/lib/libLanDeviceUtils.so /lib
ln -s /opt/hm/lib/libUnifiedLanComm.so /lib
ln -s /opt/hm/lib/libXmlRpc.so /lib
ln -s /opt/hm/lib/libelvutils.so /lib
ln -s /opt/hm/lib/libeq3config.so /lib
ln -s /opt/hm/lib/libfirewall.tcl /lib
ln -s /opt/hm/lib/libhsscomm.so /lib
ln -s /opt/hm/lib/libtcl8.2.so /lib
ln -s /opt/hm/lib/libxmlparser.so /lib
ln -s /opt/hm/lib/tclrega.so /lib
ln -s /opt/hm/lib/tclrpc.so /lib
ln -s /opt/hm/lib/tcl8.2 /lib
#copy www
#--------------------------------------------------
cp -R /mnt/image/www /
#copy & prepare etc
#--------------------------------------------------
/etc/init.d/lighttpd stop
cp -R /mnt/image/usr/local/etc /usr/local/
cp -R /mnt/image/etc/config_templates /mnt/image/etc/lighttpd /mnt/image/etc/rega.conf /mnt/image/etc/ifplugd /etc
cp -R /mnt/image/etc/init.d/S* /etc/init.d/
cp /mnt/image/etc/rega.conf /etc
ln -s /usr/local/config/TZ /etc/TZ
ln -s /usr/local/etc/config /etc/config
/etc/init.d/lighttpd start
sed -i 's/ PATH=\"\/usr\/local\/sbin:\/usr\/local\/bin:\/usr\/sbin:\/usr\/bin:\/sbin:\/bin\"/ PATH=\"\/usr\/local\/sbin:\/usr\/local\/bin:\/usr\/sbin:\/usr\/bin:\/sbin:\/bin:\/opt\/hm\/bin:\/opt\/hm\/sbin\"/g' /etc/profile
sed -i 's/ start-stop-daemon -S -q -p \/var\/run\/HMServer.pid --exec java -- -Xmx32m -Dlog4j.configuration=file:\/\/\/etc\/config\/log4j.xml -Dfile.encoding=ISO-8859-1 -jar \/opt\/HMServer\/HMServer.jar \&/ start-stop-daemon -S -q -p \/var\/run\/HMServer.pid --exec \/usr\/bin\/java -- -Xmx32m -Dlog4j.configuration=file:\/\/\/etc\/config\/log4j.xml -Dfile.encoding=ISO-8859-1 -jar \/opt\/HMServer\/HMServer.jar \&/g' /etc/init.d/S61HMServer
echo 'export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/lib:/usr/local/lib:/opt/hm/lib' >> /etc/profile
#Java installieren
#--------------------------------------------------
# Download von http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
# Linux ARM v6/v7 Hard Float ABI
# Datein in das /root Verzeichnis des Rasp kopieren
tar zxvf /root/jdk-8u65-linux-arm32-vfp-hflt.tar.gz -C /opt
ln -s /opt/jdk1.8.0_65 /opt/jre
update-alternatives --install /usr/bin/javac javac /opt/jre/bin/javac 1
update-alternatives --install /usr/bin/java java /opt/jre/bin/java 1
update-alternatives --config javac
update-alternatives --config java
#OCCU starten
#--------------------------------------------------
/etc/init.d/occ
SpeedMaxX hat ein Debian kompatibles StartScript gebastelt dieses bitte unter /etc/init.d/occ ablegen. Bitte achtet darauf die Endung .txt weg zu nehmen. Ohne .txt kann ich es nicht hier Hochladen.
Code: Alles auswählen
chmod +x /etc/init.d/occ
update-rc.d occ defaults
Edit 2: 09.03.2016
Falls der HMServer nicht startet passt bitte das Script /etc/init.d/S61HMServer manuell an
Orginal
Code: Alles auswählen
--exec java
Angepasst
Code: Alles auswählen
--exec /usr/bin/java