Framework/.NET CORE

.NET CORE - ubuntu에 설치하기(.net core버전 21.10)

보라색츄르 2022. 7. 18. 18:08

- 필요사항 : Xftp / xshell (물론 다른툴 사용해도 괜찮다)

 

1. sudo apt-get update  실행

    => 이 명령어는 운영체제에서 사용 가능한 패키지들과 그 버전에 대한 정보를 업데이트하는 명령어이다. 

         설치되어 있는 패키지를 최신으로 업데이트하는 것이 아닌 설치가능한 리스트를 업데이트하는 것이다. 

          (apt-get install 명령을 이용해서 특정 패키지를 설치할 수 없는 경우 최신으로

           패키지 리스트를 업데이트해야 할 필요가 있다.)

    => 명령어를 실행시키면 아래와 같은 화면으로 다운로드를 받는다. 

2. .NET Core 3.1 SDK 다운로드받기 (Linux x64)

 

 https://dotnet.microsoft.com/en-us/download/dotnet/thank-you/sdk-3.1.421-linux-x64-binaries

 

Download .NET Core 3.1 SDK (v3.1.421) - Linux x64 Binaries

 

dotnet.microsoft.com

 

 

 

3.  신뢰 키 목록에 microsoft 패키지 서명 키를 추가하고 패키지 리포지토리를 추가하기

 

https://docs.microsoft.com/ko-kr/dotnet/core/install/linux-ubuntu#2110

 

Ubuntu에 .NET 설치 - .NET

Ubuntu에 .NET SDK 및 .NET 런타임을 설치하는 다양한 방법을 보여 줍니다.

docs.microsoft.com

 

4. 이제 디렉토리를 만들자 

mkdir -p $HOME/dotnet

 

5. ~/dotnet$ tar zxf dotnet-sdk-3.1.421-linux-x64.tar.gz

 

6. ubuntu@maymabu-backend:~/dotnet$ cd ~
ubuntu@maymabu-backend:~$ export DOTNET_ROOT=$HOME/dotnet
ubuntu@maymabu-backend:~$ export PATH=$PATH:$HOME/dotnet