Skip navigation
Sergio-Oracle

Useful Yum Commands

Posted by Sergio-Oracle Apr 25, 2017

Introduction

Oracle Linux uses the RPM package format and yum to interact with both the free Oracle Linux yum server and Unbreakable Linux Network for customers with a support subscription. This post covers a few useful yum commands.

 

Show Information About Installed and Available Packages

yum info <package name> displays information about both installed and available packages.

 

$ yum info kernel-uek 
Loaded plugins: security
Installed Packages
Name        : kernel-uek
Arch        : x86_64
Version     : 4.1.12
Release     : 61.1.33.el6uek
Size        : 208 M
Repo        : installed
Summary     : The Linux kernel

URL         : http://www.kernel.org/

License     : GPLv2

Description : The kernel package contains the Linux kernel (vmlinuz), the core of any

            : Linux operating system.  The kernel handles the basic functions

            : of the operating system: memory allocation, process allocation, device

            : input and output, etc.

 

Available Packages

Name        : kernel-uek

Arch        : x86_64

Version     : 4.1.12

Release     : 94.1.8.el6uek

Size        : 50 M

Repo        : public_ol6_UEKR4

Summary     : The Linux kernel

URL         : http://www.kernel.org/

License     : GPLv2

Description : The kernel package contains the Linux kernel (vmlinuz), the core of any

            : Linux operating system.  The kernel handles the basic functions

            : of the operating system: memory allocation, process allocation, device

 

 

yum list <package name> will show available and installed packages by that name. To show older versions than the one currently installed or available to install, use --show-duplicates

 

$ yum list openssl --show-duplicates

Installed Packages

openssl.x86_64                                               1:1.0.2k-16.0.1.el7                                               installed

Available Packages

openssl.x86_64                                               1:1.0.2k-12.0.1.el7                                               ol7_latest

openssl.x86_64                                               1:1.0.2k-12.0.3.el7                                               ol7_latest

openssl.x86_64                                               1:1.0.2k-16.0.1.el7                                               ol7_latest

 

 

Working with Yum Repositories: Enabling and Disabling

 

Listing Enabled and Disabled Repositories

 

The command yum repolist here lists two enabled repositories: public_ol6_UEKR4 and public_ol6_latest

 

$ yum repolist

Loaded plugins: security

public_ol6_UEKR4                                                                        | 1.2 kB    00:00 

public_ol6_latest                                                                       | 1.4 kB    00:00 

repo id                    repo name                                                    status

public_ol6_UEKR4           Latest Unbreakable Enterprise Kernel Release 4 ...                244+73

public_ol6_latest          Oracle Linux 6Server Latest (x86_64)                              31,595+7,370

repolist: 31,839

 

List Disabled Repositories

To list disabled repositories, based on the yum configuration file in /etc/yum.repos.d, use the yum repolist disabled command:

 

$ yum repolist disabled

Loaded plugins: security

repo id                        repo name                                                                                      

public_ol6_MySQL               MySQL 5.5 for Oracle Linux 6 (x86_64)                                                          

public_ol6_MySQL56             MySQL 5.6 for Oracle Linux 6 (x86_64)                                                          

public_ol6_MySQL57             MySQL 5.7 for Oracle Linux 6 (x86_64)                                                          

public_ol6_UEKR3_latest        Unbreakable Enterprise Kernel Release 3 for Oracle ... (x86_64)                      

public_ol6_UEKR4_OFED          OFED supporting tool packages for... (x86_6)

public_ol6_UEK_base            Unbreakable Enterprise Kernel for Oracle Linux 6Server (x86_64)                                

public_ol6_UEK_latest          Latest Unbreakable Enterprise Kernel for Oracle Linux 6Server (x86_64)                          

public_ol6_addons              Oracle Linux 6Server Add ons (x86_64)                                                          

public_ol6_ceph10              Ceph Storage for Oracle Linux Release 1.0 - Oracle ... (x86_64)                  

public_ol6_ga_base             Oracle Linux 6Server GA installation media copy (x86_64)                                        

 

...                          

 

repolist: 0

 

Enabling and Disabling a Repository

To enable and disable repositories, you can either edit the appropriate configuration file in /etc/yum.repos.d/ or you can use the yum-config-manager tool provided by the yum-utils package

 

$ sudo yum -y install yum-utils

 

