이 콘텐츠는 선택한 언어로 제공되지 않습니다.
Chapter 2. Installing .NET 6.0
To install .NET on RHEL 7 you need to first enable the .NET software repositories and install the scl
tool.
Prerequisites
Installed and registered RHEL 7 with attached subscriptions.
For more information, see Registering the System and Attaching Subscriptions.
Procedure
Enable the .NET software repositories:
sudo subscription-manager repos --enable=rhel-7-variant-dotnet-rpms
$ sudo subscription-manager repos --enable=rhel-7-variant-dotnet-rpms
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Replace variant with
server
,workstation
orhpc-node
depending on what RHEL system you are running (RHEL 7 Server, RHEL 7 Workstation, or HPC Compute Node, respectively).Verify the list of subscriptions attached to your system:
sudo subscription-manager list --consumed
$ sudo subscription-manager list --consumed
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Install the
scl
tool:sudo yum install scl-utils -y
$ sudo yum install scl-utils -y
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Install .NET 6.0 and all of its dependencies:
sudo yum install rh-dotnet60 -y
$ sudo yum install rh-dotnet60 -y
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Enable the
rh-dotnet60
Software Collection environment:scl enable rh-dotnet60 bash
$ scl enable rh-dotnet60 bash
Copy to Clipboard Copied! Toggle word wrap Toggle overflow You can now run
dotnet
commands in thisbash
shell session.If you log out, use another shell, or open up a new terminal, the
dotnet
command is no longer enabled.WarningRed Hat does not recommend permanently enabling
rh-dotnet60
because it may affect other programs. If you want to enablerh-dotnet
permanently, addsource scl_source enable rh-dotnet60
to your~/.bashrc
file.
Verification steps
Verify the installation:
dotnet --info
$ dotnet --info
Copy to Clipboard Copied! Toggle word wrap Toggle overflow The output returns the relevant information about the .NET installation and the environment.