14.1.1.2 리눅스계열에서 OCI CLI 설치하기
OCI Documentation Installing the CLI을 참조하여 설치합니다.
-
터미널 실행
-
설치된 python 버전을 확인합니다.
$ python3 --version Python 3.6.8
-
Oracle Linux 8이고 python 버전이 3.6.x인 경우 삭제후 업그레이드 합니다.
sudo dnf -y remove python36 sudo dnf -y module enable python39 sudo dnf -y install python39 python3 --version
-
-
설치 스크립트 실행을 위해 다음 실행
bash -c "$(curl -L https://raw.githubusercontent.com/oracle/oci-cli/master/scripts/install/install.sh)"
- Python 설치여부: Y 응답
- 설치 경로에 대한 확인 후 설정
- CLI의 새 버전 업데이트 확인시 Y 응답
- PATH에 CLI 추가 요청시 Y 응답
-
설치 예시
$ bash -c "$(curl -L https://raw.githubusercontent.com/oracle/oci-cli/master/scripts/install/install.sh)" % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 16926 100 16926 0 0 42104 0 --:--:-- --:--:-- --:--:-- 42000 ****************************************************************************** You have started the OCI CLI Installer in interactive mode. If you do not wish to run this in interactive mode, please include the --accept-all-defaults option. If you have the script locally and would like to know more about input options for this script, then you can run: ./install.sh -h 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 ****************************************************************************** Downloading Oracle Cloud Infrastructure CLI install script from https://raw.githubusercontent.com/oracle/oci-cli/v3.2.1/scripts/install/install.py to /tmp/oci_cli_install_tmp_KCvI. ############################################################################################################################################################ 100.0% Running install script. python3 /tmp/oci_cli_install_tmp_KCvI -- Verifying Python version. -- Python version 3.6.8 okay. ===> In what directory would you like to place the install? (leave blank to use '/home/opc/lib/oracle-cli'): -- Creating directory '/home/opc/lib/oracle-cli'. -- We will install at '/home/opc/lib/oracle-cli'. ===> In what directory would you like to place the 'oci' executable? (leave blank to use '/home/opc/bin'): -- Creating directory '/home/opc/bin'. -- The executable will be in '/home/opc/bin'. ===> In what directory would you like to place the OCI scripts? (leave blank to use '/home/opc/bin/oci-cli-scripts'): -- Creating directory '/home/opc/bin/oci-cli-scripts'. -- The scripts will be in '/home/opc/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: ['/usr/bin/python3', '-m', 'venv', '/home/opc/lib/oracle-cli'] -- Executing: ['/home/opc/lib/oracle-cli/bin/pip', 'install', '--upgrade', 'pip'] Collecting pip Downloading https://files.pythonhosted.org/packages/a4/6d/6463d49a933f547439d6b5b98b46af8742cc03ae83543e4d7688c2420f8b/pip-21.3.1-py3-none-any.whl (1.7MB) 100% |████████████████████████████████| 1.7MB 1.0MB/s Installing collected packages: pip Found existing installation: pip 9.0.3 Uninstalling pip-9.0.3: Successfully uninstalled pip-9.0.3 Successfully installed pip-21.3.1 You are using pip version 21.3.1, however version 23.1.2 is available. You should consider upgrading via the 'pip install --upgrade pip' command. -- Executing: ['/home/opc/lib/oracle-cli/bin/pip', 'install', '--cache-dir', '/tmp/tmpy9ltxtwg', '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: ['/home/opc/lib/oracle-cli/bin/pip', 'install', '--cache-dir', '/tmp/tmpy9ltxtwg', 'oci_cli', '--upgrade'] Collecting oci_cli Downloading oci_cli-3.26.0-py3-none-any.whl (37.7 MB) |████████████████████████████████| 37.7 MB 7.1 MB/s Collecting oci==2.100.0 Downloading oci-2.100.0-py3-none-any.whl (20.4 MB) |████████████████████████████████| 20.4 MB 66.5 MB/s 01 Collecting python-dateutil<3.0.0,>=2.5.3 Downloading python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB) |████████████████████████████████| 247 kB 72.8 MB/s Collecting prompt-toolkit==3.0.29 Downloading prompt_toolkit-3.0.29-py3-none-any.whl (381 kB) |████████████████████████████████| 381 kB 65.9 MB/s Collecting cryptography<40.0.0,>=3.2.1 Downloading cryptography-39.0.2-cp36-abi3-manylinux_2_28_x86_64.whl (4.2 MB) |████████████████████████████████| 4.2 MB 61.2 MB/s Collecting certifi Downloading certifi-2023.5.7-py3-none-any.whl (156 kB) |████████████████████████████████| 156 kB 72.0 MB/s Collecting terminaltables==3.1.0 Downloading terminaltables-3.1.0.tar.gz (12 kB) Preparing metadata (setup.py) ... done Collecting pyOpenSSL<24.0.0,>=17.5.0 Downloading pyOpenSSL-23.1.1-py3-none-any.whl (57 kB) |████████████████████████████████| 57 kB 10.8 MB/s Collecting pytz>=2016.10 Downloading pytz-2023.3-py2.py3-none-any.whl (502 kB) |████████████████████████████████| 502 kB 60.2 MB/s Collecting PyYAML<6,>=5.4 Downloading PyYAML-5.4.1-cp36-cp36m-manylinux1_x86_64.whl (640 kB) |████████████████████████████████| 640 kB 57.0 MB/s Collecting six>=1.15.0 Downloading six-1.16.0-py2.py3-none-any.whl (11 kB) Collecting jmespath==0.10.0 Downloading jmespath-0.10.0-py2.py3-none-any.whl (24 kB) Collecting click==8.0.4 Downloading click-8.0.4-py3-none-any.whl (97 kB) |████████████████████████████████| 97 kB 13.8 MB/s Collecting arrow>=1.0.0 Downloading arrow-1.2.3-py3-none-any.whl (66 kB) |████████████████████████████████| 66 kB 9.7 MB/s Collecting importlib-metadata Downloading importlib_metadata-4.8.3-py3-none-any.whl (17 kB) Collecting circuitbreaker<2.0.0,>=1.3.1 Downloading circuitbreaker-1.4.0.tar.gz (9.7 kB) Preparing metadata (setup.py) ... done Collecting wcwidth Downloading wcwidth-0.2.6-py2.py3-none-any.whl (29 kB) Collecting typing-extensions Downloading typing_extensions-4.1.1-py3-none-any.whl (26 kB) Collecting cffi>=1.12 Downloading cffi-1.15.1-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.whl (402 kB) |████████████████████████████████| 402 kB 70.8 MB/s Collecting pycparser Downloading pycparser-2.21-py2.py3-none-any.whl (118 kB) |████████████████████████████████| 118 kB 71.5 MB/s Collecting zipp>=0.5 Downloading zipp-3.6.0-py3-none-any.whl (5.3 kB) 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=277a3a996dc68625a3b308f49e251b1e433d894e585bdb3fdb435afedfe81073 Stored in directory: /tmp/tmpy9ltxtwg/wheels/86/1b/58/c23af2fe683acd8edc15d5a1268f0242be1ff2cf827fe34737 Building wheel for circuitbreaker (setup.py) ... done Created wheel for circuitbreaker: filename=circuitbreaker-1.4.0-py3-none-any.whl size=7506 sha256=be32c1d739a7e4b2fba9dd4ed7fafb6443ad42082f4a338aebb935506ee2a613 Stored in directory: /tmp/tmpy9ltxtwg/wheels/46/17/98/db2eb826e4a98da672cffe66ec16838182cde0cf19ad2c0c70 Successfully built terminaltables circuitbreaker Installing collected packages: pycparser, cffi, zipp, typing-extensions, six, cryptography, wcwidth, pytz, python-dateutil, pyOpenSSL, importlib-metadata, circuitbreaker, certifi, terminaltables, PyYAML, prompt-toolkit, oci, jmespath, click, arrow, oci-cli Successfully installed PyYAML-5.4.1 arrow-1.2.3 certifi-2023.5.7 cffi-1.15.1 circuitbreaker-1.4.0 click-8.0.4 cryptography-39.0.2 importlib-metadata-4.8.3 jmespath-0.10.0 oci-2.100.0 oci-cli-3.26.0 prompt-toolkit-3.0.29 pyOpenSSL-23.1.1 pycparser-2.21 python-dateutil-2.8.2 pytz-2023.3 six-1.16.0 terminaltables-3.1.0 typing-extensions-4.1.1 wcwidth-0.2.6 zipp-3.6.0 ===> Modify profile to update your $PATH and enable shell/tab completion now? (Y/n): ===> Enter a path to an rc file to update (file will be created if it does not exist) (leave blank to use '/home/opc/.bashrc'): -- Backed up '/home/opc/.bashrc' to '/home/opc/.bashrc.backup' -- Tab completion set up complete. -- If tab completion is not activated, verify that '/home/opc/.bashrc' is sourced by your shell. -- -- ** Run `exec -l $SHELL` to restart your shell. ** -- -- Installation successful. -- Run the CLI with /home/opc/bin/oci --help $
이 글은 개인으로서, 개인의 시간을 할애하여 작성된 글입니다. 글의 내용에 오류가 있을 수 있으며, 글 속의 의견은 개인적인 의견입니다.