To enable a repository, use the yum-config-manager --enable command <repo name> command. For example to enable the Addons repository for Oracle Linux 6:

$ sudo yum-config-manager --enable public_ol6_addons

 

You will see output that includes the following.  Notice that enabled = 1.

 

===================================== repo: public_ol6_addons ======================================

[public_ol6_addons]

bandwidth = 0

base_persistdir = /var/lib/yum/repos/x86_64/6Server

baseurl = http://yum.oracle.com/repo/OracleLinux/OL6/addons/x86_64/

cache = 0

cachedir = /var/cache/yum/x86_64/6Server/public_ol6_addons

cost = 1000

enabled = 1

enablegroups = True

exclude =

failovermethod = priority

ftp_disable_epsv = False

...

 

Similarly to disable a repository:

 

$ sudo yum-config-manager --disable public_ol6_addons

 

Temporarily Enabling and Disabling Repositories: enablerepo and disablerepo

Sometimes you want to perform yum commands while temporarily enabling or disabling repositories without changing the current yum configuration. Use the --enablerepo and --disablerepo arguments to achieve this.  For example, to temporarily disable all currently enabled repositories while enabling a new repository, public_ol6_u9_base in order to search for the python binary only in that repository (in addition to any installed python binaries):

 

$ yum --disablerepo="*" --enablerepo=public_ol6_u9_base provides "*/bin/python"

 

For more information about the provides argument, see the separate topic below.

Security Notices and Bugfix Notices: updateinfo

Errata (security fixes, bug fixes and enhancements) for the base Oracle Linux operating system are available for free via the Oracle Linux yum server. You can view and search all errata advisories via linux.oracle.com/errata and CVEs (Common Vulnerabilities and Exposures) in particular via linux.oracle.com/cve The plugin yum-plugin-security is installed by default and lets you query security information.

 

List a Summary of Available Bugfix and Security Notices

 

$ yum updateinfo

Loaded plugins: security

Updates Information Summary: updates

    2 Security notice(s)

        1 Critical Security notice(s)

        1 Important Security notice(s)

    2 Bugfix notice(s)

updateinfo summary done

 

List Available Security Advisories

 

To get a list of available security advisories use the yum updateinfo security command:

 

$ yum updateinfo security

Loaded plugins: security

ELSA-2017-3539 Important/Sec. kernel-uek-4.1.12-61.1.34.el6uek.x86_64

ELSA-2017-3539 Important/Sec. kernel-uek-firmware-4.1.12-61.1.34.el6uek.noarch

ELSA-2017-1100 Critical/Sec.  nss-3.28.4-1.0.1.el6_9.x86_64

ELSA-2017-1100 Critical/Sec.  nss-sysinit-3.28.4-1.0.1.el6_9.x86_64

ELSA-2017-1100 Critical/Sec.  nss-tools-3.28.4-1.0.1.el6_9.x86_64

ELSA-2017-1100 Critical/Sec.  nss-util-3.28.4-1.el6_9.x86_64

updateinfo list done

 

List Advisories by Severity

To list only Critical security advisories, use the --sec-severity=Critical flag

 

$ yum updateinfo list --sec-severity=Critical

Loaded plugins: security

ELSA-2017-1100 Critical/Sec. nss-3.28.4-1.0.1.el6_9.x86_64

ELSA-2017-1100 Critical/Sec. nss-sysinit-3.28.4-1.0.1.el6_9.x86_64

ELSA-2017-1100 Critical/Sec. nss-tools-3.28.4-1.0.1.el6_9.x86_64

ELSA-2017-1100 Critical/Sec. nss-util-3.28.4-1.el6_9.x86_64

updateinfo list done

 

Show Advisory Detail

To show detail for a particular advisory, use yum updateinfo <advisory ID>

 

$ yum updateinfo ELSA-2017-1100

Loaded plugins: security

 

=======================================================================

  nss and nss-util security update

=======================================================================

  Update ID : ELSA-2017-1100

    Release : Oracle Linux 6

       Type : security

     Status : final

     Issued : 2017-04-20

       CVEs : CVE-2017-5461

Description : nss

            : [3.28.4-1.0.1]

            : - Added nss-vendor.patch to change vendor

            : - Temporarily disable some tests until expired

            :  PayPalEE.cert is renewed

            :

            : [3.28.4-1]

            : - Rebase to 3.28.4

            :

            : nss-util

            : [3.28.4-1]

            : - Rebase to NSS 3.28.4 to accommodate base64

            :  encoding fix

   Severity : Critical

