5.2.1 Install Oracle R Distribution Across Exadata Compute Nodes Using DCLI

How to run DCLI to install Oracle R Distribution across multiple Exadata Linux compute nodes.

The commands are summarized in DCLI Command Summary for Oracle R Distribution installation on Exadata.

Important:

Before beginning the installation, review the instructions for installing Oracle R Distribution in Install R for Oracle Machine Learning for R.

To install Oracle R Distribution on Exadata using DCLI, follow these steps:

  1. Configure the Exadata environment to enable automatic authentication for DCLI on each compute node.

    1. Generate an SSH public-private key for the root user. Execute the following command as root on any node:

      $ ssh-keygen -N '' -f /.ssh/id_dsa -t dsa
      

      This command generates public and private key files in the .ssh subdirectory of the home directory of the root user.

    2. In a text editor, create a file that contains the names of all the compute nodes in the rack. Specify each node name on a separate line. For example, the nodes file for a 2-node cluster could contain entries like the following:

      $ cat nodes
      exadb01
      exadb02
      
    3. Run the DCLI command with the -k option to establish SSH trust across all the nodes. The -k option causes DCLI to contact each node sequentially (not in parallel) and prompts you to enter the password for each node.

      $ dcli -t -g nodes -l root -k -s "\-o StrictHostkeyChecking=no"
      

      DCLI with -k establishes SSH Trust and User Equivalence. Subsequent DCLI commands will not prompt for passwords.

  2. Install Oracle R Distribution using yum if an internet connection is available. Otherwise, install the Oracle R Distribution and operating system dependencies manually. Request the file ord-linux-x86_64-Rversion-Exadataversion.tar.gz from Oracle Support, where Rversion is the version of Oracle R Distribution to install and Exadataversion is your Exadata version number.

    1. Log in to My Oracle Support.

    2. Click Contact Us.

    3. If yum and internet access are unavailable, request access to this file through My Oracle Support.

      ord-linux-x86_64-Rversion-Exadataversion.tar.gz
      
    4. When permission is granted, log in as root to any compute node and download the file.

  3. Create a directory and replicate the downloaded file in this directory across all nodes. For example, the following commands create the directory /home/oracle/ORD and replicate the file ord-linux-x86_64-Rversion-Exadataversion.tar.gz in this directory.

    $ dcli -t -g nodes -l root mkdir -p /home/oracle/ORD
    $ dcli -t -g nodes -l root -f 
            ord-linux-x86_64-Rversion-Exadataversion.tar.gz -d
            /home/oracle/ORD/ord-linux-x86_64-Rversion-Exadataversion.tar.gz
    
  4. Uncompress and untar the file to replicate the dependent RPMs across all nodes.

    $ dcli -t -g nodes -l root tar xvfz 
            /home/oracle/ORD/ord-linux-x86_64-Rversion-Exadataversion.tar.gz
            -C /home/oracle/ORD
    $ ls /home/oracle/ORD/ord-linux-x86_64-Rversion-Exadataversion.tar.gz
    

    Alternatively, you can download these RPMs from the Oracle public yum server. The locations of the RPMs are listed in "Install Oracle R Distribution on Oracle Linux Using RPMs".

  5. To install the new RPMs and update existing RPMs across nodes, execute the following RPM command:

    $ dcli -t -g nodes -l root rpm -i --force 
            /home/oracle/ORD/ord-linux-x86_64-Rversion-Exadataversion/*.rpm
    

    The --force flag prevents errors from circular dependencies.

  6. Verify the R installations on each node by first returning to the location where R is installed and then starting R.

    $ dcli -g nodes -l oracle R RHOME
    exadb01: /usr/lib64/R
    exadb02: /usr/lib64/R
    

    For each node, the following command returns the output shown.

    $ dcli -g nodes -l oracle R --vanilla
    ...
    exadb01: R is free software and comes with ABSOLUTELY NO WARRANTY.
    exadb01: You are welcome to redistribute it under certain conditions.
    exadb01: Type 'license()' or 'licence()' for distribution details.
    exadb01:
    exadb01: Natural language support but running in an English locale
    exadb01:
    exadb01: R is a collaborative project with many contributors.
    exadb01: Type 'contributors()' for more information and
    exadb01: 'citation()' on how to cite R or R packages in publications.
    exadb01:
    exadb01: Type 'demo()' for some demos, 'help()' for on-line help, or
    exadb01: 'help.start()' for an HTML browser interface to help.
    exadb01: Type 'q()' to quit R.
    exadb01:
    exadb01: You are using Oracle's distribution of R. Please contact
    exadb01: Oracle Support for any problems you encounter with this
    exadb01: distribution.

5.2.1.1 DCLI Command Summary for Oracle R Distribution installation on Exadata

The DCLI commands used to install Oracle R Distribution on a Linux Exadata system are listed in the following example.

Replace version with the version number of the Oracle R Distribution that you are using.

Example 5-2 DCLI Command Summary for Oracle R Distribution

ssh-keygen -N " -f ~/.ssh/id_dsa -t dsa
vi nodes # enter node names
dcli -t -g nodes -l root -k -s "\-o StrictHostkeyChecking=no" 
dcli -t -g nodes -l root mkdir -p /home/oracle/ORD
dcli -t -g nodes -l root -f ord-linux-x86_64-version.tar.gz -d
           /home/oracle/ORD/ord-linux-x86_64-version.tar.gz 
dcli -t -g nodes -l root tar xvfz /home/oracle/ORD
           /ord-linux-x86_64-version.tar.gz -C /home/oracle/ORD
dcli -t -g nodes -l root rpm -i --force
           /home/oracle/ORD/ord-linux-x86_64-version/*.rpm
dcli -g nodes -l root R RHOME
dcli -g nodes -l root R --vanilla