Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.

Chapter 2. Installing .NET Core 3.1


To install .NET Core on RHEL 7 you need to first enable the .NET Core software repositories and install the scl tool.

Prerequisites

Procedure

  1. Enable the .NET Core software repositories:

    $ sudo subscription-manager repos --enable=rhel-7-variant-dotnet-rpms
    Copy to Clipboard Toggle word wrap

    Replace variant with server, workstation or hpc-node depending on what RHEL system you are running (RHEL 7 Server, RHEL 7 Workstation, or HPC Compute Node, respectively).

  2. Verify the list of subscriptions attached to your system:

    $ sudo subscription-manager list --consumed
    Copy to Clipboard Toggle word wrap
  3. Install the scl tool:

    $ sudo yum install scl-utils -y
    Copy to Clipboard Toggle word wrap
  4. Install .NET Core 3.1 and all of its dependencies:

    $ sudo yum install rh-dotnet31 -y
    Copy to Clipboard Toggle word wrap
  5. Enable the rh-dotnet31 Software Collection environment:

    $ scl enable rh-dotnet31 bash
    Copy to Clipboard Toggle word wrap

    You can now run dotnet commands in this bash shell session.

    If you log out, use another shell, or open up a new terminal, the dotnet command is no longer enabled.

    Warning

    Red Hat does not recommend permanently enabling rh-dotnet31 because it may affect other programs. For example, rh-dotnet31 includes a version of libcurl that differs from the base RHEL version. This may lead to issues in programs that do not expect a different version of libcurl. If you want to enable rh-dotnet permanently, add source scl_source enable rh-dotnet31 to your ~/.bashrc file.

Verification steps

  • Verify the installation:

    $ dotnet --info
    Copy to Clipboard Toggle word wrap

    The output returns the relevant information about the .NET Core installation and the environment.

Nach oben
Red Hat logoGithubredditYoutubeTwitter

Lernen

Testen, kaufen und verkaufen

Communitys

Über Red Hat Dokumentation

Wir helfen Red Hat Benutzern, mit unseren Produkten und Diensten innovativ zu sein und ihre Ziele zu erreichen – mit Inhalten, denen sie vertrauen können. Entdecken Sie unsere neuesten Updates.

Mehr Inklusion in Open Source

Red Hat hat sich verpflichtet, problematische Sprache in unserem Code, unserer Dokumentation und unseren Web-Eigenschaften zu ersetzen. Weitere Einzelheiten finden Sie in Red Hat Blog.

Über Red Hat

Wir liefern gehärtete Lösungen, die es Unternehmen leichter machen, plattform- und umgebungsübergreifend zu arbeiten, vom zentralen Rechenzentrum bis zum Netzwerkrand.

Theme

© 2025 Red Hat