CREATE DEPLOYMENT PACKAGE LIKE THIS ONLY ( ITS EASIEST AND WORKING, TRUST ME)
dotnet publish -f netcoreapp2.2 -c Release -r rhel.7-x64 --self-contained false /p:MicrosoftNETPlatformLibrary=Microsoft.NETCore.App
===========================================================================
COMMANDS USED IN VIDEO:
$ sudo yum install scl-utils
$sudo yum install rh-dotnet22 -y
$ scl enable rh-dotnet22 bash
$ dotnet --info
INSTALL APACHE:
yum install httpd
service httpd start
DISABLE FIREWALL:
systemctl stop firewalld
systemctl disable firewalld
To access url from outside system Modify Program.cs
.UseUrls("* :5000/")
FINALLY CREATE PACKAGE LIKE THIS :
dotnet publish -f netcoreapp2.2 -c Release -r rhel.7-x64 --self-contained false /p:MicrosoftNETPlatformLibrary=Microsoft.NETCore.App
===========================================================================
COMMANDS TO ENABLE SUBSCRIPTION:
$sudo subscription-manager register
$ sudo subscription-manager list --available
$ sudo subscription-manager attach --pool=appropriate pool ID from the subscription
$ sudo subscription-manager repos --enable=rhel-7-server-dotnet-rpms
$ sudo subscription-manager repos --enable=rhel-7-workstation-dotnet-rpms
$ sudo subscription-manager repos --enable=rhel-7-hpc-node-dotnet-rpms
$ sudo subscription-manager list --consumed
I will also give commands to remove subscriptions in case you do some mistake .
you can clean the subscriptions refresh and enable repositories again.
sudo subscription-manager remove --all
sudo subscription-manager unregister
sudo subscription-manager clean
sudo subscription-manager register
sudo subscription-manager refresh
sudo subscription-manager attach --auto
sudo subscription-manager repos --enable rhel-7-server-extras-rpms
sudo subscription-manager repos --enable rhel-7-server-optional-rpms
sudo subscription-manager repos --enable rhel-server-rhscl-7-rpms
HOW TO Install GUI ON Red hat linux system
• Azure: Installing GUI ...
30 окт 2024