Projekt

Obecné

Profil

Akce

Server Installation and Service » Historie » Revize 12

« Předchozí | Revize 12/36 (rozdíl) | Další »
Eliška Mourycová, 2021-05-28 09:56


Server Installation (WIP)

The server runs on Debian 10 VM at https://nuada.zcu.cz/
The ip of the machine is 147.228.173.54

Hardware requirements

TBD, however the default settings for creating the VM seem to suffice

Software requirements

"Deploying" the Server Application

Uploading the project to the remote machine

Upload the whole folder built with the commands below:

scp -r /pathToFolder/publish root@{machine_ip}:/<path>/

You can also upload the default configuration file:

scp /path/server_config root@{machine_ip}:/<path>/

Building the project

At the moment, the easiest way to build the project is to build it locally in Windows with the following commands:
open windows command line (cmd.exe) in the directory where the solution file is located. Please make sure you can run `dotnet` command from the cmd. Make sure you have the right SDK on your system:

dotnet --list-sdks

Version 5.0 is needed to build the project. If you have this version, you can build the project:

dotnet publish --runtime=linux-x64 ServerApp.sln

The built project files are in folder:
.\ServerApp\bin\Debug\net5.0\linux-x64\publish

Note

The project could probably be built on-site as well, but that would require .NET SDK to be installed and require larger disc space.

Running the server

  • A folder named data must exist in the directory where the app is launched
  • A .p12 file named cert.p12 must exist in the directory where the app is launched

Firstly you most grant permission to run the executable:

chmod +x <path>/ServerApp

Then you can run the server:

<path>/ServerApp <args>

Certificate generation and usage (DEPRECATED)

This section provides instructions for generating and using a certificate with a secific port.
Important note: this approach was used when the server application ran under the Mono framework. Mono is no longer used for running the application as it was unable to use some needed libraries.
  • Follow these steps if the above stated instructions didn't work as expected.

Mono installation

sudo apt install mono-complete

Generating the certificate

http://www.mono-project.com/archived/using-clientcertificates-with-xsp/

makecert -r -n "CN=My Own Test CA" -sv root.key root.cer
certmgr --add -c Trust root.cer
hostname (displays the machine's host name)
makecert -iv root.key -ic root.cer -eku 1.3.6.1.5.5.7.3.1 -n "CN={hostname}" -p12 {hostname}.p12 s3kr3t

Linking the certificate to a port?

httpcfg -add -port {port} -pvk root.key -cert root.crt

Adding trusted root certificates to the server (idk if this has any effect)

Copy your CA to dir /usr/local/share/ca-certificates/
Use command: sudo cp foo.crt /usr/local/share/ca-certificates/foo.crt
Update the CA store: sudo update-ca-certificates


Aktualizováno uživatelem Eliška Mourycová před téměř 4 roky(ů) · 12 revizí