These are the steps to install the Oracle Bare Metal Cloud Services Command Line Interface (CLI) on Oracle Linux 6 with the help of Oracle Linux yum server. The steps were performed on an Oracle Linux 6.9 Vagrant Box

 

Outline

  1. Enable additional repos and install required packages
  2. Enable Python 2.7.8 from the Software Collection Library
  3. Create a virtual environment (virtualenv) with Python 2.7.8
  4. Install oraclebmc-cli via pip

 

1. Enable Additional Repose and Install Required Packages

By installing the yum-utils package first, you can use yum-config-manager to enable an additional repo from the Oracle Linux yum server without editing configuration files.

 

$ sudo yum install yum-utils
$ sudo yum-config-manager --config /etc/yum.repos.d/public-yum-ol6.repo --enable public_ol6_software_collections
$ sudo yum install openssl-devel libffi-devel scl-utils python27 gcc

 

2. Enable Python 2.7.8 from the Software Collection Library

Oracle Linux 6.9 comes with Python 2.6.6 and the bmcs CLI requires Python 2.7.5 at a minimum. Use Python 2.7 from the Software Collection Library, installed earlier.

 

$ scl enable python27 -- bash

 

3. Create and activate a virtual environment (virtualenv) with Python 2.7.8

Use virtualenv to create an isolated Python 2.7 environment.

 

$ python -m virtualenv bmcs 
$ . bmcs/bin/activate

 

4. Install oraclebmc-cli via pip

With the virtual environment activated, use the following command to install oraclebmc-cli with pip.

 

(bmcs) $ python -m pip install oraclebmc-cli