Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Overview

This page outlines deploying solutions on Linux distributions, focusing on command-line methods for setting up and configuring a computer as a client. It includes steps for system registration, Mono installation to support .NET Framework applications, and transferring necessary files to the server. Key procedures involve disabling the firewall, running the TServer application, and setting up TServer as a service for automatic operation on Ubuntu. The documentation emphasizes using command-line interfaces for deployment and service management, ensuring continuous server operation without manual intervention.

On this page:

Table of Contents
maxLevel3
stylenone


The UBUNTU used version for testing was 22.04. It was also tested with Debian 12 and it worked. Others OS that accept .net8.0 should work as well, the only difference can be in how to install .net8.0.

Step 1

.NET 8.0 should already be installed on Linux; if not, proceed to the section "Steps to install .NET 8 on Linux (Ubuntu).”

Step 2

Here we will import the necessary files to open the connection between your computer and Linux

Code Block
git clone <https://github.com/tatsoftdocs/FrameworX><buildNumber>.git

Where, <buildNumber> will be the build number of FrameworX, , the build number you can find in “Solution Manager” > “Connected Server Information” > “Installed Versions” e.g:

Code Block
git clone <https://github.com/tatsoftdocs/FrameworX326.git>

If that doesn’t work for you, you have a secondary option below:

Copy the files and subdirectories from the Windows installation directory "<Install Path>\FrameworX\net8.0" to the Linux directory "/Home/FrameworX".

Step 3

On Linux, we will run the WebServices to connect to the windows computer. Inside the directory "/Home/FrameworX/", run the following command:

Code Block
dotnet TWebServices.dll

After you run this command, it should show you in terminal that it is running and what is the IP and Port.

Step 4

After that, simply run FrameworX.exe on Windows, connect to Linux in “Server Information” > “Remote Server” > add the IP and port (it will be shown when you do the command in step 3), “Upgrade Product…” with the options you want to install on Linux (for example: HTML5, Designer/Remote, Protocol Drivers, etc.). Here you import to Linux the product installation.

Step 5

Finally, “Upload File…”, and upload the file you will use in the Linux environment, it is important to notice that the project has to be created as multiproject option.


Steps to install .NET 8 on Linux (Ubuntu)

To install .NET 8 on a Linux machine, follow the steps below. The instructions are based on the Ubuntu distribution, but can be adapted for other distributions.

Update existing packages:

Code Block
sudo apt update sudo apt upgrade -y

Install the required packages

Code Block
sudo apt install -y wget apt-transport-https

Add the Microsoft Package Signing key

Code Block
wget <https://packages.microsoft.com/config/ubuntu/$>(lsb_release -rs)/packages-microsoft-prod.deb sudo dpkg -i packages-microsoft-prod.deb

Update the repositories: 

Code Block
sudo apt update

Install the .NET 8 SDK:

Code Block
sudo apt install -y dotnet-sdk-8.0

Verify the installation:

Code Block
dotnet --version

Red Hat 8

This section provides instructions for deploying projects on Linux Red Hat 8 using command-line methods. To execute the deployment on Red Hat 8 and make all necessary configurations, you will require a PC as a client. Once the deployment and configuration are complete, your Red Hat server will operate continuously without interruption.

Settings Procedure

1 - This test was done using VMware Workstation 17 Player as the virtual machine, and RedHat Enterprise Linux 8.7 64-bit as the operational system.

2 - It was necessary to register and subscribe a RHEL system to the Red Hat Customer Portal using Red Hat Subscription-Manager using this command in prompt.

To get root permissions before doing that, use the following in the command line.

Code Block
su //after clicking enter, it will ask for your RHEL password
Code Block
subscription-manager register --username <username> --password <password> --auto-attach

You can find more information about it in the following link

https://access.redhat.com/solutions/253273

3 - Once that is done, it is necessary to download mono to make possible to run .NET Framework applications.

First command to download Red Hat 8 is to update the system repository:

Code Block
sudo dnf update

Second is to download the Mono package:

Code Block
sudo dnf config-manager --add-repo https://download.mono-project.com/repo/centos8-stable.repo //This line code maybe will be necessary
sudo dnf install mono-complete

After waiting to install all the package, write this command line to be sure that mono was installed correctly.

Code Block
mono --version

4 - On computer: Transfer folder "ProjectServer" localized in C:\Program Files (x86)\\\\IoT\ProjectServer .. and transfer to /home/username/ in Server Ubuntu. You can use any kind of file transfer. For this example, we generated a link from our driver, and accessed it in RHEL through Firefox browser.

5 - Deactivate Firewall in RHEL

Code Block
systemctl stop firewalld

6 - Run the TServer using this command line. After this your Port will be open to receive TServer.

Code Block
mono /home/user/Documents/ProjectServer/ProjectServer.exe //The path depends where you put the folder, this is just an example

7 - Now you need to create a Linux project on your computer. Follow the steps:

