Skip Headers
Oracle® R Enterprise Installation and Administration Guide
Release 1.4 for Windows, Linux, Solaris, and AIX

E40670-02
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
PDF · Mobi · ePub

5 Installing Oracle R Enterprise on Exadata

This chapter explains how to install Oracle R Distribution and Oracle R Enterprise Server on Oracle Exadata Database Machine. This chapter includes these topics:

5.1 About Oracle R Enterprise on Exadata

Exadata is an ideal platform for Oracle R Enterprise. The parallel resources of R computations in Oracle R Enterprise take advantage of the massively parallel grid infrastructure of Exadata.

To install Oracle R Enterprise on Exadata: 

  1. On each node:

  2. On the first node only, create a user, as described in Section 7.1.

You can simplify the process of installing Oracle R Enterprise on Exadata by using the Distributed Command Line Interface (DCLI) as described in the following topics.

5.2 Using DCLI to Install Oracle R Enterprise on Exadata

You can use DCLI to simplify the installation of Oracle R Enterprise on Exadata. With DCLI, you can use a single command to install Oracle R Distribution and Oracle R Enterprise Server across multiple Exadata compute nodes.

Example 5-1 shows the output of the DCLI help option, which explains the basic syntax of the utility.

Example 5-1 DCLI Help Option Output

$ dcli -h
 
Distributed Shell for Oracle Storage
 
This script executes commands on multiple cells in parallel threads.
The cells are referenced by their domain name or ip address.
Local files can be copied to cells and executed on cells.
This tool does not support interactive sessions with host applications.
Use of this tool assumes ssh is running on local host and cells.
The -k option should be used initially to perform key exchange with
cells.  User may be prompted to acknowledge cell authenticity, and
may be prompted for the remote user password.  This -k step is serialized
to prevent overlayed prompts.  After -k option is used once, then
subsequent commands to the same cells do not require -k and will not require
passwords for that user from the host.
Command output (stdout and stderr) is collected and displayed after the
copy and command execution has finished on all cells.
Options allow this command output to be abbreviated.

Return values:
 0 -- file or command was copied and executed successfully on all cells
 1 -- one or more cells could not be reached or remote execution returned
      non-zero status.
 2 -- An error prevented any command execution

Examples:
 dcli -g mycells -k
 dcli -c stsd2s2,stsd2s3 vmstat
 dcli -g mycells cellcli -e alter iormplan active
 dcli -g mycells -x reConfig.scl
 
usage: dcli [options] [command]

options:
 --version           show program's version number and exit
 -c CELLS            comma-separated list of cells
 -d DESTFILE         destination directory or file
 -f FILE             file to be copied
 -g GROUPFILE        file containing list of cells
 -h, --help          show help message and exit
 -k                  push ssh key to cell's authorized_keys file
 -l USERID           user to login as on remote cells (default: celladmin)
 -n                  abbreviate non-error output
 -r REGEXP           abbreviate output lines matching a regular expression
 -s SSHOPTIONS       string of options passed through to ssh
 --scp=SCPOPTIONS    string of options passed through to scp if different from
                     sshoptions
 --serial            serialize execution over the cells
 -t                  list target cells
 --unkey             drop keys from target cells' authorized_keys file
 -v                  print extra messages to stdout
 --vmstat=VMSTATOPS  vmstat command options
 -x EXECFILE         file to be copied and executed

See Also:

My Oracle Support for more details about DCLI. Go to the following web site, log in with your Customer Support Identifier, and type DCLI in the search box.

https://support.oracle.com/

5.3 Installing Oracle R Distribution Across Exadata Compute Nodes

This section explains how to run DCLI to install Oracle R Distribution across multiple Exadata Linux compute nodes. The commands are summarized in Section 5.3.1.

Important:

