-
Notifications
You must be signed in to change notification settings - Fork 107
Running in CentOS (Linux)
adriancs edited this page Jan 26, 2022
·
8 revisions
The idea is to build the project in .NET Core.
We can test this out with a simple Console App.
Starting by creating a .net core linux project:
Check the project properties, ensure the project is built with .NET Core framework:
Install Nuget Package of MySqlBackup.NET (with MySqlConnector):
Next, is to publish the project for .NET Core (Linux):
In above example, the Linux compiled binaries are located at:
\bin\Release\netcoreapp3.1\publish\linux-x64
Copy the DLL in above folder and paste it to your CentOS
At the CentOS, make sure that you have installed Dotnet runtime by following command:
sudo dnf install dotnet-sdk-<version>
For example:
sudo dnf install dotnet-sdk-3.1
sudo dnf install dotnet-sdk-5.0
Assume that you have copied your .NET Core DLL files at the following folder:
/home/<username>/testapp
Then you can test out your app with following command:
cd /home/admin/testapp
dotnet ConsoleApp.dll
Here is the sample source code for your referrence: