Install OCI CLI on Oracle Linux 8

To enjoy the administration of you Oracle Cloud Infrastructure OCI with Command Line Interface CLI, we have listed below the steps how to install OCI CLI on Oracle Linux 8 with the latest version of Python 3.8:

  • Oracle Linux 8 u 2
  • Python 3.8
  • PIP 3.8
  • OCI CLI 2.10.3

Step 1: Install Oracle Linux 8 if not installed

Check my video on my youtube channel, describes the steps of Oracle Linux installation using VirtualBox.

Check the Linux details

# hostnamectl 
Static hostname: ol8u2.wadhahdaouehi.tn
Icon name: computer-vm
Chassis: vm
Machine ID: XXXXXXXXXXXXXXXXXXXXXXX
Boot ID: XXXXXXXXXXXXXXXXXXXXXXX
Virtualization: oracle
Operating System: ]8;;https://linux.oracle.com/Oracle Linux Server 8.2]8;;
CPE OS Name: cpe:/o:oracle:linux:8:2:server
Kernel: Linux 5.4.17-2011.1.2.el8uek.x86_64
Architecture: x86-64

Step 2: Install Python

# yum install python38
# yum install python38-pip

Step 3: Check the pip command

# ll /usr/bin/pip3.8
-rwxr-xr-x. 1 root root 509 Apr 29 18:06 /usr/bin/pip3.8
# ll /usr/bin/pip-3.8
lrwxrwxrwx. 1 root root 8 Apr 29 18:06 /usr/bin/pip-3.8 -> ./pip3.8

Note: the command pip-3.8 is a symbolic link to pip3.8

Step 4: Install the Oracle Cloud Infrastructure Command Line Interface OCI-CLI:

# pip3.8 search oci
oci (2.14.2) - Oracle Cloud Infrastructure Python SDK
oci-cli (2.10.3) - Oracle Cloud Infrastructure CLI
opencontainers (0.0.1) - Python module for oci specifications
pylibcontainer (0.0.6) - An OCI runtime specification implementation library
quick-vcn (0.0.2) - Set up an OCI VCN and components quickly
matrixctl (0.6.0) - Controls a synapse oci-container instance via ansible
toil-py (1.3.1) - toil - Hard working python framework with eyes and boots on the ground for your cloud. Built in workers include OCI, AWS,
CHEF, SCALR, REALTIONAL DATA SOURCES.