updateinfo info done

 

List Advisories by CVE

To list advisories that address a particular CVE, use yum updateinfo list --cve <CVE ID>

 

$ yum updateinfo list --cve CVE-2017-5461

Loaded plugins: security

ELSA-2017-1100 Critical/Sec. nss-3.28.4-1.0.1.el6_9.x86_64

ELSA-2017-1100 Critical/Sec. nss-sysinit-3.28.4-1.0.1.el6_9.x86_64

ELSA-2017-1100 Critical/Sec. nss-tools-3.28.4-1.0.1.el6_9.x86_64

ELSA-2017-1100 Critical/Sec. nss-util-3.28.4-1.el6_9.x86_64

updateinfo list done

 

List Vulnerabilities (CVEs) for Which Updates Are Available

To list CVEs that apply to your system use yum updateinfo list cves:

 

$ yum updateinfo list cves

Loaded plugins: security

CVE-2016-7910  Important/Sec. kernel-uek-4.1.12-61.1.34.el6uek.x86_64

CVE-2017-2583  Important/Sec. kernel-uek-4.1.12-61.1.34.el6uek.x86_64

CVE-2017-6214  Important/Sec. kernel-uek-4.1.12-61.1.34.el6uek.x86_64

CVE-2017-6347  Important/Sec. kernel-uek-4.1.12-61.1.34.el6uek.x86_64

CVE-2017-7184  Important/Sec. kernel-uek-4.1.12-61.1.34.el6uek.x86_64

CVE-2016-10208 Important/Sec. kernel-uek-4.1.12-61.1.34.el6uek.x86_64

CVE-2017-5986  Important/Sec. kernel-uek-4.1.12-61.1.34.el6uek.x86_64

CVE-2016-7910  Important/Sec. kernel-uek-firmware-4.1.12-61.1.34.el6uek.noarch

 

...

 

Apply an Update to Address a Particular CVE

To update your system to address a particular CVE:

 

$ sudo yum update --cve CVE-2017-5461

Loaded plugins: security

Setting up Update Process

Resolving Dependencies

Limiting packages to security relevant ones

4 package(s) needed (+0 related) for security, out of 7 available

--> Running transaction check

---> Package nss.x86_64 0:3.28.3-3.0.1.el6_9 will be updated

---> Package nss.x86_64 0:3.28.4-1.0.1.el6_9 will be an update

---> Package nss-sysinit.x86_64 0:3.28.3-3.0.1.el6_9 will be updated

---> Package nss-sysinit.x86_64 0:3.28.4-1.0.1.el6_9 will be an update

---> Package nss-tools.x86_64 0:3.28.3-3.0.1.el6_9 will be updated

---> Package nss-tools.x86_64 0:3.28.4-1.0.1.el6_9 will be an update

 

...

Search for Installed and Available Packages: repoquery

Search For an Available Package By Name

 

Search for any package called ruby or ruby followed by a 3 digit version number and include the repository name in the results. Here %-32 is used for formatting:

 

$ repoquery -a {ruby,ruby[0-9][0-9][0-9]} --qf "%-32{repoid} %{name}"

public_ol6_latest                ruby

public_ol6_software_collections  ruby193

public_ol6_software_collections  ruby200

 

Search For an Available Package in a Specific Repository

Use the --repoid option to limit your search to a particular repo:

$ repoquery -q python* --repoid public_ol6_software_collections

 

Find Which Package Contains a Particular File, Library or Executable: provides or whatprovides

To find out which package(s) contain a particular library, executable or any other file, use the provides or whatprovides option. For example, to find one or more packages that contain uuencode:

 

$ yum provides "*/uuencode" 

Loaded plugins: security

ol6_UEK_latest/filelists                                                |  20 MB     00:02    

ol6_addons/filelists                                                    | 922 kB     00:00    

ol6_latest/filelists                                                    |  68 MB     00:07    

sharutils-4.7-6.1.el6.x86_64 : The GNU shar utilities for packaging and unpackaging shell

                             : archives

Repo        : ol6_latest

Matched from:

Filename    : /usr/bin/uuencode

 

Even More Package Details: File Contents and Changelog

List the Contents of an Available Package

Use repoquery --list to list the file contents of a package, even if it's not installed.

 

$ repoquery --list jq 
/usr/bin/jq
/usr/share/doc/jq/AUTHORS
/usr/share/doc/jq/COPYING
/usr/share/doc/jq/README
/usr/share/doc/jq/README.md
/usr/share/man/man1/jq.1.gz

 

Inspecting Package Changelogs with yum-plugin-changelog

To inspect package changelogs, install the changelog yum plugin:

 

$ sudo yum install -y yum-plugin-changelog

 

Show Changelog Starting with a Certain Date

$ yum changelog 2017-APR-10 kernel-uek

Loaded plugins: changelog, security

 

Listing changelogs since 2017-04-10

 

==================== Available Packages ====================

kernel-uek-4.1.12-94.1.8.el6uek.x86_64  public_ol6_UEKR4

* Tue Apr 18 12:00:00 2017 Chuck Anderson <...@oracle.com> [4.1.12-94.1.8.el6uek]

- qla2xxx: Fix NULL pointer deref in QLA interrupt (Bruno Prémont)  [Orabug: 25894919]

- sched/wait: Fix the signal handling fix (Peter Zijlstra)  [Orabug: 25896852]

- Change return value for notify_change() to EACCES (Dhaval Giani)  [Orabug: 25897119]

 

* Wed Apr 12 12:00:00 2017 Chuck Anderson <...@oracle.com> [4.1.12-94.1.7.el6uek]

- block: fix use-after-free in seq file (Vegard Nossum)  [Orabug: 25877496]  {CVE-2016-7910}

 

* Tue Apr 11 12:00:00 2017 Chuck Anderson <...@oracle.com> [4.1.12-94.1.6.el6uek]

- net/mlx4_core: panic the system on unrecoverable errors (Santosh Shilimkar)  [Orabug: 25225861]

 

changelog stats. 2 pkgs, 2 source pkgs, 3 changelogs

 

 

References

Introduction

Oracle Baremetal Cloud Service (BMC) has a Ruby SDK. In this port I describe the steps to install this SDK on Oracle Linux 6.  For these instructions I used an Oracle Linux Vagrant Box.

 

Steps

The BMC Ruby SDK gem requires at least version 2.2 of Ruby. As Oracle Linux 6 by default provides Ruby 1.8.7, I'll use a more recent version of Ruby from the Software Collection Library. First I'll enable the appropriate repo on the Oracle Linux yum server to install scl-utils and various rh-ruby23 packages.

 

sudo yum -y install yum-utils
sudo yum-config-manager --enable public_ol6_software_collections
sudo yum install gcc-c++ scl-utils make rh-ruby23 rh-ruby23-ruby-devel rh-ruby23-rubygems
scl enable rh-ruby23 -- bash

 

The last command enables Ruby 2.3 environment, separate from any other existing Ruby environments on the OS.  I can verify this:

 

$ ruby -v

ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-linux-gnu]

 

Now I can install the oraclebmc gem

 

gem install oraclebmc

 

References

We recently added the jq, a lightweight and flexible command-line JSON processor to the Oracle Linux yum server. jq is a very powerful JSON processor and it can come in handy when interacting with REST APIs Here's how you install it and a quick example of how to use it.

 

Steps

  1. Installing jq
  2. Using jq

 

1. Installing jq

The jq package is in the Addons repo on Oracle Linux yum server. Install yum-utils so that you can use yum-config-manager to enable the public_ol6_addons repo on Oracle Linux 6

 

$ sudo yum install yum-utils
$ sudo yum-config-manager --enable public_ol6_addons
$ sudo yum install jq

 

2. Using jq

Let's take a look at a public REST api on oracle.com that returns JSON:

 

$ curl -s "https://apicatalog.oraclecloud.com/v1/apicollections/?filter=name:bics&filter=version:1.0"

 

This returns:

 

