Main Content

Setup Linux Target Computer

Target Computer

What can be used as a target computer:

Linux x86_64 MachineWindows x86_64 MachineLinux ARM64 Machine

Any Linux machine with x86_64 architecture that supports MATLAB® installation.

For more information, see https://in.mathworks.com/support/requirements/matlab-linux.html

Windows machine with Windows Subsystem for Linux installed.
  • WSL2 is required.

  • WSL Linux distros with minimum versions: Ubuntu 18.04/Debian 11/Oracle Linux_7_9 should be setup.

  • WSL target should be on the same windows host machine.

ARM64 processor based Linux machine.
  • Minimum 2GB RAM and 2GB non volatile free disk storage is required.

  • ARMv8-A or ARMv9-A architecture is required.

  • Linux Kernel version 3.10 or higher is required.

Target Computer Requirements

To deploy Service Oriented Architecture applications on a target computer using the support package, following requirements have to be met.

Steps to Use Non Default Ports

  • For fastDDS communication mode, port numbers 5555 and 5556 on target are used to communicate with the host by default. To modify the port numbers, update them in the <Support-Package-root>/toolbox/coder/linux/host/ContainerConfig.json file. You can get the support package root using the command:

    matlabshared.supportpkg.getSupportPackageRoot

    Port number 22255 is reserved for use on target and hence the port is not configurable.

  • For SSH communication mode, port number 22 is used by default. To modify the port number, use setSSHPort function.

Steps to Configure Non Default SSH Port

In case of SSH, port number 22 is used by default to communicate with the target. To use a different port, follow these steps on target.

  1. Open the file /etc/ssh/sshd_config from your machine in a text editor.

  2. Add a line below the line Port 22. For example, to use port 22345 add the line.

    Port 22345

    Note

    Do not modify the line or delete the line Port 22. Add a new line below it.

  3. Save the changes and close the file.

  4. Restart SSH daemon using the command.

    systemctl restart sshd

After successful restart, the SSH daemon will listen on port 22 or port 22345 for communication.

Steps to setup target

Use the Linux Runtime Manager application to connect, disconnect, add, remove, and update Linux target computers.

To connect to a target computer that is running the Linux operating system:

  1. Open the Linux Runtime Manager.

    linuxRuntimeManager

  2. In the Targets Tree pane, select Target Computers and click plus button in the to add a target computer. In Target Configuration section, enter details for the target computer.

    programmatically:

    tgs = linux.Targets();
    tg = tgs.addTarget(<targetName>, <ipAddress>, <userName>, <password>);

  3. For a newly added target computer, enter the full path of the location at which you want to deploy the application using this command:

    tg.setDeploymentLocation(<Deployment location>);

    Avoid setting temporary folders as deployment location because they might get cleared during system restart. For WSL targets, specify WSL linux file system storage as a deployment location.

  4. To deploy DDS applications configured with RTI Connext vendor, set the value of environment variable NDDSHOME_LINUX on host to the RTI Connext software folder path on Linux target machine.

    setenv('NDDSHOME_LINUX', '<Path for the software>')
    
    For example:
    setenv('NDDSHOME_LINUX', '/home/user/RTIDDS/glnxa64/rti_connext_dds-6.0.1_gcc7.3.0')

  5. Select a target and click the Linux Target > Connect To Target > Connect button.

    Programmatically:

    tg.connect();

    Note

    This step prompts you to provide a deployment location for the target computer if one is already not set.

  6. To update software on the target computer, select the target computer and click Linux Target > Connect To Target > Update Target.

    Programmatically:

    tg.updateTarget();

  7. To disconnect the target computer, select the target computer and click Linux Target > Connect To Target > Disconnect.

    Programmatically:

    tg.disconnect();

  8. To completely remove the target computer files and its storage, use this command:

    tgs.uninstallTarget();

  9. To remove a target computer, select the target computer and click the delete button. This action removes the target computer from the Targets Tree, but the applications deployed to the target computer and its docker image still exist in storage.

    Programmatically:

    tgs.removeTarget(<Target Name>);

Using this application, you can connect to multiple target computers at the same time.

See Also

| | |

Related Topics