Este conteúdo não está disponível no idioma selecionado.

Chapter 2. Installing .NET 5.0


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
    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 5.0 and all of its dependencies:

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

    $ scl enable rh-dotnet50 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-dotnet50 because it may affect other programs. If you want to enable rh-dotnet permanently, add source scl_source enable rh-dotnet50 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 installation and the environment.

Voltar ao topo
Red Hat logoGithubredditYoutubeTwitter

Aprender

Experimente, compre e venda

Comunidades

Sobre a documentação da Red Hat

Ajudamos os usuários da Red Hat a inovar e atingir seus objetivos com nossos produtos e serviços com conteúdo em que podem confiar. Explore nossas atualizações recentes.

Tornando o open source mais inclusivo

A Red Hat está comprometida em substituir a linguagem problemática em nosso código, documentação e propriedades da web. Para mais detalhes veja o Blog da Red Hat.

Sobre a Red Hat

Fornecemos soluções robustas que facilitam o trabalho das empresas em plataformas e ambientes, desde o data center principal até a borda da rede.

Theme

© 2025 Red Hat