[OCI CLI 설치] 메뉴얼 설치

[OCI CLI 설치] 메뉴얼 설치

OCI CLI 코드 설치

이 문서는 윈도우, 리눅스 계열 OS와 Mac OS에서 OCI CLI를 PyPI(Python Package Index)와 Github OCI CLI 소스로 설치하하는 과정을 소개합니다. 다음과 같은 목차로 구성됩니다.


운영 체제별 사전 준비 항목

운영 체제 별로 다음 항목을 미리 준비해야 합니다.

Window 사전 준비 사항

Python 3.5 패키지를 다운로드하고 설치합니다.

Oracle Linux 7.X 사전 준비 사항

다음 명령을 터미널에서 수행합니다.

sudo yum install gcc libffi-devel python-devel openssl-devel
sudo easy_install pip

Oracle Linux 6 사전 준비 사항

다음 명령을 터미널에서 수행합니다.

sudo yum install gcc libffi-devel python-devel openssl-devel
sudo easy_install pip
curl -O https://www.python.org/ftp/python/3.6.0/Python-3.6.0.tgz
tar -xvzf Python-3.6.0.tgz
cd Python-3.6.0
./configure
make
sudo make install

CentOS 6 & 7 사전 준비 사항

다음 명령을 터미널에서 수행합니다.

sudo yum install gcc libffi-devel python-devel openssl-devel
sudo easy_install pip

Ubuntu 16.04

다음 명령을 터미널에서 수행합니다.

sudo apt-get update
sudo apt-get install build-essential libssl-dev libffi-dev python-dev
sudo apt-get install python3-pippip3 install --upgrade pip

OCI CLI 메뉴얼 설치

OCI CLI 메뉴얼 설치는 두 가지 방법으로 진행할 수 있습니다.

Github 릴리즈 파일를 이용한 설치

Github의 OCI-CLI 레파지토리에서 제공하는 릴리즈 파일을 이용하여 OCI CLI 설치를 진행할 수 있습니다. OCI-CLI 레파지토리의 릴리즈 페이지 에서 최신 버전의 Zip 파일을 다운로드 합니다.

파일을 다운로드하고 다음과 같이 zip 파일 압축을 풉니다.

[opc@demo02 ~]$ unzip ./oci-cli-2.9.3.zip
//로그 생략
[opc@demo02 ~]$ ls
oci-cli  oci-cli-2.9.3.zip
[opc@demo02 ~]$ cd oci-cli
[opc@demo02 oci-cli]$ ls
CHANGELOG.rst  LICENSE.txt  oci_cli-2.9.3-py2.py3-none-any.whl  oci_cli_docs
[opc@demo02 oci-cli]$

다음 명령을 이용하여 whl 파일로 설치를 진행합니다.

pip install --user oci_cli-*-py2.py3-none-any.whl

이 명령의 전체 설치 로그는 다음과 같습니다.

[opc@demo02 oci-cli]$ pip install --user oci_cli-*-py2.py3-none-any.whl
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Defaulting to user installation because normal site-packages is not writeable
Processing ./oci_cli-2.9.3-py2.py3-none-any.whl
Requirement already satisfied: cryptography==2.8 in /home/opc/.local/lib/python2.7/site-packages (from oci-cli==2.9.3) (2.8)
Requirement already satisfied: certifi in /home/opc/.local/lib/python2.7/site-packages (from oci-cli==2.9.3) (2019.11.28)
Requirement already satisfied: pyOpenSSL==18.0.0 in /home/opc/.local/lib/python2.7/site-packages (from oci-cli==2.9.3) (18.0.0)
Requirement already satisfied: arrow==0.10.0 in /home/opc/.local/lib/python2.7/site-packages (from oci-cli==2.9.3) (0.10.0)
Requirement already satisfied: retrying==1.3.3 in /home/opc/.local/lib/python2.7/site-packages (from oci-cli==2.9.3) (1.3.3)
Requirement already satisfied: oci==2.10.5 in /home/opc/.local/lib/python2.7/site-packages (from oci-cli==2.9.3) (2.10.5)
Requirement already satisfied: pytz==2016.10 in /home/opc/.local/lib/python2.7/site-packages (from oci-cli==2.9.3) (2016.10)
Requirement already satisfied: idna<2.7,>=2.5 in /home/opc/.local/lib/python2.7/site-packages (from oci-cli==2.9.3) (2.6)
Requirement already satisfied: PyYAML==5.1.2 in /home/opc/.local/lib/python2.7/site-packages (from oci-cli==2.9.3) (5.1.2)
Requirement already satisfied: terminaltables==3.1.0 in /home/opc/.local/lib/python2.7/site-packages (from oci-cli==2.9.3) (3.1.0)
Requirement already satisfied: six==1.11.0 in /home/opc/.local/lib/python2.7/site-packages (from oci-cli==2.9.3) (1.11.0)
Requirement already satisfied: python-dateutil==2.7.3 in /home/opc/.local/lib/python2.7/site-packages (from oci-cli==2.9.3) (2.7.3)
Requirement already satisfied: configparser==3.5.0 in /home/opc/.local/lib/python2.7/site-packages (from oci-cli==2.9.3) (3.5.0)
Requirement already satisfied: jmespath==0.9.3 in /home/opc/.local/lib/python2.7/site-packages (from oci-cli==2.9.3) (0.9.3)
Requirement already satisfied: click==6.7 in /home/opc/.local/lib/python2.7/site-packages (from oci-cli==2.9.3) (6.7)
Requirement already satisfied: cffi!=1.11.3,>=1.8 in /home/opc/.local/lib/python2.7/site-packages (from cryptography==2.8->oci-cli==2.9.3) (1.14.0)
Requirement already satisfied: ipaddress; python_version < "3" in /usr/lib/python2.7/site-packages (from cryptography==2.8->oci-cli==2.9.3) (1.0.16)
Requirement already satisfied: enum34; python_version < "3" in /usr/lib/python2.7/site-packages (from cryptography==2.8->oci-cli==2.9.3) (1.0.4)
Requirement already satisfied: pycparser in /usr/lib/python2.7/site-packages (from cffi!=1.11.3,>=1.8->cryptography==2.8->oci-cli==2.9.3) (2.14)
Installing collected packages: oci-cli
Successfully installed oci-cli-2.9.3
[opc@demo02 oci-cli]$
[opc@demo02 oci-cli]$ oci -v
2.9.3
[opc@demo02 oci-cli]$

