Install Guide - Gemini .NET Core for Ubuntu Linux

image20.png

TABLE OF CONTENTS

GEMINI FOR UBUNTU LINUX 

 

GEMINI FOR UBUNTU LINUX

The following steps will determine how Gemini .NET Core can be installed on Ubuntu Linux environment.

 

Install required software

Install Dotnet Core

To install Dotnet Core the next dash commands need to be ran in the Linux terminal:

wget https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb

sudo dpkg -i packages-microsoft-prod.deb
sudo apt-get update; \

sudo apt-get install -y apt-transport-https && \

sudo apt-get update && \

sudo apt-get install -y dotnet-sdk-3.1
sudo apt-get update; \

sudo apt-get install -y apt-transport-https && \

sudo apt-get update && \

sudo apt-get install -y aspnetcore-runtime-3.1

 

Install Apache Web Server 

sudo apt-get install apache2
sudo a2enmod proxy proxy_http proxy_html proxy_wstunnel
sudo a2enmod rewrite

 

Configure Apache Proxy

To configure Apache Proxy the netcore.conf file needs to be created by using the following command:

sudo nano /etc/apache2/conf-enabled/netcore.conf

After the file is created, the content below should be copied to the netcore.conf file

<VirtualHost *:80>
 ServerName webui.gemini.com
 ServerAlias *webui.gemini.com
 ProxyPreserveHost On
 ProxyPass / http://127.0.0.1:5050/
 ProxyPassReverse / http://127.0.0.1:5050/
 ErrorLog /var/log/apache2/netcore-error.log
 CustomLog /var/log/apache2/netcore-access.log common
</VirtualHost>

<VirtualHost *:80>
 ServerName web.gemini.com
 ServerAlias *web.gemini.com
 ProxyPreserveHost On
 ProxyPass / http://127.0.0.1:5051/
 ProxyPassReverse / http://127.0.0.1:5051/
 ErrorLog /var/log/apache2/netcore-error.log
 CustomLog /var/log/apache2/netcore-access.log common
</VirtualHost>

<VirtualHost *:80>
 ServerName offline.gemini.com
 ServerAlias *offline.gemini.com
 ProxyPreserveHost On
 ProxyPass / http://127.0.0.1:5052/
 ProxyPassReverse / http://127.0.0.1:5052/
 ErrorLog /var/log/apache2/netcore-error.log
 CustomLog /var/log/apache2/netcore-access.log common
</VirtualHost>

<VirtualHost *:80>
   ServerName <<Linux server IP>>
 ServerAlias *.gemini.com
 ProxyPreserveHost On
 ProxyPass / http://127.0.0.1:5051/
 ProxyPassReverse / http://127.0.0.1:5051/
 RewriteEngine on
 RewriteCond %{HTTP:UPGRADE} ^WebSocket$ [NC]
 RewriteCond %{HTTP:CONNECTION} Upgrade$ [NC]
 RewriteRule /(.*) ws://127.0.0.1:5051/$1 [P]
 ErrorLog /var/log/apache2/netcore-error.log
 CustomLog /var/log/apache2/netcore-access.log common
</VirtualHost>

 

Edit host file for subdomain

To edit the host file, first we need to open it by using the sudo nano /etc/hosts command.

After the file has been opened, the following entries need to be added to the host file:

127.0.0.1 gemini.com
127.0.0.1 webui.gemini.com
127.0.0.1 offline.gemini.com
127.0.0.1 web.gemini.com

After the above mentioned entries have been added, the host file should be saved and the Apache Service needs to be restarted by using  sudo systemctl restart apache2 command.

 

Copy the provided files to Linux server

During this step the provided zip file will need to be copied to the Linux server.

The scp .\Gemini.zip ubuntu@<<Linux server IP>>:/home/ubuntu/Gemini.zip command can be used for copying the files.

After copying the files to the Linux server, the GeminiCore folder should be moved to the var folder by using the sudo mv Gemini /var/ command.

 

Create the Gemini Services

Gemini Service

Create the new service file by using this command:

sudo nano /etc/systemd/system/GeminiService.service

The newly created file should contain the following information:

[Unit]
Description=Gemini Service

[Service]
WorkingDirectory=/var/Gemini/Service
ExecStart=/usr/bin/dotnet /var/Gemini/Service/TAKE.GemRadr.Service.dll
Restart=always
RestartSec=10
SyslogIdentifier=netcore-demo
User=ubuntu

[Install]
WantedBy=multi-user.target

After the information has been copied and saved to the service file, the service needs to be enabled by using the sudo systemctl enable GeminiService command.

Lastly, the service needs to be started: sudo systemctl start GeminiService

 

Gemini Web UI

Create the new service file by using this command:

sudo nano /etc/systemd/system/GeminiWebUI.service

The newly created file should contain the following information:

[Unit]
Description=Gemini Web UI

[Service]
WorkingDirectory=/var/Gemini/GeminiWebUI/
ExecStart=/usr/bin/dotnet /var/Gemini/GeminiWebUI/TAKE.GemRadr.Browser.UI.dll
Restart=always
RestartSec=10
SyslogIdentifier=netcore-demo
User=ubuntu

[Install]
WantedBy=multi-user.target

After the information has been copied and saved to the service file, the service needs to be enabled by using the sudo systemctl enable GeminiWebUI command.

Lastly, the service needs to be started: sudo systemctl start GeminiWebUI

 

Gemini Web

Create the new service file by using this command:

sudo nano /etc/systemd/system/GeminiWeb.service

The newly created file should contain the following information:

[Unit]
Description=Gemini Web

