This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
virtualisation:hello [2022/04/29 13:11] – schmitt | virtualisation:hello [2022/05/03 10:40] (current) – removed schmitt | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | =====Freeboard auf Alpine Container ===== | ||
- | ===1. Container auf NB2800 erstellen === | ||
- | Navigiere zu System -> Virtualisation und aktiviere den Administrativen Status.\\ | ||
- | Bei dem Unterpunkt Install folgende URL eingeben. https:// | ||
- | Bei dem Unterpunkt Networking muss Mode auf Bridged und LAN1 als Bridge Interface eingegeben werden. \\ | ||
- | Auf der GUI muss außerdem ein statischer Host unter dem Punkt Service-> | ||
- | ===2. Freeboard auf Container laden === | ||
- | Im nächsten Schritt wird freeboard auf den Container geladen. \\ | ||
- | | ||
- | Das gesamte Verzeichnis muss auf den Router unter mnt/ | ||
- | Da dieses Verzeichnis möglicherweise nicht von beginn an da ist, muss mit mkdir das Verzeichnis erstellt werden.\\ | ||
- | Das folgende kommando ist ein Beispiel: | ||
- | scp -r freeboard root@192.168.1.1:/ | ||
- | |||
- | ===3. lighttpd installieren und konfigurieren === | ||
- | Installieren sie den lighttpd server mit den folgenden Kommandos. | ||
- | apk add lighttpd | ||
- | rc-update add lighttpd default | ||
- | rc-service lighttpd restart | ||
- | Die konfig für den Web Server ist unter / | ||
- | Hier muss das Modul mod_proxy geladen und der Eintrag var.basedir = "/ | ||
- | Unter server.document-root = var.basedir kann das htdocs entfernt werden. Desweiteren muss ein proxy Server eingefügt werden. Desweiteren wird ein Proxyserver benötigt, der die kommunikation zwischen NB2800 und Container übernimmt. | ||
- | var.basedir | ||
- | ... | ||
- | server.modules = ( | ||
- | # | ||
- | " | ||
- | # ... | ||
- | ) | ||
- | ... | ||
- | server.document-root = var.basedir | ||
- | ... | ||
- | proxy.server = ( " | ||
- | ( ( | ||
- | " | ||
- | " | ||
- | ) ) | ||
- | ) | ||
- | ===4. Freeboard an Router-config anpassen=== | ||
- | In den / | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | }, | ||
- | " | ||
- | " | ||
- | " | ||
- | }, | ||
- | " | ||
- | " | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | } | ||
- | }, | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | } | ||
- | }, | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | } | ||
- | }, | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | } | ||
- | } | ||
- | ] | ||
- | }, | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | }, | ||
- | " | ||
- | " | ||
- | " | ||
- | }, | ||
- | " | ||
- | " | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | } | ||
- | }, | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | } | ||
- | }, | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | } | ||
- | }, | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | } | ||
- | } | ||
- | ] | ||
- | }, | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | }, | ||
- | " | ||
- | " | ||
- | " | ||
- | }, | ||
- | " | ||
- | " | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | } | ||
- | }, | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | } | ||
- | } | ||
- | ] | ||
- | } | ||
- | ], | ||
- | " | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | } | ||
- | }, | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | } | ||
- | } | ||
- | ], | ||
- | " | ||
- | } | ||
- | scp db.json root@192.168.1.1:/ | ||
- | scp actuator.js root@192.168.1.1:/ | ||
- | Hier müssen auch noch mit | ||
- | chmod 744 db.json | ||
- | chmod 744 db.js | ||
- | die Rechte für beide geändert werden. | ||
- | Diese muss an die Konfiguration des Routers angepasst werden. actuator.js muss bei index.html head.js eingefügt werden. | ||
- | head.js(" | ||
- | |||
- | Die actuator.js kann [[https:// | ||
- | ===5. SDK-Skript anpassen und erstellen=== | ||
- | oldlink = ""; | ||
- | while (1){ | ||
- | priolink = nb_config_get(" | ||
- | if(priolink != oldlink){ | ||
- | oldlink = priolink; | ||
- | nb_wanlink_priorize(sprintf(" | ||
- | } | ||
- | sleep(5); | ||
- | } | ||
- | Das SDK-Skript mobile-link.are muss bei der funktion nb_wanlink_priorize(sprintf(" | ||
- | ===6. Image === | ||