PyPI를 이용한 설치

다음 명령을 이용하여 OCI CLI를 설치합니다.

pip install --user oci-cli

이 명령의 전체 설치 로그는 다음과 같습니다.

[opc@demo02 oci-cli]$ pip install --user oci-cli
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Collecting oci-cli
  Using cached oci_cli-2.9.3-py2.py3-none-any.whl (7.4 MB)
Requirement already satisfied: cryptography==2.8 in /home/opc/.local/lib/python2.7/site-packages (from oci-cli) (2.8)
Requirement already satisfied: certifi in /home/opc/.local/lib/python2.7/site-packages (from oci-cli) (2019.11.28)
Requirement already satisfied: pytz==2016.10 in /home/opc/.local/lib/python2.7/site-packages (from oci-cli) (2016.10)
Requirement already satisfied: PyYAML==5.1.2 in /home/opc/.local/lib/python2.7/site-packages (from oci-cli) (5.1.2)
Requirement already satisfied: arrow==0.10.0 in /home/opc/.local/lib/python2.7/site-packages (from oci-cli) (0.10.0)
Requirement already satisfied: retrying==1.3.3 in /home/opc/.local/lib/python2.7/site-packages (from oci-cli) (1.3.3)
Requirement already satisfied: oci==2.10.5 in /home/opc/.local/lib/python2.7/site-packages (from oci-cli) (2.10.5)
Requirement already satisfied: pyOpenSSL==18.0.0 in /home/opc/.local/lib/python2.7/site-packages (from oci-cli) (18.0.0)
Requirement already satisfied: idna<2.7,>=2.5 in /home/opc/.local/lib/python2.7/site-packages (from oci-cli) (2.6)
Requirement already satisfied: terminaltables==3.1.0 in /home/opc/.local/lib/python2.7/site-packages (from oci-cli) (3.1.0)
Requirement already satisfied: six==1.11.0 in /home/opc/.local/lib/python2.7/site-packages (from oci-cli) (1.11.0)
Requirement already satisfied: python-dateutil==2.7.3 in /home/opc/.local/lib/python2.7/site-packages (from oci-cli) (2.7.3)
Requirement already satisfied: configparser==3.5.0 in /home/opc/.local/lib/python2.7/site-packages (from oci-cli) (3.5.0)
Requirement already satisfied: jmespath==0.9.3 in /home/opc/.local/lib/python2.7/site-packages (from oci-cli) (0.9.3)
Requirement already satisfied: click==6.7 in /home/opc/.local/lib/python2.7/site-packages (from oci-cli) (6.7)
Requirement already satisfied: cffi!=1.11.3,>=1.8 in /home/opc/.local/lib/python2.7/site-packages (from cryptography==2.8->oci-cli) (1.14.0)
Requirement already satisfied: ipaddress; python_version < "3" in /usr/lib/python2.7/site-packages (from cryptography==2.8->oci-cli) (1.0.16)
Requirement already satisfied: enum34; python_version < "3" in /usr/lib/python2.7/site-packages (from cryptography==2.8->oci-cli) (1.0.4)
Requirement already satisfied: pycparser in /usr/lib/python2.7/site-packages (from cffi!=1.11.3,>=1.8->cryptography==2.8->oci-cli) (2.14)
Installing collected packages: oci-cli
Successfully installed oci-cli-2.9.3
[opc@demo02 oci-cli]$ oci -v
2.9.3
[opc@demo02 oci-cli]$ which oci
~/.local/bin/oci
[opc@demo02 oci-cli]$

설치 상태 확인

OCI CLI 설치 상태를 oci -v명령으로 확인할 수 있습니다. 이 명령이 실행되면 설치된 OCI CLI 버전이 출력됩니다.

[opc@demo02 ~]$ oci -v
2.9.3
[opc@demo02 ~]$ 
  • 문서 생성: 2020-04-12 09:11 / 최종 문서 수정: 2020-04-12 09:11
  • 김태완 avatar
  • 작성자: 김태완
  • 사랑하는 민수와 데이터 관리, 데이터 분석 & 클라우드에 집중하고 있습니다.
  • E-mail: taewan.me@gmail.com
  • Disclaimer
    이 저작물은 Oracle과 관계없이 개인으로서 개인의 시간을 할애하여 작성된 글 입니다. 본 글의 내용, 입장, 예측은 Oracle을 공식적으로 절대 대변하지 않습니다.