{

  "data" : [ {

    "apis" : [ {

      "createdAt" : "2017-01-24T20:48:08.977Z",

      "description" : "Clear the cache so everyone sees the latest data.",

      "links" : {

        "canonical" : {

          "href" : "https://apicatalog.oraclecloud.com/v1/orgs/oracle-public/apicollections/bics/1.0/apis/delete-cached-data/canonical",

          "rel" : "canonical",

          "title" : "Canonical API Description",

          "type" : "application/swagger+json;version=2.0"

        },

        "parent" : {

          "href" : "https://apicatalog.oraclecloud.com/v1/orgs/oracle-public/apicollections/bics/1.0",

          "rel" : "parent",

          "title" : "Oracle BI Cloud Service",

          "type" : "application/json"

        },

        "raw" : {

          "href" : "https://apicatalog.oraclecloud.com/v1/orgs/oracle-public/apicollections/bics/1.0/apis/delete-cached-data/raw",

          "rel" : "raw",

          "title" : "Raw API Description",

          "type" : "application/swagger+json;version=2.0"

        },

        "self" : {

          "href" : "https://apicatalog.oraclecloud.com/v1/orgs/oracle-public/apicollections/bics/1.0/apis/delete-cached-data",

          "rel" : "self",

          "title" : "Delete Cached Data",

          "type" : "application/json"

        }

      },

      "name" : "delete-cached-data",

      "title" : "Delete Cached Data",

      "updatedAt" : "2017-02-04T03:10:53.877Z"

    }, {

      "createdAt" : "2017-01-24T20:48:08.977Z",

      "description" : "Get information about Oracle BI Cloud Service.",

      "links" : {

        "canonical" : {

          "href" : "https://apicatalog.oraclecloud.com/v1/orgs/oracle-public/apicollections/bics/1.0/apis/basic/canonical",

          "rel" : "canonical",

          "title" : "Canonical API Description",

          "type" : "application/swagger+json;version=2.0"

        },

        "parent" : {

          "href" : "https://apicatalog.oraclecloud.com/v1/orgs/oracle-public/apicollections/bics/1.0",

          "rel" : "parent",

          "title" : "Oracle BI Cloud Service",

          "type" : "application/json"

        },

        "raw" : {

          "href" : "https://apicatalog.oraclecloud.com/v1/orgs/oracle-public/apicollections/bics/1.0/apis/basic/raw",

          "rel" : "raw",

          "title" : "Raw API Description",

          "type" : "application/swagger+json;version=2.0"

        },

        "self" : {

          "href" : "https://apicatalog.oraclecloud.com/v1/orgs/oracle-public/apicollections/bics/1.0/apis/basic",

          "rel" : "self",

          "title" : "Get Basic Information",

          "type" : "application/json"

        }

      },

      "name" : "basic",

      "title" : "Get Basic Information",

      "updatedAt" : "2017-02-04T03:10:53.877Z"

    }, {

      "createdAt" : "2017-01-24T20:48:08.977Z",

      "description" : "Load and manage data sets for Oracle BI Cloud Service.",

      "links" : {

        "canonical" : {

          "href" : "https://apicatalog.oraclecloud.com/v1/orgs/oracle-public/apicollections/bics/1.0/apis/dataset-load/canonical",

          "rel" : "canonical",

          "title" : "Canonical API Description",

          "type" : "application/swagger+json;version=2.0"

        },

        "parent" : {

          "href" : "https://apicatalog.oraclecloud.com/v1/orgs/oracle-public/apicollections/bics/1.0",

          "rel" : "parent",

          "title" : "Oracle BI Cloud Service",

          "type" : "application/json"

        },

        "raw" : {

          "href" : "https://apicatalog.oraclecloud.com/v1/orgs/oracle-public/apicollections/bics/1.0/apis/dataset-load/raw",

          "rel" : "raw",

          "title" : "Raw API Description",

          "type" : "application/swagger+json;version=2.0"

        },

        "self" : {

          "href" : "https://apicatalog.oraclecloud.com/v1/orgs/oracle-public/apicollections/bics/1.0/apis/dataset-load",

          "rel" : "self",

          "title" : "Manage Data Sets",

          "type" : "application/json"

        }

      },

      "name" : "dataset-load",

      "title" : "Manage Data Sets",

      "updatedAt" : "2017-02-04T03:10:53.877Z"

    }, {

      "createdAt" : "2017-01-24T20:48:08.977Z",

      "description" : "Load and manage table data for Oracle BI Cloud Service.",

      "links" : {

        "canonical" : {

          "href" : "https://apicatalog.oraclecloud.com/v1/orgs/oracle-public/apicollections/bics/1.0/apis/table-load/canonical",

          "rel" : "canonical",

          "title" : "Canonical API Description",

          "type" : "application/swagger+json;version=2.0"

        },

        "parent" : {

          "href" : "https://apicatalog.oraclecloud.com/v1/orgs/oracle-public/apicollections/bics/1.0",

          "rel" : "parent",

          "title" : "Oracle BI Cloud Service",

          "type" : "application/json"

        },

        "raw" : {

          "href" : "https://apicatalog.oraclecloud.com/v1/orgs/oracle-public/apicollections/bics/1.0/apis/table-load/raw",

          "rel" : "raw",

          "title" : "Raw API Description",

          "type" : "application/swagger+json;version=2.0"

        },

        "self" : {

          "href" : "https://apicatalog.oraclecloud.com/v1/orgs/oracle-public/apicollections/bics/1.0/apis/table-load",

          "rel" : "self",

          "title" : "Manage Table Data",

          "type" : "application/json"

        }

      },

      "name" : "table-load",

      "title" : "Manage Table Data",

      "updatedAt" : "2017-02-04T03:10:53.877Z"

    }, {

      "createdAt" : "2017-01-24T20:48:08.977Z",

      "description" : "Create and manage relational tables and indexes that store data for Oracle BI Cloud Service.",

      "links" : {

        "canonical" : {

          "href" : "https://apicatalog.oraclecloud.com/v1/orgs/oracle-public/apicollections/bics/1.0/apis/tables-indexes/canonical",

          "rel" : "canonical",

          "title" : "Canonical API Description",

          "type" : "application/swagger+json;version=2.0"

        },

        "parent" : {

          "href" : "https://apicatalog.oraclecloud.com/v1/orgs/oracle-public/apicollections/bics/1.0",

          "rel" : "parent",

          "title" : "Oracle BI Cloud Service",

          "type" : "application/json"

        },

        "raw" : {

          "href" : "https://apicatalog.oraclecloud.com/v1/orgs/oracle-public/apicollections/bics/1.0/apis/tables-indexes/raw",

          "rel" : "raw",

          "title" : "Raw API Description",

          "type" : "application/swagger+json;version=2.0"

        },

        "self" : {

          "href" : "https://apicatalog.oraclecloud.com/v1/orgs/oracle-public/apicollections/bics/1.0/apis/tables-indexes",

          "rel" : "self",

          "title" : "Manage Tables and Indexes",

          "type" : "application/json"

        }

      },

      "name" : "tables-indexes",

      "title" : "Manage Tables and Indexes",

      "updatedAt" : "2017-02-04T03:10:53.877Z"

    } ],

    "category" : "/platform/business-analytics",

    "createdAt" : "2017-01-24T20:48:08.977Z",

    "defaultVersion" : true,

    "description" : "<p>Use the Oracle BI Cloud Service REST API to programmatically load and manage data.</p>",

    "links" : {

      "self" : {

        "href" : "https://apicatalog.oraclecloud.com/v1/orgs/oracle-public/apicollections/bics/1.0",

        "rel" : "self",

        "title" : "Oracle BI Cloud Service",

        "type" : "application/json"

      }

    },

    "name" : "bics",

    "organization" : "oracle-public",

    "tags" : [ ],

    "title" : "Oracle BI Cloud Service",

    "updatedAt" : "2017-02-04T03:10:53.877Z",

    "version" : "1.0"

  } ],

  "links" : {

    "self" : {

      "href" : "https://apicatalog.oraclecloud.com/v1/apicollections/?filter=name%3Abics&filter=version%3A1.0",

      "rel" : "self",

      "title" : "Page 1",

      "type" : "application/json"

    }

  },

  "pageNumber" : 1,

  "pageSize" : 10,

  "totalCount" : 1

 

To process this JSON to display only the API descriptions, pipe the output of curl to jq with a filter that iterates over the data array and the apis array within it and selects only the values for the description key.

 

curl -s "https://apicatalog.oraclecloud.com/v1/apicollections/?filter=name:bics&filter=version:1.0" | jq '.data[] .apis[] .description'

 

This returns:

 

"Clear the cache so everyone sees the latest data."

"Get information about Oracle BI Cloud Service."

"Load and manage data sets for Oracle BI Cloud Service."

"Load and manage table data for Oracle BI Cloud Service."

"Create and manage relational tables and indexes that store data for Oracle BI Cloud Service."

For more advanced examples of processing JSON with jq, see References below.

 

References

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