Before beginning the installation, review the instructions for installing Oracle R Distribution in Chapter 3.

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 comand 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. Log in as root to any compute node. Go to the Oracle Open Source Software Download page for Oracle R Distribution:

    https://oss.oracle.com/ORD/

    Download this file: ord-linux-x86_64-3.0.1.tar.gz

  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-3.0.1.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-3.0.1.tar.gz -d
              /home/oracle/ORD/ord-linux-x86_64-3.0.1.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-3.0.1.tar.gz -C /home/oracle/ORD
    $ ls /home/oracle/ORD/ord-linux-x86_64-3.0.1
    

    Alternatively, you can download these RPMs from the Oracle public yum server at http://public-yum.oracle.com/.

    Several of the dependencies required by the R development RPMs may cause conflicts during a standard Exadata upgrade. To avoid these conflicts, remove the following RPMs from the list:

    gcc-gfortran
    mesa-libGl-devel
    libpng-devel
    R-devel-3.0.1.el5.x86_64.rpm
    
  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-3.0.1/*.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
    

    The following command returns this output for each node.

    $ dcli -g nodes -l oracle R --vanilla
    exadb01: Oracle Distribution of R version 3.0.1 (--) -- "Good Sport"
    exadb01: Copyright (C) The R Foundation for Statistical Computing
    exadb01: Platform: x86_64-unknown-linux-gnu (64-bit)
    exadb01:
    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.3.1 DCLI Command Summary for Oracle R Distribution installation on Exadata

The DCLI commands used to install Oracle R Distribution 3.0.1 on a Linux Exadata system are listed in Example 5-2.

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-3.0.1.tar.gz -d
           /home/oracle/ORD/ord-linux-x86_64-3.0.1.tar.gz 
dcli -t -g nodes -l root tar xvfz /home/oracle/ORD/ord-linux-x86_64-3.0.1.tar.gz
          -C /home/oracle/ORD
dcli -t -g nodes -l root rpm -i --force 
          /home/oracle/ORD/ord-linux-x86_64-3.0.1/*.rpm
dcli -g nodes -l root R RHOME
dcli -g nodes -l root R --vanilla

5.4 Installing Oracle R Enterprise Server Across Exadata Compute Nodes

This section explains how to run DCLI to install Oracle R Enterprise Server across multiple Exadata Linux compute nodes. The commands are summarized in Section 5.4.1.

Important:

Before beginning the installation, review the instructions for installing Oracle R Enterprise Server in Chapter 4

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

  1. Go to the Oracle R Enterprise home page on the Oracle Technology Network:.

    http://www.oracle.com/technetwork/database/options/advanced-analytics/r-enterprise/
    

    Select Oracle R Enterprise Downloads. On the Downloads page, select Oracle R Enterprise Server and the Supporting Packages for Linux. The following files are downloaded for Oracle R Enterprise 1.4.

    ore-server-linux-x86-64-1.4.zip
    ore-supporting-linux-x86-64-1.4.zip
    
  2. Copy the installers for Oracle R Enterprise Server and the supporting packages across nodes.

    $ dcli -g nodes -l oracle mkdir -p /home/oracle/ORE
    $ dcli -g nodes -l oracle -f ore-server-linux-x86-64-1.4.zip -d /home/oracle/ORE/ore-server-linux-x86-64-1.4.zip
    $ dcli -g nodes -l oracle -f ore-supporting-linux-x86-64-1.4.zip -d /home/oracle/ORE/ore-supporting-linux-x86-64-1.4.zip
    
  3. Unzip both installers:

    $ dcli -t -g nodes -l oracle unzip
         /home/oracle/ORE/ore-server-linux-x86-64-1.4.zip -d /home/oracle/ORE
    $ dcli -t -g nodes -l oracle unzip
         /home/oracle/ORE/ore-supporting-linux-x86-64-1.4.zip -d /home/oracle/ORE
    
  4. Install Oracle R Enterprise server components:

    $ dcli -t -g nodes -l oracle /home/oracle/ORE/server/./install.sh
    
  5. Create an Oracle R Enterprise user:

    $ dcli -t -g nodes -l oracle /home/oracle/ORE/server/./demo_user.sh
    
  6. Execute the demo_user.sh script to grant privileges to the Oracle R Enterprise user. The default user is rquser. Because the database is shared, the privileges only need to be granted on a single node.

    $ cd /home/oracle/ORE 
    $ sqlplus / as sysdba
      grant RQADMIN to rquser;
      grant CREATE TABLE to rquser;
      grant CREATE SESSION to rquser;
      grant CREATE VIEW to rquser;
      grant CREATE PROCEDURE to rquser;
      grant CREATE MINING MODEL to rquser;
    
  7. Install Oracle R Enterprise supporting packages.

    $ dcli -t -g nodes -l oracle R CMD INSTALL 
       /home/oracle/ORE/supporting/DBI_0.2-7_R_x86_64-unknown-linux-gnu.tar.gz
    $ dcli -t -g nodes -l oracle R CMD INSTALL 
       /home/oracle/ORE/supporting/ROracle_1.1-11_R_x86_64-unknown-linux-gnu.tar.gz
    $ dcli -t -g nodes -l oracle R CMD INSTALL 
       /home/oracle/ORE/supporting/png_0.1-7_R_x86_64-unknown-linux-gnu.tar.gz
    $ dcli -t -g nodes -l oracle R CMD INSTALL 
       /home/oracle/ORE/supporting/cairo_1.5-5_R_x86_64-unknown-linux-gnu.tar.gz
    
  8. Verify Oracle R Enterprise loads.

    > library(ORE)
    Loading required package: OREbase
    Attaching package: OREbase
    The following objects are masked from âpackage:baseâ:
        cbind, data.frame, eval, interaction, order, paste, pmax, pmin,
        rbind, table
    Loading required package: OREembed
    Loading required package: OREstats
    Loading required package: MASS
    Loading required package: OREgraphics
    Loading required package: OREeda
    Loading required package: OREmodels
    Loading required package: OREdm
    Loading required package: lattice
    Loading required package: OREpredict
    Loading required package: ORExml 
    

5.4.1 DCLI Commands Summary for Oracle R Enterprise Server

The DCLI commands used to install Oracle R Enterprise Server 1.4 and the supporting packages on a Linux Exadata system are listed in Example 5-3.

Example 5-3 DCLI Command Summary for Oracle R Enterprise Server

dcli -g nodes -l oracle mkdir -p /home/oracle/ORE
dcli -g nodes -l oracle -f ore-server-linux-x86-64-1.4.zip -d
    /home/oracle/ORE/ore-server-linux-x86-64-1.4.zip
dcli -g nodes -l oracle -f ore-supporting-linux-x86-64-1.4.zip -d
    /home/oracle/ORE/ore-supporting-linux-x86-64-1.4.zip
 
dcli -t -g nodes -l oracle unzip
    /home/oracle/ORE/ore-server-linux-x86-64-1.4.zip -d /home/oracle/ORE
dcli -t -g nodes -l oracle unzip
     /home/oracle/ORE/ore-supporting-linux-x86-64-1.4.zip -d /home/oracle/ORE
 
dcli -t -g nodes -l oracle /home/oracle/ORE/server/./install.sh
dcli -t -g nodes -l oracle /home/oracle/ORE/server/./demo_user.sh
 
cd /home/oracle/ORE 
sqlplus / as sysdba
  grant RQADMIN to rquser;
  grant CREATE TABLE to rquser;
  grant CREATE SESSION to rquser;
  grant CREATE VIEW to rquser;
  grant CREATE PROCEDURE to rquser;
  grant CREATE MINING MODEL to rquser;
 
$ dcli -t -g nodes -l oracle R CMD INSTALL 
   /home/oracle/ORE/supporting/DBI_0.2-7_R_x86_64-unknown-linux-gnu.tar.gz
$ dcli -t -g nodes -l oracle R CMD INSTALL 
   /home/oracle/ORE/supporting/ROracle_1.1-11_R_x86_64-unknown-linux-gnu.tar.gz
$ dcli -t -g nodes -l oracle R CMD INSTALL 
   /home/oracle/ORE/supporting/png_0.1-7_R_x86_64-unknown-linux-gnu.tar.gz
$ dcli -t -g nodes -l oracle R CMD INSTALL 
   /home/oracle/ORE/supporting/cairo_1.5-5_R_x86_64-unknown-linux-gnu.tar.gz

dcli -t -g nodes -l oracle ORE -e "library(ORE)"