Versions Compared

Key

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

Overview

This guide outlines the setup process for running FrameworX on Linux, tested on Ubuntu 22.04 and Debian 12 with .NET 8.0 compatibility. It involves installing .NET 8.0  if not already available, importing necessary files, and configuring a connection between a Windows and Linux environment. The setup includes running web services on Linux, allowing Windows to connect via the platform, where additional features can be installed on Linux as needed. This approach facilitates a multi-project configuration, enabling seamless integration and functionality across both operating systems.

Introduction

This document shows how to deploy Projects in Linux Red Hat 8 through code lines. However, you need a PC as a client for doing the deployment in Red Hat 8 and make all necessary settings, after it, your Linux Server will keep running. 

On this page:

Table of Contents
maxLevel3
stylenone


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



FrameworX Setup on Linux with .NET 8.0

The UBUNTU version used for testing was 22.04. It was also tested with Debian 12. Others OS that accept .NET 8.0 should work as well, but there may be differences in how you install .NET 8.0.

Step 1

.NET 8.0 should already be installed on Linux. If not, go back 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. We recommend you import the files in the path "/Home/FrameworX/". If the folder does not exist, you should create it.

Code Block
git clone https://github.com/tatsoftdocs/FrameworX-v10.git

If you don’t have github installed, use the following command:

Code Block
sudo apt install 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 the 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 the product installation to Linux.


Step 5

Finally, click “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 with the multi-platform option.


Pythonnet for Python scripts

If Python scripts are to be used, pythonnet is essential. There are two options from this point: installing it globally or inside a virtual environment. Follow the steps below for both options:

Installing in a Virtual Environment: 

Run the following command in the terminal to create the virtual environment (venv) in the current folder:


Code Block
languagebash
python3 -m venv ./venv_pythonnet

Once created, activate the virtual environment with the command below

Code Block
languagebash
source ./venv_pythonnet/bin/activate

After activation, upgrade pip to ensure compatibility and access to the latest packages:

Code Block
languagebash
pip install --upgrade pip

With the environment active and pip upgraded, install pythonnet:

Code Block
languagebash
pip install pythonnet

If you choose this option, you must run TWebServices.dll within the same virtual environment. Otherwise, FrameworX will not be able to locate the pythonnet module.

Installing Globally:

Check your python version 

Code Block
languagebash
python3 --version

Based on your Python version, install the following packages to ensure that pythonnet can compile and run correctly:

Code Block
languagebash
sudo apt update && sudo apt install -y \
    python3-pip \
    python3.12-dev \
    build-essential \
    clang \
    libpython3.12 \
    libpython3.12-dev

Now install pythonnet using the following command.

Code Block
languagebash
 sudo pip3 install pythonnet --break-system-packages

Note: The --break-system-packages flag is required due to recent changes introduced by python.org. [More information can be found here.]


In this section:

Settings procedure

1 - We did this test using VMware Workstation 17 Player as the virtual machine, and we used 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

Before that, get root permissions writing this in 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 - Now we are going 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, we generate a link from our driver, and access 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 you 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, for this, follow the steps

Open 'Welcome' in FactoryStudio ->
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 projectRun -> 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
In this section...

Page Tree
root@parent
spacesV10