installingmixonrpi
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| installingmixonrpi [2026/09/18 00:43] – wikiadmin | installingmixonrpi [2026/10/27 17:06] (current) – tputman | ||
|---|---|---|---|
| Line 3: | Line 3: | ||
| Complete [[BaseRaspberryPiSetupBookworm]|Raspberry Pi Base Setup]] first. | Complete [[BaseRaspberryPiSetupBookworm]|Raspberry Pi Base Setup]] first. | ||
| - | These instructions | + | These instructions |
| <code text> | <code text> | ||
| / | / | ||
| + | </ | ||
| + | |||
| + | MIX requires **Java 25**. | ||
| + | |||
| + | The validated Raspberry Pi installation used: | ||
| + | |||
| + | <code text> | ||
| + | / | ||
| </ | </ | ||
| The normal MIX web port is **7226** unless '' | The normal MIX web port is **7226** unless '' | ||
| - | The normal addresses are: | + | The MIX setup page is: |
| <code text> | <code text> | ||
| - | http://< | ||
| http://< | http://< | ||
| </ | </ | ||
| - | The first opens the application | + | After an MIStudio project is deployed, |
| - | ===== 1. Install MIX ===== | + | <code text> |
| + | http://< | ||
| + | </ | ||
| - | Install MIX using the ErgoTech | + | ===== 1. Copy the MIX runtime to the Raspberry Pi ===== |
| - | When installation | + | On the Windows computer, open PowerShell and change to the MIX installation |
| + | |||
| + | For example: | ||
| + | |||
| + | <code text> | ||
| + | Set-Location " | ||
| + | </ | ||
| + | |||
| + | Create the MIX runtime directory on the Raspberry Pi: | ||
| + | |||
| + | <code text> | ||
| + | ssh mix@< | ||
| + | </ | ||
| + | |||
| + | Copy the contents of the MIX runtime directory: | ||
| + | |||
| + | <code text> | ||
| + | scp -r .\* mix@< | ||
| + | </ | ||
| + | |||
| + | After the copy completes, connect to the Pi: | ||
| + | |||
| + | <code text> | ||
| + | ssh mix@< | ||
| + | </ | ||
| + | |||
| + | Verify the runtime files: | ||
| + | |||
| + | <code text> | ||
| + | ls -la / | ||
| + | ls -la / | ||
| + | </ | ||
| + | |||
| + | The MIX runtime | ||
| <code text> | <code text> | ||
| - | runmix.sh | ||
| mix.jar | mix.jar | ||
| mix.properties | mix.properties | ||
| - | log4j.mix.xml | + | htmlroot/ |
| + | lib/ | ||
| + | log4j/ | ||
| + | logs/ | ||
| + | scripts/ | ||
| + | security/ | ||
| </ | </ | ||
| - | Make the startup script | + | The Linux startup script |
| <code text> | <code text> | ||
| - | chmod +x / | + | / |
| </ | </ | ||
| - | ===== 2. Run MIX automatically as a Linux service ===== | + | Make the Linux scripts executable: |
| - | Linux uses **systemd** to manage services. A MIX systemd service starts MIX automatically during boot and restarts it if the process stops. | + | <code text> |
| + | chmod +x / | ||
| + | chmod +x / | ||
| + | chmod +x / | ||
| + | </ | ||
| - | MIX console output should also be redirected to its own file. This prevents Java console messages from filling Linux logs such as '' | + | If the copied |
| - | ==== If no MIX service exists yet ==== | + | Each Raspberry Pi must use the runtime license associated with that Pi. |
| - | Create the log directory: | + | ===== 2. Verify Java 25 ===== |
| + | |||
| + | Verify the Java installation: | ||
| + | |||
| + | <code text> | ||
| + | / | ||
| + | </ | ||
| + | |||
| + | The validated installation reports: | ||
| + | |||
| + | <code text> | ||
| + | openjdk version " | ||
| + | </ | ||
| + | |||
| + | MIX can use this Java installation directly without changing the Raspberry Pi's system-wide Java default. | ||
| + | |||
| + | ===== 3. Start MIX manually ===== | ||
| + | |||
| + | Change to the MIX runtime directory: | ||
| + | |||
| + | <code text> | ||
| + | cd / | ||
| + | </ | ||
| + | |||
| + | Start MIX with Java 25: | ||
| + | |||
| + | <code text> | ||
| + | MIX_JAVA_HOME=/ | ||
| + | ./ | ||
| + | </ | ||
| + | |||
| + | Startup output should identify the MIX installation, | ||
| + | |||
| + | For example: | ||
| + | |||
| + | <code text> | ||
| + | MIX_INSTALL_DIR: | ||
| + | MIX_WORK_DIR: | ||
| + | MIX properties: | ||
| + | Java executable: | ||
| + | Native libraries: / | ||
| + | Debug port: | ||
| + | </ | ||
| + | |||
| + | MIX should also report: | ||
| + | |||
| + | <code text> | ||
| + | mix.port: | ||
| + | </ | ||
| + | |||
| + | and its MIX build number. | ||
| + | |||
| + | If a Raspberry Pi runtime license has not yet been installed, MIX will display the system' | ||
| + | |||
| + | <code text> | ||
| + | Initializing MIX runtime with prelicense key: < | ||
| + | </ | ||
| + | |||
| + | Keep this key for the license request. | ||
| + | |||
| + | ===== 4. Install the Raspberry Pi runtime license ===== | ||
| + | |||
| + | Each Raspberry Pi requires an ErgoTech runtime license associated with that system. | ||
| + | |||
| + | The pre-license key is shown during MIX startup. It can also be viewed from the MIX setup page: | ||
| + | |||
| + | <code text> | ||
| + | http://< | ||
| + | </ | ||
| + | |||
| + | Select **Get Pre-License Key** and send the displayed key to ErgoTech. | ||
| + | |||
| + | Copy the license provided for the Raspberry Pi into: | ||
| + | |||
| + | <code text> | ||
| + | / | ||
| + | </ | ||
| + | |||
| + | The filename may include the pre-license key, for example: | ||
| + | |||
| + | <code text> | ||
| + | ErgoIOTLicense_< | ||
| + | </ | ||
| + | |||
| + | If TransSECS has already been licensed on the same Raspberry Pi using the same pre-license key, the Pi-specific ErgoIOT runtime license can also be copied into the MIX runtime directory. | ||
| + | |||
| + | Start MIX again: | ||
| + | |||
| + | <code text> | ||
| + | cd / | ||
| + | |||
| + | MIX_JAVA_HOME=/ | ||
| + | ./ | ||
| + | </ | ||
| + | |||
| + | Verify that startup contains: | ||
| + | |||
| + | <code text> | ||
| + | Valid IOT System Runtime License detected. | ||
| + | </ | ||
| + | |||
| + | ===== 5. Verify the MIX web server ===== | ||
| + | |||
| + | While MIX is running, verify that port 7226 is listening: | ||
| + | |||
| + | <code text> | ||
| + | sudo ss -ltnp | grep 7226 | ||
| + | </ | ||
| + | |||
| + | A normal result contains: | ||
| + | |||
| + | <code text> | ||
| + | LISTEN ... *:7226 ... java | ||
| + | </ | ||
| + | |||
| + | From a browser on another computer, open: | ||
| + | |||
| + | <code text> | ||
| + | http://< | ||
| + | </ | ||
| + | |||
| + | Verify that the MIX setup page loads. | ||
| + | |||
| + | ===== 6. Deploy an MIStudio project to the Raspberry Pi ===== | ||
| + | |||
| + | In MIStudio, select the project' | ||
| + | |||
| + | Configure the target with the Raspberry Pi address. | ||
| + | |||
| + | For example: | ||
| + | |||
| + | <code text> | ||
| + | Host Name: < | ||
| + | Mix Login Name: ergouser | ||
| + | Port: | ||
| + | Target Name: MIX | ||
| + | </ | ||
| + | |||
| + | Enter the configured MIX password. | ||
| + | |||
| + | Save the MIStudio project and select **Deploy**. | ||
| + | |||
| + | During a successful deployment, MIX should: | ||
| + | |||
| + | * authenticate the MIStudio deployment request, | ||
| + | * stop the currently loaded application logic, | ||
| + | * replace the deployed application files, | ||
| + | * receive the new '' | ||
| + | * reload the application logic, | ||
| + | * continue running without requiring the MIX process to be stopped manually. | ||
| + | |||
| + | After deployment, open: | ||
| + | |||
| + | <code text> | ||
| + | http://< | ||
| + | </ | ||
| + | |||
| + | Verify that the newly deployed application loads. | ||
| + | |||
| + | The MIX console should show the deployment files being received and the application logic being reloaded. | ||
| + | |||
| + | ===== 7. Stop the manual MIX process ===== | ||
| + | |||
| + | Before configuring automatic startup, stop the manually started MIX process. | ||
| + | |||
| + | If MIX is running in the foreground, press: | ||
| + | |||
| + | <code text> | ||
| + | Ctrl+C | ||
| + | </ | ||
| + | |||
| + | Verify that no MIX HeadlessController process remains: | ||
| + | |||
| + | <code text> | ||
| + | pgrep -af ' | ||
| + | </ | ||
| + | |||
| + | No output should be returned. | ||
| + | |||
| + | ===== 8. Run MIX automatically as a Linux service ===== | ||
| + | |||
| + | Create the log directory | ||
| <code text> | <code text> | ||
| Line 68: | Line 299: | ||
| [Service] | [Service] | ||
| - | User=root | + | User=mix |
| WorkingDirectory=/ | WorkingDirectory=/ | ||
| - | ExecStart=/ | + | Environment=" |
| + | ExecStart=/ | ||
| Restart=always | Restart=always | ||
| RestartSec=60 | RestartSec=60 | ||
| Line 82: | Line 314: | ||
| Save with **Ctrl+O**, **Enter**, **Ctrl+X**. | Save with **Ctrl+O**, **Enter**, **Ctrl+X**. | ||
| - | Then: | + | Reload systemd, enable MIX at boot, and start it: |
| <code text> | <code text> | ||
| Line 88: | Line 320: | ||
| sudo systemctl enable mix | sudo systemctl enable mix | ||
| sudo systemctl start mix | sudo systemctl start mix | ||
| - | sudo systemctl status mix | ||
| </ | </ | ||
| - | Look for '' | + | Verify |
| - | ==== If MIX already has a service ==== | + | <code text> |
| + | systemctl status mix --no-pager | ||
| + | </ | ||
| - | Do not replace a working service file merely to add console logging. | + | Look for: |
| - | + | ||
| - | First inspect it: | + | |
| <code text> | <code text> | ||
| - | sudo systemctl cat mix.service | + | Active: active (running) |
| </ | </ | ||
| - | Create a systemd override directory: | + | Verify the MIX Java process: |
| <code text> | <code text> | ||
| - | sudo mkdir -p / | + | pgrep -af ' |
| </ | </ | ||
| - | This is the standard Linux location for local changes to an existing service. It keeps the original MIX service definition unchanged. | + | The process should use: |
| - | + | ||
| - | Create: | + | |
| <code text> | <code text> | ||
| - | sudo nano /etc/systemd/system/mix.service.d/override.conf | + | /opt/java/zulu25.34.17-ca-fx-jdk25.0.3-linux_aarch64/ |
| </ | </ | ||
| - | Paste: | + | Verify that MIX is listening on port 7226: |
| <code text> | <code text> | ||
| - | [Service] | + | sudo ss -ltnp | grep 7226 |
| - | StandardOutput=append:/ | + | |
| - | StandardError=append:/ | + | |
| </ | </ | ||
| - | Save with **Ctrl+O**, **Enter**, **Ctrl+X**. | + | ===== 9. Verify MIX console logging ===== |
| - | Apply and restart: | + | MIX console output is written to: |
| <code text> | <code text> | ||
| - | sudo systemctl daemon-reload | + | /home/mix/ |
| - | sudo systemctl restart | + | |
| </ | </ | ||
| - | Verify | + | Verify: |
| <code text> | <code text> | ||
| - | sudo systemctl cat mix.service | + | tail -n 40 /home/mix/ |
| </ | </ | ||
| - | ===== 3. Verify | + | Check the MIX build, pre-license key, and license result: |
| - | + | ||
| - | Run: | + | |
| <code text> | <code text> | ||
| - | tail -n 20 / | + | grep -E " |
| + | / | ||
| </ | </ | ||
| - | You should see MIX and Java startup | + | A successfully licensed |
| - | + | ||
| - | It is normal for '' | + | |
| - | + | ||
| - | ===== 4. Get the MIX license ===== | + | |
| - | + | ||
| - | From a browser on a PC, open: | + | |
| <code text> | <code text> | ||
| - | http://<Pi-address>:7226/setup.html | + | Running MIX Build <build-number> |
| + | Initializing MIX runtime with prelicense key: < | ||
| + | Valid IOT System Runtime License detected. | ||
| </ | </ | ||
| - | Click **Get Pre-License Key**. | + | Verify |
| - | + | ||
| - | Send the displayed pre-license key to ErgoTech. | + | |
| - | + | ||
| - | The ErgoTech license is associated with the individual system. Changing the hostname, IP address, or network configuration does not change the license. | + | |
| - | + | ||
| - | Copy the '' | + | |
| <code text> | <code text> | ||
| - | / | + | ls -l / |
| </ | </ | ||
| - | Then restart MIX: | + | With the validated systemd configuration, |
| <code text> | <code text> | ||
| - | sudo systemctl restart mix | + | root root |
| </ | </ | ||
| - | Opening **Get Pre-License Key** also provides a convenient way to update the Raspberry Pi’s date and time. This is useful on systems which do not have access to a network time server. | + | ===== 10. Limit the MIX console log ===== |
| - | + | ||
| - | The same setup page contains **Network Configuration** for systems which use MIX to manage the Pi’s network settings. | + | |
| - | + | ||
| - | ===== 5. Limit the MIX console log ===== | + | |
| Create: | Create: | ||
| Line 194: | Line 405: | ||
| <code text> | <code text> | ||
| / | / | ||
| + | su root root | ||
| size 5M | size 5M | ||
| rotate 5 | rotate 5 | ||
| Line 201: | Line 413: | ||
| notifempty | notifempty | ||
| copytruncate | copytruncate | ||
| - | create 0644 root root | ||
| } | } | ||
| </ | </ | ||
| Line 207: | Line 418: | ||
| Save with **Ctrl+O**, **Enter**, **Ctrl+X**. | Save with **Ctrl+O**, **Enter**, **Ctrl+X**. | ||
| - | Check it: | + | Check the rule: |
| <code text> | <code text> | ||
| Line 216: | Line 427: | ||
| * '' | * '' | ||
| - | * '' | + | * '' |
| * '' | * '' | ||
| - | If the current file is smaller than 5 MB, '' | + | If the current file is smaller than 5 MB, '' |
| - | '' | + | To verify the rule completely, force one rotation: |
| - | ===== 6. Reboot and verify MIX ===== | + | <code text> |
| + | sudo logrotate -vf / | ||
| + | </ | ||
| + | |||
| + | Check the result: | ||
| + | |||
| + | <code text> | ||
| + | ls -lh / | ||
| + | systemctl status mix --no-pager | ||
| + | pgrep -af ' | ||
| + | </ | ||
| + | |||
| + | The previous console contents should be copied to: | ||
| + | |||
| + | <code text> | ||
| + | runmix-console.log.1 | ||
| + | </ | ||
| + | |||
| + | The active '' | ||
| + | |||
| + | Generate a new request: | ||
| + | |||
| + | <code text> | ||
| + | curl -s -o /dev/null http:// | ||
| + | sleep 2 | ||
| + | </ | ||
| + | |||
| + | Verify that the active log receives new output: | ||
| + | |||
| + | <code text> | ||
| + | ls -lh / | ||
| + | tail -n 10 / | ||
| + | </ | ||
| + | |||
| + | A successful test should show: | ||
| + | |||
| + | <code text> | ||
| + | Default Servlet : GET Request: / | ||
| + | </ | ||
| + | |||
| + | ===== 11. Reboot and verify MIX ===== | ||
| + | |||
| + | Reboot: | ||
| <code text> | <code text> | ||
| Line 229: | Line 482: | ||
| </ | </ | ||
| - | After about a minute, reconnect | + | After the Raspberry Pi comes back online, reconnect: |
| <code text> | <code text> | ||
| - | systemctl status mix | + | ssh mix@< |
| - | tail -n 20 /home/ | + | </ |
| - | df -h / | + | |
| - | ls -lh /var/log/syslog* | + | Verify that MIX started automatically: |
| - | ls -lh /var/log/daemon.log* | + | |
| - | cat /var/log/ergotech-boot-maintenance.log | + | <code text> |
| + | systemctl status mix --no-pager | ||
| + | </code> | ||
| + | |||
| + | Verify the MIX Java process: | ||
| + | |||
| + | <code text> | ||
| + | pgrep -af 'com.ergotech.mix.server.HeadlessController' | ||
| + | </code> | ||
| + | |||
| + | Verify port 7226: | ||
| + | |||
| + | <code text> | ||
| + | sudo ss -ltnp | grep 7226 | ||
| + | </code> | ||
| + | |||
| + | Verify that the current boot started MIX and accepted the runtime license: | ||
| + | |||
| + | <code text> | ||
| + | grep -E " | ||
| + | /home/mix/mixruntime/logs/runmix-console.log | tail -n 10 | ||
| </ | </ | ||
| Line 243: | Line 516: | ||
| * MIX is '' | * MIX is '' | ||
| - | * '' | + | * MIX is running with Java 25. |
| - | * The SD card has plenty of free space. | + | * Port 7226 is listening. |
| - | * '' | + | * The current |
| - | * The boot-maintenance log shows a successful run after the reboot. | + | * The Raspberry Pi runtime license is accepted. |
| + | * '' | ||
| + | |||
| + | Finally, open: | ||
| + | |||
| + | <code text> | ||
| + | http://< | ||
| + | </ | ||
| - | If this SD card will become a master image, | + | and verify |
| + | At this point MIX is installed, licensed, configured for automatic startup, accepting MIStudio deployments, | ||
installingmixonrpi.1789706590.txt.gz · Last modified: by wikiadmin
