Install Oracle Machine Learning for R on the Server

Instructions for installing OML4R on the server.

To install OML4R on the server computer, first verify that Oracle Database is installed and that the environment is configured as specified in About the Oracle Machine Learning for R Sample Installation Environment. Next, complete these steps in the specified order:

  1. Verify the environment.
  2. Install Oracle R Distribution
  3. Install Oracle Machine Learning for R Server

These steps are described in the following topics:

Verify the Environment

A checklist for the OML4R Server requirements.

Table A-1 Checklist for Oracle Machine Learning for R Server Requirements

Question Sample Answer

What is the Linux version?

% cat /etc/redhat-release
Enterprise Linux Server release 6.4 

Do you have access to the internet?

Start a browser

Can you log in as root?

% sudo -su
Password: ---------
#
# exit
%              

Is Oracle Database installed?

% SQLPLUS / as sysdba
Copyright (c) 1982, 2017, Oracle.  All rights reserved.
Connected to: Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bitProduction
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
> exit
%

What is the value of $ORACLE_HOME?

% echo $ORACLE_HOME
/myhome/product/12.1.0.2/dbhome_1

What is the value of $ORACLE_SID?

% echo $ORACLE_SID
orcl

Does $LD_LIBRARY_PATH include $ORACLE_HOME/lib?

% echo $LD_LIBRARY_PATH
/myhome/product/12.1.0.2/dbhome_1/lib:....

Does $PATH include $ORACLE_HOME/bin?

% echo $PATH
/myhome/product/12.1.0.2/dbhome_1/bin:.......

Are you a member of the dba group?

% groups
g102 dba

Can you write to $ORACLE_HOME/lib?

% ls -ld $ORACLE_HOME/lib
drwxr-xr-x 3 myuser g102 12288 Jan 27 15:31
/myhome/product/12.1.0.2/dbhome_1/lib/ ...

Install Oracle R Distribution

Example of installing Oracle R Distribution.

To install Oracle R Distribution on the server from Oracle public yum, follow these steps:

  1. Log in as root and change to the /etc/yum.repos.d directory:
    cd /etc/yum.repos.d
    
  2. List the contents of the directory to determine if the yum configuration file is present. The yum configuration file for Oracle Linux 6 is called public-yum-el6.repo.

    If public-yum-el6.repo is not present, then execute the following command to download it from Oracle public yum:

    wget https://public-yum.oracle.com/public-yum-el6.repo
    
  3. Open public-yum-el6.repo in a text editor and specify enabled=1 for latest and addons:
    [el6_latest]
    enabled=1
    
    [el6_addons]
    enabled=1
    
  4. Install Oracle R Distribution 3.3 by executing these commands:
    yum install R-3.3.0
    yum install R-core-extra
  5. Set LD_LIBRARY_PATH to the location of the files installed by the R-core-extra RPM:
  6. Exit the root user.
    exit

Install Oracle Machine Learning for R Server

OML4R Server includes the RQSYS schema in Oracle Database and OML4R packages and shared libraries.

To install OML4R Server:

  1. Verify the environment according to Table A-1.

  2. Create an installation directory for the OML4R Server components. The directory can have any name. For example:

    /myhome/myomlserver/
  3. Download the OML4R Server installation files and supporting packages from the Oracle Machine Learning for R Downloads website.

    1. Accept the license agreement and download the OML4R Server files for your platform to your installation directory.

    2. Accept the license agreement and download the OML4R Supporting packages for your platform to your installation directory.

    The installation directory now contains two zip files.

    ore-server-linux-x86-64-1.5.1.zip
    ore-supporting-linux-x86-64-1.5.1.zip
    
  4. Unzip the files.

    unzip ore-server-linux-x86-64-1.5.1.zip
    unzip ore-supporting-linux-x86-64-1.5.1.zip
    

    The installation directory looks like this after you unzip both files:

    /myhome/myomlserver
         ore-server-linux-x86-64-1.5.1.zip
         ore-supporting-linux-x86-64-1.5.1.zip
         server.sh
         /server
         /supporting
    
  5. Run server.sh to perform a default installation of OML4R Server as shown in the following example. In this example, the script runs interactively. User input is shown in bold.

    Note:

    When the script displays [list] in a prompt, you can press Enter to obtain a list of available items for your choice.

  6. On Oracle Linux 6, set LD_LIBRARY_PATH to the location of the files installed by the R-core-extra RPM:

    export LD_LIBRARY_PATH=/usr/lib64/R/port/Linux-X64/lib

Example A-1 A Default, First-Time Installation of OML4R Server

hcearwigger@myserver> ./server.sh
 
Oracle Machine Learning for R 1.5.1 Server.
 
Copyright (c) 2012, 2017 Oracle and/or its affiliates. All rights reserved.
 
Checking platform .................. Pass
Checking R ......................... Pass
Checking R libraries ............... Pass
Checking ORACLE_HOME ............... Pass
Checking ORACLE_SID ................ Pass
Checking sqlplus ................... Pass
Checking ORACLE instance ........... Pass
Checking CDB/PDB ................... Pass
Checking ORE ....................... Pass
 
Choosing RQSYS tablespaces
  PERMANENT tablespace to use for RQSYS [list]:
EXAMPLE
SYSAUX
SYSTEM
USERS
  PERMANENT tablespace to use for RQSYS [list]: SYSAUX
  TEMPORARY tablespace to use for RQSYS [list]:
TEMP
  TEMPORARY tablespace to use for RQSYS [list]: TEMP
Choosing RQSYS password
  Password to use for RQSYS: XXXXXXX
 
Choosing ORE user
  ORE user to use [list]:
BI
HR
IX
OE
SCOTT
SH
  ORE user to use [list]: ruser2
Choosing RUSER2 tablespaces
  PERMANENT tablespace to use for RUSER2 [list]: USERS
  TEMPORARY tablespace to use for RUSER2 [list]: TEMP
Choosing RUSER2 password
  Password to use for RUSER2:
  
  
  Current configuration
  R Version ...................... Oracle Distribution of R version 3.3.0  (--)
  R_HOME ......................... /usr/lib64/R
  R_LIBS_USER .................... /product/12.1.0.2/dbhome_1/R/library
  ORACLE_HOME .................... /product/12.1.0.2/dbhome_1
  ORACLE_SID ..................... orcl
 
  Existing R Version ............. None
  Existing R_HOME ................ None
  Existing ORE data .............. None
  Existing ORE code .............. None
  Existing ORE libraries ......... None
 
  RQSYS PERMANENT tablespace ..... SYSAUX
  RQSYS TEMPORARY tablespace ..... TEMP
 
  ORE user type .................. New
  ORE user name .................. RUSER2
  ORE user PERMANENT tablespace ...USERS
  ORE user TEMPORARY tablespace .. TEMP
  Grant RQADMIN role ............. No
 
  Operation ........................ Install/Upgrade/Setup
 
Proceed? [yes] y
 
Removing R libraries ............... Pass
Installing R libraries ............. Pass
Installing ORE libraries ........... Pass
Installing RQSYS data .............. Pass
Configuring ORE .................... Pass
Installing RQSYS code .............. Pass
Installing ORE packages ............ Pass
Creating ORE script ................ Pass
Installing migration scripts ....... Pass
Installing supporting packages ..... Pass
Creating ORE user .................. Pass
Granting ORE privileges ............ Pass
 
Done