1. Firmware aufspielen (erstmals) Laptop direkt am Router ueber einen LAN-Port anschliessen mit lokal abgelegter OpenWrt Firmware: Release am 30.09.2014: Barrier Breaker 14.07 openwrt-mpc85xx-generic-tl-wdr4900-v1-squashfs-factory.bin Dann ueber das normale Netgear GUI einloggen und ueber "Router Update" die OpenWRT Firmware einspielen. (fuer Upgrade: openwrt-mpc85xx-generic-tl-wdr4900-v1-squashfs-sysupgrade.bin) (# sysupgrade -v /tmp/openwrt-mpc85xx-generic-tl-wdr4900-v1-squashfs-sysupgrade.bin) Anschliessend warten bis der Router normal rebootet hat. 2. Passwort setzen Zuerst mit telnet (kein Passwort noetig) einloggen und mit "passwd" ein Passwort setzen. Dann telnet-Session beenden. Anschliessend mit SSH und Passwort das neue Login pruefen. 3. Grundkonfiguration fuer LAN einrichten Ziel: Geraet soll als Server ohne DHCP Service ins LAN eingebunden werden Via http://192.168.1.1 in Luci einloggen und im Screen "Network" die noetigen Eintraege machen - IPv4-Address (192.168.1.15) - IPv4-Gateway (192.168.1.1) - DNS-Server (192.168.1.1) - DHCP-Server: Disable DHCP for this interface --> Save --> Router kann nun im LAN angeschlossen werden. 4. Weitere Konfigurationen fuer LAN machen Ziel: Geraet soll im LAN nur seine Serverfunktion erfuellen Menu System Screen "System" - Timezone: Europe/Zurich (ev. ist ein Reload des GUI noetig) - Enable builtin NTP Server 5. USB Storage einbinden (USB Stick 2.0) - Inhalt von File /etc/opkg.conf kontrollieren, insbesondere nach einem Upgrade # opkg update # opkg install kmod-scsi-core kmod-usb-storage block-mount kmod-lib-crc16 kmod-fs-ext4 # reboot Falls ein Stick von Windows uebernommen werden soll # opkg install kmod-fs-vfat kmod-nls-cp437 kmod-nls-cp850 kmod-nls-iso8859-1 kmod-nls-iso8859-15 Fuer einen neuen Stick # opkg install e2fsprogs --> installiert libpthread, libcom_err, libext2fs, e2fsprogs # opkg install fdisk # fdisk /dev/sda - o (create a new empty DOS partition table) - n (add a new partition table) -- p -- Partition number: 1 -- First cylinder: default (1) -- Last cylinder: default (1018) - w (write table to disk and exit) # mkfs.ext4 /dev/sda1 # mkdir /usb Mount beim Boot einrichten, ueber LuCI: Screen "System - Mount Points": unbedingt async angeben, sonst ist der Schreibzugriff sehr langsam - enable /dev/sda1 /usb ext4 rw,async # reboot 6. Nuetzliche Hilfsprogramm installieren # opkg install diffutils curl 7. Backup einrichten # crontab -l 5 6 * * * /usb/bin/backup.sh # cat /usb/bin/backup.sh #!/bin/sh echo 'backup script' tar cX /usb/bin/backup.exclude -f /usb/wrt3-backup.tar /etc/config /etc/init.d /root /usb/bin # ln -s /usb/wrt3-backup.tar /www/wrt3-backup.tar 8. PHP Support installieren (noetig fuer knxweb) # opkg install php5-cgi /etc/php.ini anpassen doc_root = cgi.force_redirect = 0 # uhttpd konfigurieren File /etc/config/uhttpd ergaenzen mit list interpreter ".php=/usr/bin/php-cgi" # /etc/init.d/uhttpd restart 9. Zusaetzliche Pakete installieren # mkdir -p /usb/pkgs # cd /usb/pkgs Zusaetzliche Pakete in /usb/pkgs ablegen: pthsem, eibd, eibd-utils, libesmtp, linknx # opkg install libstdcpp # opkg install luac # opkg install pthsem_2.0.8-1_mpc85xx.ipk # opkg install eibd_0.0.5-2011-03-06_mpc85xx.ipk # opkg install eibd-utils_0.0.5-2011-03-06_mpc85xx.ipk # opkg install libesmtp_1.0.4-2_mpc85xx.ipk # opkg install linknx_0.0.1.32-1_mpc85xx.ipk # eibd --version # linknx --version # cp /usb/backup/linknx /etc/init.d # /etc/init.d/linknx start Test mit "tail -f /var/lib/linknx/linknx.log" 10. rrd Tools mit Perl installieren # opkg install perl # opkg install perlbase-posix perlbase-essential perlbase-fcntl perlbase-xsloader # opkg install perlbase-tie perlbase-time perlbase-config perlbase-file # opkg install librrd rrdtool 11. Installation xmail # opkg install bzip2 # opkg install xmail # /etc/init.d/xmail enable # opkg --dest opt install mutt # opkg --dest opt install procmail Konfiguration einrichten: /etc/config/xmail anpassen # cp /usb/backup/etc/config/xmail /etc/config # mkdir /usb/xmail # cd /usb/xmail; bzip2 -dc /etc/MailRoot.tar.bz2 | tar xf - Xmail little HowTo Queuelog finden: find spool -type f | grep slog Admin UI: telnet localhost 6017 12. knxweb einrichten # ln -s /usb/knx/knxweb /www/knxweb # ln -s /usb/knx/cgi/sysgraph-multi.cgi /www/cgi-bin # ln -s /usb/knx/cgi/sysgraph-single.cgi /www/cgi-bin # ln -s /usb/knx/cgi/sysgraph-singlesmall.cgi /www/cgi-bin Erweiterung für knxweb2 # opkg install --dest opt php5-mod-json php5-mod-session php5-mod-simplexml php5-mod-sockets /etc/php.ini anpassen: short_open_tag = On date.timezone = "Europe/Zurich" extension_dir = "/usr/lib/php" extension=json.so extension=session.so extension=sockets.so extension=simplexml.so