# pip3.8 install oci-cli
WARNING: Running pip install with root privileges is generally not a good idea. Try pip3.8 install --user instead.
Collecting oci-cli
Downloading https://files.pythonhosted.org/packages/23/cf/8a3536b5b70157b85bd39c1c9f4c21222705dfa2e014fbe5404ba741dddf/oci_cli-2.10.3-py2.py3-none-any.whl (8.2MB)
|████████████████████████████████| 8.2MB 442kB/s
Collecting PyYAML==5.1.2 (from oci-cli)
Downloading https://files.pythonhosted.org/packages/e3/e8/b3212641ee2718d556df0f23f78de8303f068fe29cdaa7a91018849582fe/PyYAML-5.1.2.tar.gz (265kB)
|████████████████████████████████| 266kB 336kB/s
Collecting configparser==4.0.2 (from oci-cli)
Downloading https://files.pythonhosted.org/packages/7a/2a/95ed0501cf5d8709490b1d3a3f9b5cf340da6c433f896bbe9ce08dbe6785/configparser-4.0.2-py2.py3-none-any.whl
Collecting oci==2.14.2 (from oci-cli)
Downloading https://files.pythonhosted.org/packages/ce/a0/7e6d38ff2c3314d29738765bdb93f951a9cb63051b8d8e937e6e2a1becba/oci-2.14.2-py2.py3-none-any.whl (4.3MB)
|████████████████████████████████| 4.3MB 564kB/s
Collecting arrow==0.14.7 (from oci-cli)
Downloading https://files.pythonhosted.org/packages/b9/26/aff20e20eb4fc8f9cbe60434494b53b8cc327062585517461bfdff76125f/arrow-0.14.7-py2.py3-none-any.whl
Collecting python-dateutil<3.0.0,>=2.5.3 (from oci-cli)
Downloading https://files.pythonhosted.org/packages/d4/70/d60450c3dd48ef87586924207ae8907090de0b306af2bce5d134d78615cb/python_dateutil-2.8.1-py2.py3-none-any.whl (227kB)
|████████████████████████████████| 235kB 533kB/s
Collecting six==1.14.0 (from oci-cli)
Downloading https://files.pythonhosted.org/packages/65/eb/1f97cb97bfc2390a276969c6fae16075da282f5058082d4cb10c6c5c1dba/six-1.14.0-py2.py3-none-any.whl
Collecting pyOpenSSL==18.0.0 (from oci-cli)
Downloading https://files.pythonhosted.org/packages/96/af/9d29e6bd40823061aea2e0574ccb2fcf72bfd6130ce53d32773ec375458c/pyOpenSSL-18.0.0-py2.py3-none-any.whl (53kB)
|████████████████████████████████| 61kB 893kB/s
Collecting retrying==1.3.3 (from oci-cli)
Downloading https://files.pythonhosted.org/packages/44/ef/beae4b4ef80902f22e3af073397f079c96969c69b2c7d52a57ea9ae61c9d/retrying-1.3.3.tar.gz
Collecting jmespath==0.9.4 (from oci-cli)
Downloading https://files.pythonhosted.org/packages/83/94/7179c3832a6d45b266ddb2aac329e101367fbdb11f425f13771d27f225bb/jmespath-0.9.4-py2.py3-none-any.whl
Collecting pytz>=2016.10 (from oci-cli)
Downloading https://files.pythonhosted.org/packages/4f/a4/879454d49688e2fad93e59d7d4efda580b783c745fd2ec2a3adf87b0808d/pytz-2020.1-py2.py3-none-any.whl (510kB)
|████████████████████████████████| 512kB 70kB/s
Collecting click==6.7 (from oci-cli)
Downloading https://files.pythonhosted.org/packages/34/c1/8806f99713ddb993c5366c362b2f908f18269f8d792aff1abfd700775a77/click-6.7-py2.py3-none-any.whl (71kB)
|████████████████████████████████| 71kB 344kB/s
Collecting idna<2.7,>=2.5 (from oci-cli)
Downloading https://files.pythonhosted.org/packages/27/cc/6dd9a3869f15c2edfab863b992838277279ce92663d334df9ecf5106f5c6/idna-2.6-py2.py3-none-any.whl (56kB)
|████████████████████████████████| 61kB 442kB/s
Collecting cryptography==2.8 (from oci-cli)
Downloading https://files.pythonhosted.org/packages/ca/9a/7cece52c46546e214e10811b36b2da52ce1ea7fa203203a629b8dfadad53/cryptography-2.8-cp34-abi3-manylinux2010_x86_64.whl (2.3MB)
|████████████████████████████████| 2.3MB 497kB/s
Collecting terminaltables==3.1.0 (from oci-cli)
Downloading https://files.pythonhosted.org/packages/9b/c4/4a21174f32f8a7e1104798c445dacdc1d4df86f2f26722767034e4de4bff/terminaltables-3.1.0.tar.gz
Collecting certifi (from oci-cli)
Downloading https://files.pythonhosted.org/packages/57/2b/26e37a4b034800c960a00c4e1b3d9ca5d7014e983e6e729e33ea2f36426c/certifi-2020.4.5.1-py2.py3-none-any.whl (157kB)
|████████████████████████████████| 163kB 96kB/s
Collecting cffi!=1.11.3,>=1.8 (from cryptography==2.8->oci-cli)
Downloading https://files.pythonhosted.org/packages/49/de/1ab40dd857172da4accad610c25badfdfc23ec7e1bbcc6f9212cfcb3419d/cffi-1.14.0-cp38-cp38-manylinux1_x86_64.whl (409kB)
|████████████████████████████████| 409kB 257kB/s
Collecting pycparser (from cffi!=1.11.3,>=1.8->cryptography==2.8->oci-cli)
Downloading https://files.pythonhosted.org/packages/ae/e7/d9c3a176ca4b02024debf82342dab36efadfc5776f9c8db077e8f6e71821/pycparser-2.20-py2.py3-none-any.whl (112kB)
|████████████████████████████████| 112kB 273kB/s
Installing collected packages: PyYAML, configparser, six, pycparser, cffi, cryptography, pyOpenSSL, python-dateutil, pytz, certifi, oci, arrow, retrying, jmespath, click, idna, terminaltables, oci-cli
Running setup.py install for PyYAML … done
Running setup.py install for retrying … done
Running setup.py install for terminaltables … done
Successfully installed PyYAML-5.1.2 arrow-0.14.7 certifi-2020.4.5.1 cffi-1.14.0 click-6.7 configparser-4.0.2 cryptography-2.8 idna-2.6 jmespath-0.9.4 oci-2.14.2 oci-cli-2.10.3 pyOpenSSL-18.0.0 pycparser-2.20 python-dateutil-2.8.1 pytz-2020.1 retrying-1.3.3 six-1.14.0 terminaltables-3.1.0

Step 5: Enjoy the OCI CLI command on Oracle Linux 8

Manage you Oracle Cloud Infrastructure from Command Line.

# oci --version
2.10.3

Enjoy !

Bookmark the permalink.
Loading Facebook Comments ...

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.