14.1.1.1 Windows에서 OCI CLI 설치하기
-
관리자 모드로 PowerShell 실행
-
PowerShell의 remote execution policy 구성을 위해 다음 명령 실행
Set-ExecutionPolicy RemoteSigned
- 정책 변경을 위해 Y 응답
-
설치 스크립트 실행을 위해 다음 실행
powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/oracle/oci-cli/master/scripts/install/install.ps1'))"
- Python 설치여부: Y 응답
- 설치 경로에 대한 확인 후 설정
- CLI의 새 버전 업데이트 확인시 Y 응답
- PATH에 CLI 추가 요청시 Y 응답
- Python 설치여부: Y 응답
-
설치 후 현재 창에는 신규 등록한 PATH가 적용되지 않을 수 있으므로, 새로운 PowerShell을 열어 OCI CLI를 실행합니다.
-
설치 예시
PS C:\WINDOWS\system32> Set-ExecutionPolicy RemoteSigned 실행 규칙 변경 실행 정책은 신뢰하지 않는 스크립트로부터 사용자를 보호합니다. 실행 정책을 변경하면 about_Execution_Policies 도움말 항목(https://go.microsoft.com/fwlink/?LinkID=135170)에 설명된 보안 위험에 노출될 수 있습니다. 실행 정책을 변경하시겠습니까? [Y] 예(Y) [A] 모두 예(A) [N] 아니요(N) [L] 모두 아니요(L) [S] 일시 중단(S) [?] 도움말 (기본값은 "N"): Y PS C:\WINDOWS\system32> powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/oracle/oci-cli/master/scripts/install/install.ps1'))" ****************************************************************************** You have started the OCI CLI Installer in interactive mode. If you do not wish to run this in interactive mode, please include the -AcceptAllDefaults option. If you have the script locally and would like to know more about input options for this script, then you can run: help .\install.ps1 If you would like to know more about input options for this script, refer to: https://github.com/oracle/oci-cli/blob/master/scripts/install/README.rst ****************************************************************************** 자세한 정보 표시: No valid Python installation found. Python is required to run the CLI. Install Python now? (Entering "n" will exit the installation script) [Y] Yes [N] No [?] 도움말 (기본값은 "Y"): Y 자세한 정보 표시: Downloading Python... 자세한 정보 표시: Download Complete! Installer executable written to: C:\Users\thekoguryo\AppData\Local\Temp\tmp18AF.tmp.exe 자세한 정보 표시: Installing Python to C:\Users\thekoguryo\Python... 자세한 정보 표시: Successfully installed Python! 자세한 정보 표시: Downloading install script to C:\Users\thekoguryo\AppData\Local\Temp\tmpC089.tmp 자세한 정보 표시: C:\Users\thekoguryo\Python False False 자세한 정보 표시: Using Python executable: C:\Users\thekoguryo\Python\python.exe to run install script... 자세한 정보 표시: Arguments to python script: "C:\Users\thekoguryo\AppData\Local\Temp\tmpC089.tmp" -- Verifying Python version. -- Python version 3.8.5 okay. ===> In what directory would you like to place the install? (leave blank to use 'C:\Users\thekoguryo\lib\oracle-cli'): -- Creating directory 'C:\Users\thekoguryo\lib\oracle-cli'. -- We will install at 'C:\Users\thekoguryo\lib\oracle-cli'. ===> In what directory would you like to place the 'oci.exe' executable? (leave blank to use 'C:\Users\thekoguryo\bin'): -- Creating directory 'C:\Users\thekoguryo\bin'. -- The executable will be in 'C:\Users\thekoguryo\bin'. ===> In what directory would you like to place the OCI scripts? (leave blank to use 'C:\Users\thekoguryo\bin\oci-cli-scripts'): -- Creating directory 'C:\Users\thekoguryo\bin\oci-cli-scripts'. -- The scripts will be in 'C:\Users\thekoguryo\bin\oci-cli-scripts'. ===> Currently supported optional packages are: ['db (will install cx_Oracle)'] What optional CLI packages would you like to be installed (comma separated names; press enter if you don't need any optional packages)?: -- The optional packages installed will be ''. -- Trying to use python3 venv. -- Executing: ['C:\\Users\\thekoguryo\\Python\\python.exe', '-m', 'venv', 'C:\\Users\\thekoguryo\\lib\\oracle-cli'] -- Executing: ['C:\\Users\\thekoguryo\\lib\\oracle-cli\\Scripts\\python.exe', '-m', 'pip', 'install', '--upgrade', 'pip'] Collecting pip Downloading pip-21.3.1-py3-none-any.whl (1.7 MB) |████████████████████████████████| 1.7 MB 6.8 MB/s Installing collected packages: pip Attempting uninstall: pip Found existing installation: pip 20.1.1 Uninstalling pip-20.1.1: Successfully uninstalled pip-20.1.1 Successfully installed pip-21.3.1 -- Executing: ['C:\\Users\\thekoguryo\\lib\\oracle-cli\\Scripts\\pip', 'install', '--cache-dir', 'C:\\Users\\thekoguryo\\AppData\\Local\\Temp\\tmp7z8s7qbi', 'wheel', '--upgrade'] Collecting wheel Downloading wheel-0.37.1-py2.py3-none-any.whl (35 kB) Installing collected packages: wheel Successfully installed wheel-0.37.1 -- Executing: ['C:\\Users\\thekoguryo\\lib\\oracle-cli\\Scripts\\pip', 'install', '--cache-dir', 'C:\\Users\\thekoguryo\\AppData\\Local\\Temp\\tmp7z8s7qbi', 'oci_cli', '--upgrade'] Collecting oci_cli Downloading oci_cli-3.4.2-py3-none-any.whl (23.8 MB) |████████████████████████████████| 23.8 MB 6.8 MB/s Collecting cryptography<=3.4.7,>=3.2.1 Downloading cryptography-3.4.7-cp36-abi3-win_amd64.whl (1.6 MB) |████████████████████████████████| 1.6 MB ... Collecting pyOpenSSL==19.1.0 Downloading pyOpenSSL-19.1.0-py2.py3-none-any.whl (53 kB) |████████████████████████████████| 53 kB 955 kB/s Collecting click==7.1.2 Downloading click-7.1.2-py2.py3-none-any.whl (82 kB) |████████████████████████████████| 82 kB 5.8 MB/s Collecting six>=1.15.0 Downloading six-1.16.0-py2.py3-none-any.whl (11 kB) Collecting oci==2.54.0 Downloading oci-2.54.0-py2.py3-none-any.whl (12.2 MB) |████████████████████████████████| 12.2 MB 6.4 MB/s Collecting arrow>=1.0.0 Downloading arrow-1.2.1-py3-none-any.whl (63 kB) |████████████████████████████████| 63 kB ... Collecting jmespath==0.10.0 Downloading jmespath-0.10.0-py2.py3-none-any.whl (24 kB) Collecting pytz>=2016.10 Downloading pytz-2021.3-py2.py3-none-any.whl (503 kB) |████████████████████████████████| 503 kB 6.8 MB/s Collecting certifi Downloading certifi-2021.10.8-py2.py3-none-any.whl (149 kB) |████████████████████████████████| 149 kB ... Collecting PyYAML<6,>=5.4 Downloading PyYAML-5.4.1-cp38-cp38-win_amd64.whl (213 kB) |████████████████████████████████| 213 kB ... Collecting terminaltables==3.1.0 Downloading terminaltables-3.1.0.tar.gz (12 kB) Preparing metadata (setup.py) ... done Collecting python-dateutil<3.0.0,>=2.5.3 Downloading python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB) |████████████████████████████████| 247 kB ... Collecting circuitbreaker<2.0.0,>=1.3.1 Downloading circuitbreaker-1.3.2.tar.gz (7.9 kB) Preparing metadata (setup.py) ... done Collecting cffi>=1.12 Downloading cffi-1.15.0-cp38-cp38-win_amd64.whl (179 kB) |████████████████████████████████| 179 kB 6.4 MB/s Collecting pycparser Downloading pycparser-2.21-py2.py3-none-any.whl (118 kB) |████████████████████████████████| 118 kB 6.8 MB/s Building wheels for collected packages: terminaltables, circuitbreaker Building wheel for terminaltables (setup.py) ... done Created wheel for terminaltables: filename=terminaltables-3.1.0-py3-none-any.whl size=15355 sha256=a28562e8abfb78420764123ed4224e44167c5bc969996d1745bc5c1116b2d8b2 Stored in directory: c:\users\thekoguryo\appdata\local\temp\tmp7z8s7qbi\wheels\08\8f\5f\253d0105a55bd84ee61ef0d37dbf70421e61e0cd70cef7c5e1 Building wheel for circuitbreaker (setup.py) ... done Created wheel for circuitbreaker: filename=circuitbreaker-1.3.2-py3-none-any.whl size=6017 sha256=ac910cffc04f0ed6e90f2b65da6241bdaf9848fcf160dc03b1ec821db75600b8 Stored in directory: c:\users\thekoguryo\appdata\local\temp\tmp7z8s7qbi\wheels\97\d2\3d\8ad7bff00d846a770cdc0ed208f0fae657c983e675d658c1d5 Successfully built terminaltables circuitbreaker Installing collected packages: pycparser, cffi, six, cryptography, pytz, python-dateutil, pyOpenSSL, circuitbreaker, certifi, terminaltables, PyYAML, oci, jmespath, click, arrow, oci-cli Successfully installed PyYAML-5.4.1 arrow-1.2.1 certifi-2021.10.8 cffi-1.15.0 circuitbreaker-1.3.2 click-7.1.2 cryptography-3.4.7 jmespath-0.10.0 oci-2.54.0 oci-cli-3.4.2 pyOpenSSL-19.1.0 pycparser-2.21 python-dateutil-2.8.2 pytz-2021.3 six-1.16.0 terminaltables-3.1.0 ===> Modify PATH to include the CLI and enable tab completion in PowerShell now? (Y/n): Y -- -- ** Close and re-open PowerShell to reload changes to your PATH ** -- In order to run the autocomplete script, you may also need to set your PowerShell execution policy to allow for running local scripts (as an Administrator run Set-ExecutionPolicy RemoteSigned in a PowerShell prompt) -- -- Installation successful. -- Run the CLI with C:\Users\thekoguryo\bin\oci.exe --help 자세한 정보 표시: Successfully installed OCI CLI! PS C:\WINDOWS\system32>
이 글은 개인으로서, 개인의 시간을 할애하여 작성된 글입니다. 글의 내용에 오류가 있을 수 있으며, 글 속의 의견은 개인적인 의견입니다.