Install the OML4R Supporting Packages

Install the OML4R supporting packages on each client computer and on the server that hosts OML4R Server.

This topic includes these sections:

Install the Supporting Packages on Windows

Instructions for installing the supporting packages on Windows.

  1. Download the supporting packages from the Oracle Machine Learning for R Downloads website.

  2. Select the Supporting packages for your platform and accept the license agreement. Download the zip file to the installation directory that you created for Oracle Instant Client. For example:

    c:\oml4rclient_install_dir\ore-supporting-win-x86_64-1.5.1.zip
    

    NOTE: Choose the same installation directory for all OML4R client components.

  3. Unzip the file. The contents are extracted into the supporting subdirectory:

    The resulting installation directory, shown in the example at the end of this section, contains all the client components: Oracle Instant Client, OML4R packages, and OML4R supporting packages.

  4. Choose one of the following methods to install the supporting packages on Windows:

    • Install from the R Console

      1. Start R x64 from the Windows Start menu.

      2. Execute this R command for each zip file in the client directory:

        install.packages("oml4rclient_install_dir/support/support_package_name.zip', repos=NULL)
        

        Each successful package installation produces this message in the R console:

        package 'package_name' successfully unpacked and MD5 sums checked
        
    • Install from the R GUI

      1. Start R x64 from the Windows Start menu.

      2. Select Packages from the RGui (64-bit) menu bar.

      3. From the Packages menu, select Install package(s) from local zip files.

      4. Change to the support directory.

      5. Select all the files in the directory.

      6. Click Open.

        Each package installation produces this message in the R console:

        package 'package_name' successfully unpacked and MD5 sums checked
        
    • Install from the Windows command prompt

      1. Start R x64 from the Windows Start menu.

      2. Open a Windows command window.

      3. Change directory to the client directory and type these commands:

        R CMD INSTALL ROracle_1.3-1.zip
        R CMD INSTALL arules_1.5-0.zip
        R CMD INSTALL Cairo_1.5-9.zip
        R CMD INSTALL DBI_0.6-1.zip
        R CMD INSTALL png_0.1-7.zip
        R CMD INSTALL randomForest_4.6-12.zip
        R CMD INSTALL statmod_1.4.29.zip

        Each package installation generates this message:

        package 'package_name' successfully unpacked and MD5 sums checked

Example 6-2 Client Installation Directory Containing All Client Components

c:\oml4rclient_install_dir
     \client
     \instantclient_version
     \supporting     
         \arules_version.zip
         \Cairo_version.zip
         \DBI_version.zip
         \png_version.zip
         \randomForest_version.zip
         \ROracle_version.zip
         \statmod_version.zip

instantclient-basic-linux.x64-version.zip
instantclient-sdk-linux.x64-version.zip
ore-client-win-x86_64-version.zip
ore-supporting-win-x86_64-version.zip

Install the Supporting Packages on Linux or UNIX

Instructions for installing the supporting packages on Linux or UNIX.

  1. Download the OML4R supporting packages from the Oracle Machine Learning for R Downloads website.
  2. Accept the license agreement and select the Supporting packages for your platform. Download the zip file to the installation directory that you created for Oracle Instant Client. For example:
    /oml4rclient_install_dir/ore-supporting-platform-arch-1.5.1.zip
    

    Note:

    If you are using Linux 8, then download the Supporting package file for Linux 8 64-bit.

    Note:

    Choose the same installation directory for all OML4R client components.
  3. Unzip the file:
    % unzip ore-supporting-platform-arch-1.5.1.zip
    

    If you are using Linux 8, then unzip the ore-supporting-linux8-x86-64-1.5.1.zip file.

    When you unzip the file, the /supporting directory is created and these files are extracted.

    /supporting/arules_1.5-0_R_arch-unknown-platform.tar.gz
    /supporting/Cairo_1.5-9_R_arch-unknown-platform.tar.gz
    /supporting/DBI_0.6-1_R_arch-unknown-platform.tar.gz
    /supporting/png_0.1-7_R_arch-unknown-platform.tar.gz
    /supporting/randomForest_4.6-12_R_arch-unknown-platform.tar.gz
    /supporting/ROracle_1.3-1_R_arch-unknown-platform.tar.gz
    /supporting/statmod_1.4.29_R_arch-unknown-platform.tar.gz
    
  4. Change to /oml4rclient_install_dir/supporting
  5. Execute the following commands to install the supporting packages on the client:
    R CMD INSTALL arules_1.5-0_R_arch-unknown-platform.tar.gz
    R CMD INSTALL Cairo_1.5-9_R_arch-unknown-platform.tar.gz
    R CMD INSTALL DBI_0.6-1_R_arch-unknown-platform.tar.gz
    R CMD INSTALL png_0.1-7_R_arch-unknown-platform.tar.gz
    R CMD INSTALL randomForest_4.6-12_R_arch-unknown-platform.tar.gz
    R CMD INSTALL ROracle_1.3-1_R_arch-unknown-platform.tar.gz
    R CMD INSTALL statmod_1.4.29_R_arch-unknown-platform.tar.gz
  6. Execute the following commands to install the supporting packages on the database server. When you install on the server, use the ORE command (instead of the R command used for the client, as shown in the previous step). This installs the packages to $ORACLE_HOME/R/library instead of the default location, which is /usr/lib64/R/library on Linux.
    ORE CMD INSTALL arules_1.5-0_R_arch-unknown-platform.tar.gz
    ORE CMD INSTALL Cairo_1.5-9_R_arch-unknown-platform.tar.gz
    ORE CMD INSTALL DBI_0.6-1_R_arch-unknown-platform.tar.gz
    ORE CMD INSTALL png_0.1-7_R_arch-unknown-platform.tar.gz
    ORE CMD INSTALL randomForest_4.6-12_R_arch-unknown-platform.tar.gz
    ORE CMD INSTALL ROracle_1.3-1_R_arch-unknown-platform.tar.gz
    ORE CMD INSTALL statmod_1.4.29_R_arch-unknown-platform.tar.gz

For Linux, Verify Cairo and png Dependencies

The Cairo and png packages require the presence of these operating system dependencies:

  • Cairo requires the cairo-devel package.
  • png requires the libpng-devel package.

To verify the presence of these dependencies, do the following.

  1. Execute the following commands:
    $ rpm -qa libpng-devel 
    $ rpm -qa cairo-devel 

    If the RPMs are installed, then the name of the RPM is returned.

    $ rpm -qa cairo-devel
    cairo-devel-1.15.12-3.el7.i686
    cairo-devel-1.15.12-3.el7.x86_64 
    $ rpm -qa libpng-devel 
    libpng-devel-1.5.13-7.el7_2.x86_64
    libpng-devel-1.5.13-7.el7_2.i686 
  2. If that output is not returned, the RPMs are not installed. To install them, execute the following commands as root:
    $ yum install cairo-devel 
    $ yum install libpng-devel