Open 'Welcome' in FrameworX ->
Create new project with - Product Family: EdgeGateway;
Target Framework: Linux/Mono 

In Welcome -> Server tab -> Remote -> Server Ip -> Connect button -> Update button -> Upload Project, you can choose the project created before.

License tab -> Load license key

Projects -> Refresh -> Open project

Run -> Startup -> Run Startup button

8 - Now you can see in RHEL that your TServer is running, it should be like this:

Image Removed

Image Removed

If you are getting some error, please be sure that you are running in root level, just execute this command line:

Code Block
su //after clicking enter, it will ask for your RHEL password

How to Deploy Projects

This document shows how to deploy Projects in Linux through code lines (without graphics image in Ubuntu Server) and how to initialize the FrameworX TServer automatically when Ubuntu is initialized. However, you need a PC as a client for doing the deployment in Linux and make all necessary settings, after it, your Linux Server will keep running. 

Installing and Deploying Ubuntu

We used Putty and FileZilla software to access the Ubuntu Server.

On Ubuntu Server: 

Code Block
> sudo apt-get install openssh-server

On Computer:
Open putty and connect in Ubuntu Server.

Through Putty or Linux Terminal:

Commands taken from the PDF ‘How to Deploy Projects on Raspberry Pi or Linux’:

Code Block
> sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys
3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
 
> echo "deb http://download.mono-project.com/repo/debian wheezy
main" | sudo tee /etc/apt/sources.list.d/mono-xamarin.list
 
> echo "deb http://download.mono-project.com/repo/debian wheezyapache24-compat main" | sudo tee -a /etc/apt/sources.list.d/monoxamarin.list
 
> sudo apt-get update
> sudo apt-get upgrade
> sudo apt-get install mono-devel
> sudo apt-get install mono-complete
> sudo apt-get install referenceassemblies-pcl

On computer:
Transfer folder "ProjectServer" localized in C:\Program Files (x86)\\\\IoT\ProjectServer .. and transfer to /home/username/ in Server Ubuntu. We used FileZilla software to transfer. 

On Putty or Linux Terminal:
Install the xvfb with: 

Code Block
> sudo apt-get install xvfb

Create a screen with command: 

Code Block
> screen -S 'screen_name'

Use command to run server: 

Code Block
> xvfb-run mono /home/username/ProjectServer/ProjectServer.exe

Open 'Welcome' in FrameworX ->
Create new project with - Product Family: EdgeGateway;
Target Framework: Linux/Mono 

In Welcome -> Server tab -> Remote -> Server Ip -> Connect button -> Update button -> Upload Project, you can choose the project created before 

License tab -> Load license key

Projects -> Refresh -> Open project

Run -> Startup -> Run Startup button

If you wish you can run the project via ubuntu server using command:
Code Block
> xvfb-run --auto-servernum --server-num=1 mono
/home/username/TServer/TServer.exe /Project:project_name.tproj

AutoLogin Ubuntu

If your Ubuntu Server have Login and Password and you wish to enter in your Ubuntu server automatically you can do the steps below: 

On Putty or Linux Terminal:

Code Block
> sudo systemctl edit getty@tty1.service

This will the create a drop-in file (if neccessary) and open it an editor. Add the following, replacing myusername with your user name

Code Block
[Service]
ExecStart=
ExecStart=-/sbin/agetty --noissue --autologin myusername %I $TERM
Type=idle

This will:
Create the folder /etc/systemd/system/getty@tty1.service.d if necessary
Create the file /etc/systemd/system/getty@tty1.smervice.d/override.conf if necessary

AutoRun FactoryStudio TServer with Service

When Ubuntu initializes your FactoryStudio TServer will initialize automatically.

On Putty or Linux Terminal:

Code Block
> sudo su
> nano /usr/local/sbin/my-startup.sh

You can write the text below to initialized your Server with this command: 

Code Block
#!/bin/sh
xvfb-run mono /home/username/ProjectServer/ProjectServer.exe

Save it! 

After: 

Code Block
> chmod +x /usr/local/sbin/my-startup.sh
> nano /etc/systemd/system/my-startup.service

You can write the text below: 

Code Block
[Unit]
Description=My Startup
[Service]
ExecStart=/usr/local/sbin/my-startup.sh
[Install]
WantedBy=multi-user.target

Save it too!
After:

Code Block
> systemctl status my-startup.service
> systemctl enable my-startup.service
> reboot

Your Server will be running when Ubuntu initialized!

After reboot your Server Ubuntu you can open Welcome of FrameworX, 'Server' tab and connect again in "Remote -> Server IP" you can open your project and Run it.

In your software you can open "Trace Window" and you will could see information, errors, warning and debugs of your project.

In Putty you can write "systemctl status my-startup.service" and you will see status of project working.

On the computer, you can keep your project running and close the Engineering. In ‘Welcome FrameworX’ you can alter the ‘Remote’ to ‘Local’ and when you need to open your project and manage it, you need only access via “remote” again. 

In this section...

Page Treeroot@parentspacesV10