[Service]
WorkingDirectory=/var/Gemini/GeminiWeb/
ExecStart=/usr/bin/dotnet /var/Gemini/GeminiWeb/TAKE.GemRadr.Web.dll
Restart=always
RestartSec=10
SyslogIdentifier=netcore-demo
User=ubuntu
Environment=ASPNETCORE_ENVIRONMENT=Production

[Install]
WantedBy=multi-user.target

After the information has been copied and saved to the service file, the service needs to be enabled by using the sudo systemctl enable GeminiWeb command.

Lastly, the service needs to be started: sudo systemctl start GeminiWeb

 

Gemini Offline Web

Create the new service file by using this command:

sudo nano /etc/systemd/system/GeminiOfflineWeb.service

The newly created file should contain the following information:

[Unit]
Description=Gemini Web

[Service]
WorkingDirectory=/var/Gemini/GeminiOfflineWeb/
ExecStart=/usr/bin/dotnet /var/Gemini/GeminiOfflineWeb/TAKE.GemRadr.Offline.Web.dll
Restart=always
RestartSec=10
SyslogIdentifier=netcore-demo
User=ubuntu
Environment=ASPNETCORE_ENVIRONMENT=Production

[Install]
WantedBy=multi-user.target

After the information has been copied and saved to the service file, the service needs to be enabled by using the sudo systemctl enable GeminiOfflineWeb command.

Lastly, the service needs to be started: sudo systemctl start GeminiOfflineWeb

 

Adding The Connection Strings

The connection strings need to be added for GeminiOfflineWebUI, GeminiWeb and Services.

Gemini Service Connection Settings

  1. Access the Gemini Service directory and open the file “appsettings.json”  by using the sudo nano var/Gemini/Service/appsettings.json command.
  2. Update the Connection String information to point to the appropriate Oracle Database:
"AppDBConnectionStringName":  "test100"

"connectionStrings": {

"test100": "Data Source=test100.database.com/test100;pooling=false;User ID=username;password=password"}

 

Gemini Core Online Web Connection Settings

  1. Access the Gemini Service directory and open the file “appsettings.json”  by using the sudo nano var/Gemini/GeminiWeb/appsettings.json command.
  2. Update the Connection String information to point to the appropriate Oracle Database:
"AppDBConnectionStringName":  "test100"

"connectionStrings": {

"test100": "Data Source=test100.database.com/test100;pooling=false;User ID=username;password=password"}

 

Gemini Offline Web Connection Settings

  1. Access the Gemini Service directory and open the file “appsettings.json”  by using the sudo nano var/Gemini/GeminiOfflineWebUI/appsettings.json command.
  2. Update the Connection String information to point to the appropriate Oracle Database:
"AppDBConnectionStringName":  "test100"

"connectionStrings": {

"test100": "Data Source=test100.database.com/test100;pooling=false;User ID=username;password=password"}

 

Set License

 IMPORTANT: In order to receive a license key, be sure to forward the name of your Linux computer to the Aclate team.

The computer name can be easily determined from the command line. To locate the computer name:

1.       Open a command line and typehostname and press Enter. The text displayed will represent your computer name.

After you forward the name of your Linux computer to the Aclate team, we will send you two pieces of data: (1) The license key and (2) The service GUID.

The license key will consist of a long string of characters, such as the one below:

gKoQNtVDm2DXomSSo4iF5gNRw9jAiFSQpbpHvG0C3OxKMTfR5h9u693Wi pF3ijk56mIS2iixxbamHlqByLa47BM5vQFDncg/ eGz9Ky4ct0wW3h1IE6jT9uWwlfvAQQB1aYfOWxTrlIOaQLPTe13qc8Ocr 7kb2y8XtQWvwJO+gnpK1gMZxSoWw8Yi55GBEMCcA4f07EJVlh2WeGB- jlXV1pTi+vDSHo/yYLSByLw==

The service GUID will be a 36-character length string like the following:

D245983C-67FC-4923-AA19-3F048C495E8B

2.       Open and edit the “RadrLicense.json” by using the following command: 

sudo nano var/Gemini/Service/RadrLicense.json

3.       Replace the current value {LicenseKey} with the complete license key received. NOTE: Be sure to remove the braces {} when replacing value.

4.       Save and close the file.

5.      Open and edit the “appsettings.json” file by using the following command:

sudo nano var/Gemini/Service/appsettings.json

6.       Replace the current value {ServiceGUID} with the Service GUID received. NOTE: Be sure to remove the braces {} when replacing value.

7.       Save and close the file.

 

Set Timezone for Linux

The Linux server needs to have the correct timezone in order for Gemini to work. The instructions on how to check your timezone and change it can be found here.

 

Modify hosts entry on a different machine

To access the Linux server from a different machine the hosts file needs to be changed:

Windows

Open hosts file in C:\Windows\System32\drivers\etc

Add the following lines to the hosts file.

<<Linux server IP>> gemini.com
<<Linux server IP>> webui.gemini.com
<<Linux server IP>> web.gemini.com
<<Linux server IP>> offline.gemini.com

 

Mac

Open hosts file sudo nano /private/etc/hosts

Add the following lines to the hosts file.

<<Linux server IP>> gemini.com
<<Linux server IP>> webui.gemini.com
<<Linux server IP>> web.gemini.com
<<Linux server IP>> offline.gemini.com

 

Gemini WebUI: webui.gemini.com

Gemini Web:     web.gemini.com

Gemini Offline:  offline.gemini.com

 

Gemini Service URL for Mobile Devices:

For the .Net core version, the Linux Server IP is the URL that needs to be entered on a mobile device for the service to work:

E.g. http://<Linux Server IP>

Comments

0 comments

Please sign in to leave a comment.