IdeaFusion :: IdeaFusion
반응형

 

지삼선, 볶음밥, 토마토계란볶음


마트마타로 이동

반응형
반응형

Ubuntu 20.04 에 .NET Core 6을 설치하는 데 사용할 수 있는 자동화 스크립트가 있습니다.

스크립트는 아래와 같이 다운로드됩니다.

$ wget https://dot.net/v1/dotnet-install.sh

실행 권한처리

$ chmod +x dotnet-install.sh

이제 스크립트를 사용하여 아래와 같이 .NET 6 런타임과 SDK를 모두 설치합니다.

$ ./dotnet-install.sh -c 6.0
dotnet-install: Note that the intended use of this script is for Continuous Integration (CI) scenarios, where:
dotnet-install: - The SDK needs to be installed without user interaction and without admin rights.
dotnet-install: - The SDK installation doesn't need to persist across multiple CI runs.
dotnet-install: To set up a development environment or to run apps, use installers rather than this script. Visit https://dotnet.microsoft.com/download to get the installer.

dotnet-install: Attempting to download using aka.ms link https://dotnetcli.azureedge.net/dotnet/Sdk/6.0.405/dotnet-sdk-6.0.405-linux-arm64.tar.gz
dotnet-install: Extracting zip from https://dotnetcli.azureedge.net/dotnet/Sdk/6.0.405/dotnet-sdk-6.0.405-linux-arm64.tar.gz
dotnet-install: Installed version is 6.0.405
dotnet-install: Adding to current process PATH: `/home/ubuntu/.dotnet`. Note: This change will be visible only when sourcing script.
dotnet-install: Note that the script does not resolve dependencies during installation.
dotnet-install: To check the list of dependencies, go to https://learn.microsoft.com/dotnet/core/install, select your operating system and check the "Dependencies" section.
dotnet-install: Installation finished successfully.

설치 후 PATH 설정.

$ vim ~/.bashrc
export PATH=$PATH:$HOME/.dotnet
export DOTNET_ROOT=$HOME/.dotnet

변경된 bashrc를 적용합니다.

$ source ~/.bashrc

 

 

.NET CLI에 대한 TAB 자동완성 활성화

TAB 완성 dotnet은 TAB 키를 입력한 다음 입력하여 .NET CLI를 트리거합니다. 이 가이드에서는 Bash를 사용하여 .NET CLI에 대한 TAB 완성을 설정하는 방법을 설명합니다.

 

$ vim ~/.bashrc

_dotnet_bash_complete()
{
  local word=${COMP_WORDS[COMP_CWORD]}

  local completions
  completions="$(dotnet complete --position "${COMP_POINT}" "${COMP_LINE}" 2>/dev/null)"
  if [ $? -ne 0 ]; then
    completions=""
  fi

  COMPREPLY=( $(compgen -W "$completions" -- "$word") )
}

complete -f -F _dotnet_bash_complete dotnet

 

변경된 bashrc를 적용합니다.

$ source ~/.bashrc

.NET 시작하기

이제 Ubuntu 20.04에서 .NET Core 6 설치를 테스트하도록 설정되었습니다.

$ dotnet new console --output testapp1

샘플 출력:

Welcome to .NET 6.0!
---------------------
SDK Version: 6.0.405

Telemetry
---------
The .NET tools collect usage data in order to help us improve your experience. It is collected by Microsoft and shared with the community. You can opt-out of telemetry by setting the DOTNET_CLI_TELEMETRY_OPTOUT environment variable to '1' or 'true' using your favorite shell.

Read more about .NET CLI Tools telemetry: https://aka.ms/dotnet-cli-telemetry

----------------
Installed an ASP.NET Core HTTPS development certificate.
To trust the certificate run 'dotnet dev-certs https --trust' (Windows and macOS only).
Learn about HTTPS: https://aka.ms/dotnet-https
----------------
Write your first app: https://aka.ms/dotnet-hello-world
Find out what's new: https://aka.ms/dotnet-whats-new
Explore documentation: https://aka.ms/dotnet-docs
Report issues and find source on GitHub: https://github.com/dotnet/core
Use 'dotnet --help' to see available commands or visit: https://aka.ms/dotnet-cli
--------------------------------------------------------------------------------------
The template "Console App" was created successfully.

Processing post-creation actions...
Running 'dotnet restore' on /home/ubuntu/testapp1/testapp1.csproj...
  Determining projects to restore...
  Restored /home/ubuntu/testapp1/testapp1.csproj (in 119 ms).
Restore succeeded.

 

이제 프로그램을 실행해주세요

$ dotnet run --project testapp1

 

샘플 출력 결과

 

반응형

'Oracle Cloud' 카테고리의 다른 글

오라클 클라우드 MFA (Oracle Cloud MFA)  (0) 2023.01.31
VM.Standard.A1.Flex 인스턴스 생성  (0) 2023.01.27
Oracle Cloud Free Tier 사용하기  (0) 2023.01.27
반응형

사용할 도메인으로 진입

 

기본으로 설정되어있는 Default 도메인으로 테스트

 

보안으로 진입

 

MFA에서 해당부분 체크

모바일 기기로 테스트할거라 해당부분으로 인증테스트를 진행 예정

 

우상단 프로파일 -> 내 프로파일 진입

 

보안 진입

 

2단계 확인에서 모바일 앱 추가

위 이미지는 이미 모바일 앱이 등록되어있는부분을 캡처한 내용

 

MFA 테스트를 위해 글쓴이는 구글 플레이스토어에서 Oracle Mobile Authenticator 다운로드 후 QR 코드 스캔

Google OTP도 사용가능한거로 확인, 해당 부분은 아래쪽 오프라인 모드 또는 다른 인증자 사용으로 진입 필요

 

앱에서 One-Time Password 확인 완료

 

 

ID > 도메인 > 도메인명 > 보안 > 사인온 정책 > 사인온 정책 생성 진입

 

이름, 설명 입력 후 정책 추가

 

사인온 규칙 추가 진입

 

해당 사항 설정 후 사인온 규칙 추가

 

좌측 앱 진입

 

앱 추가 진입

 

 

OCI Console을 찾은 후 앱 추가

 

추가된 사인온 정책 활성화

 

이제 Sign Out 후 Sign In 을 테스트 해 본다.

 

ID, PW 입력 후

정상적으로 2단계 인증이 설정된부분이 확인되었다.

OTP 입력 후 정상적으로 로그인 확인.

반응형

'Oracle Cloud' 카테고리의 다른 글

Ubuntu 20.04(Arm64) .NET Core 6 설치  (0) 2023.02.03
VM.Standard.A1.Flex 인스턴스 생성  (0) 2023.01.27
Oracle Cloud Free Tier 사용하기  (0) 2023.01.27

+ Recent posts