Rechercher

Ce contenu n'est pas disponible dans la langue sélectionnée.

Chapter 2. Installing .NET 6.0

download PDF

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

Prerequisites

Procedure

  1. Enable the .NET software repositories:

    $ sudo subscription-manager repos --enable=rhel-7-variant-dotnet-rpms

    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
  3. Install the scl tool:

    $ sudo yum install scl-utils -y
  4. Install .NET 6.0 and all of its dependencies:

    $ sudo yum install rh-dotnet60 -y
  5. Enable the rh-dotnet60 Software Collection environment:

    $ scl enable rh-dotnet60 bash

    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-dotnet60 because it may affect other programs. If you want to enable rh-dotnet permanently, add source scl_source enable rh-dotnet60 to your ~/.bashrc file.

Verification steps

  • Verify the installation:

    $ dotnet --info

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

Red Hat logoGithubRedditYoutubeTwitter

Apprendre

Essayez, achetez et vendez

Communautés

À propos de la documentation Red Hat

Nous aidons les utilisateurs de Red Hat à innover et à atteindre leurs objectifs grâce à nos produits et services avec un contenu auquel ils peuvent faire confiance.

Rendre l’open source plus inclusif

Red Hat s'engage à remplacer le langage problématique dans notre code, notre documentation et nos propriétés Web. Pour plus de détails, consultez leBlog Red Hat.

À propos de Red Hat

Nous proposons des solutions renforcées qui facilitent le travail des entreprises sur plusieurs plates-formes et environnements, du centre de données central à la périphérie du réseau.

© 2024 Red Hat, Inc.