6 Install Oracle Machine Learning for R Client
This chapter explains how to install OML4R Client. This chapter includes these topics:
- About OML4R Client
Lists the components of OML4R Client. - Install Oracle Database Instant Client
OML4R requires Oracle Database client software. - Install the Oracle Machine Learning for R Packages
Install the OML4R packages on each client computer. - Install the OML4R Supporting Packages
Install the OML4R supporting packages on each client computer and on the server that hosts OML4R Server. - Connect OML4R Client to OML4R Server
Instructions for connecting to an OML4R server.
6.1 About OML4R Client
Lists the components of OML4R Client.
OML4R includes several components that must be installed separately on each client computer.
Note:
The version of OML4R must be the same on the server and on each client computer. Also, the version of R must be the same on the server and on each client computer.Components of OML4R Client
-
Oracle Database Client Software
-
OML4R packages
-
OML4R supporting packages
The OML4R Client components can be installed in any order.
The following sections have information about the components.
- About Oracle Database Client Software
ROracle requires an installation of Oracle Database client. - About the OML4R Packages
The OML4R packages are a set of Oracle proprietary packages that support OML4R. - About the OML4R Supporting Packages
The supporting packages are a set of open source packages that support the OML4R packages.
See Also:
- Table 1-4 for a list of supported R and OML4R versions.
- Figure 1-2 for an illustration of the client and server components of OML4R
Parent topic: Install Oracle Machine Learning for R Client
6.1.1 About Oracle Database Client Software
ROracle requires an installation of Oracle Database client.
ROracle is one of the supporting packages used by OML4R. It requires an installation of Oracle Database client software to enable communication between an R client and an Oracle Database instance. The database client can be either Oracle Database Client or Oracle Database Instant Client:
-
Oracle Database Client is distributed with Oracle Database and is based in the Oracle home of the database.
-
Oracle Database Instant Client is a free, standalone implementation of Oracle Database Client. Oracle Instant Client is not based in an Oracle home directory and requires less disk space than Oracle Database Client.
Parent topic: About OML4R Client
6.1.2 About the OML4R Packages
The OML4R packages are a set of Oracle proprietary packages that support OML4R.
These packages are required on each client computer and on the server computer that hosts OML4R Server. On the server, the OML4R packages are installed automatically by the OML4R Server installation script.
Note:
The version of the OML4R packages on the client must match the version of the OML4R packages on the server.Table 6-1 OML4R Packages
Package Name | Description |
---|---|
|
The top-level package for OML4R. |
|
Corresponds to the open source R |
|
Contains common low-level functionality for OML4R. |
|
Exposes Oracle Data Mining algorithms through R. |
|
Transparently implements |
|
Contains functions for exploratory data analysis. |
|
Supports embedded R. |
|
Corresponds to the open source R |
|
Contains functions for advanced analytical modeling. |
|
Enables scoring data in Oracle Database using R models. |
|
Corresponds to the open source R |
|
Supports XML translation between R and Oracle Database. |
Parent topic: About OML4R Client
6.1.3 About the OML4R Supporting Packages
The supporting packages are a set of open source packages that support the OML4R packages.
Table 6-2 OML4R Supporting Packages
Package Name | Description |
---|---|
|
Provides the infrastructure for representing, manipulating, and analyzing transactional data and patterns (frequent itemsets and association rules). |
|
Supports graphic rendering on an OML4R server. |
|
A database interface definition for communication between R and Oracle Database. |
|
Supports the reading and writing of PNG images for OML4R objects. |
|
Provides classification and regression based on a forest of trees using random inputs. |
|
Oracle Database interface for R-based OCI. |
|
Provides statistical modeling functions, including growth curve comparisons, limiting dilution analysis, mixed linear models, heteroscedastic regression, Tweedie family generalized linear models, the inverse-Gaussian distribution and Gauss quadrature. |
Parent topic: About OML4R Client
6.2 Install Oracle Database Instant Client
OML4R requires Oracle Database client software.
Oracle Instant Client is suitable for most configurations of OML4R.
This topic includes these sections:
- Installing Oracle Database Instant Client on Windows
Instructions for installing Oracle Database Instant Client on Windows. - Install Oracle Database Instant Client on Linux or UNIX
You can install Oracle Database Instant Client from a zip file on Linux or UNIX systems.
Related Topics
Parent topic: Install Oracle Machine Learning for R Client
6.2.1 Installing Oracle Database Instant Client on Windows
Instructions for installing Oracle Database Instant Client on Windows.
To Install Oracle Instant Client on Windows:
-
Create an installation directory for the OML4R client components. For example:
c:\oml4rclient_install_dir
-
Go to the Oracle Database Instant Client website.
-
In the Get Oracle Instant Client section, select Downloads.
-
On the Oracle Instant Client Downloads page, select Instant Client for Microsoft Windows (x64).
-
Choose Instant Client Package - Basic for your version of Oracle Database.
-
Save the file in the installation directory that you created in Step 1. For example:
c:\oml4rclient_install_dir\instantclient-basic-windows.x64-21.3.0.0.0.zip
-
Unzip the file. The files are extracted into a subdirectory called
instantclient_
version
, whereversion
is your version of Oracle Database. For example:c:\oml4rclient_install_dir\instantclient_21_3
-
Return to the Instant Client Downloads for Microsoft Windows (x64) page.
-
Accept the license agreement and select Instant Client Package - SDK for your version of Oracle Database.
-
Save the file in the installation directory that you created in Step 1.
c:\oml4rclient_install_dir\instantclient-sdk-windows.x64-21.3.0.0.0.zip
-
Unzip the file. The files are extracted into the
instantclient_
version
subdirectory. -
Add the full path of the Instant Client to the environment variables
OCI_LIB64
andPATH
. The following steps set the variables to the path used in this example,c:\myoml4rclient\instantclient_21_3
:-
In Windows Control Panel, choose System, then click Advanced system settings.
-
On the Advanced tab, click Environment Variables.
-
Under System variables, create
OCI_LIB64
if it does not already exist. Set the value ofOCI_LIB64
toc:\oml4rclient\instantclient_21_3
. -
Under System variables, edit
PATH
to includec:\oml4rclient\instantclient_21_3
.
-
Parent topic: Install Oracle Database Instant Client
6.2.2 Install Oracle Database Instant Client on Linux or UNIX
You can install Oracle Database Instant Client from a zip file on Linux or UNIX systems.
On Linux, you can also install from RPMs.
This topic includes these sections:
- Install Oracle Instant Client from a Zip File
Instructions for installing Oracle Instant Client from a zip file. - Install Oracle Instant Client on Linux from RPMs
Instructions for installing Oracle Instant Client from RPMs.
Parent topic: Install Oracle Database Instant Client
6.2.2.1 Install Oracle Instant Client from a Zip File
Instructions for installing Oracle Instant Client from a zip file.
Parent topic: Install Oracle Database Instant Client on Linux or UNIX
6.2.2.2 Install Oracle Instant Client on Linux from RPMs
Instructions for installing Oracle Instant Client from RPMs.
Parent topic: Install Oracle Database Instant Client on Linux or UNIX
6.3 Install the Oracle Machine Learning for R Packages
Install the OML4R packages on each client computer.
The OML4R packages are automatically included in the installation on the server.
This topic includes these sections:
- Install the OML4R Packages on Windows
Instructions for installing the OML4R packages on Windows. - Install the OML4R Packages on Linux or UNIX
Instructions for installing the OML4R packages on Linux or UNIX.
Parent topic: Install Oracle Machine Learning for R Client
6.3.1 Install the OML4R Packages on Windows
Instructions for installing the OML4R packages on Windows.
-
Download the OML4R packages from the Oracle Machine Learning for R Downloads website.
-
Accept the license agreement and select the OML4R packages for your platform. Download the zip file to the installation directory that you created for Oracle Instant Client. For example:
c:\oml4rclient_install_dir\ore-client-win-x86_64-1.5.1.zip
NOTE: Choose the same installation directory for all OML4R client components.
-
Unzip the file. The contents are extracted into the
client
subdirectory:The resulting installation directory, shown in the example at the end of this section, contains Oracle Instant Client and the OML4R packages.
-
Choose one of the following methods to install the OML4R packages on Windows:
-
Install from the R Console
-
Start R x64 from the Windows Start menu.
-
Execute this R command for each zip file in the
client
directory:install.packages("oml4rclient_install_dir/client/client_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
-
Start R x64 from the Windows Start menu.
-
Select Packages from the RGui (64-bit) menu bar.
-
From the Packages menu, select Install package(s) from local zip files.
-
Change to the
client
directory. -
Select all the files in the directory.
-
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
-
Start R x64 from the Windows Start menu.
-
Open a Windows command window.
-
Change directory to the
client
directory and type these commands:R CMD INSTALL OREbase_1.5.1.zip R CMD INSTALL OREcommon_1.5.1.zip R CMD INSTALL OREstats_1.5.1.zip R CMD INSTALL OREgraphcs_1.5.1.zip R CMD INSTALL OREeda_1.5.1.zip R CMD INSTALL OREembed_1.5.1.zip R CMD INSTALL ORExml_1.5.1.zip R CMD INSTALL OREdm_1.5.1.zip R CMD INSTALL OREdplyr_1.5.1.zip R CMD INSTALL OREmodels_1.5.1.zip R CMD INSTALL OREpredict_1.5.1.zip R CMD INSTALL ORE_1.5.1.zip
Each package installation generates this message:
package 'package_name' successfully unpacked and MD5 sums checked
-
-
Example 6-1 Client Installation Directory Containing Client Packages and Instant Client
c:\oml4rclient_install_dir \client \ORE_1.5.1.zip \OREbase_1.5.1.zip \OREcommon_1.5.1.zip \OREdm_1.5.1.zip \OREdplyr_1.5.1.zip \OREeda_1.5.1.zip \OREembed_1.5.1.zip \OREgraphics_1.5.1.zip \OREmodels_1.5.1.zip \OREpredict_1.5.1.zip \OREstats_1.5.1.zip \ORExml_1.5.1.zip \instantclient_12_1 instantclient-basic-linux.x64-12.1.0.2.0.zip instantclient-sdk-linux.x64-12.1.0.2.0.zip ore-client-win-x86_64-1.5.1.zip
Parent topic: Install the Oracle Machine Learning for R Packages
6.3.2 Install the OML4R Packages on Linux or UNIX
Instructions for installing the OML4R packages on Linux or UNIX.
Parent topic: Install the Oracle Machine Learning for R Packages
6.4 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. - Install the Supporting Packages on Linux or UNIX
Instructions for installing the supporting packages on Linux or UNIX.
Parent topic: Install Oracle Machine Learning for R Client
6.4.1 Install the Supporting Packages on Windows
Instructions for installing the supporting packages on Windows.
-
Download the supporting packages from the Oracle Machine Learning for R Downloads website.
-
Select the Supporting packages for your platform and R version 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.
-
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.
-
Choose one of the following methods to install the supporting packages on Windows:
-
Install from the R Console
-
Start R x64 from the Windows Start menu.
-
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
-
Start R x64 from the Windows Start menu.
-
Select Packages from the RGui (64-bit) menu bar.
-
From the Packages menu, select Install package(s) from local zip files.
-
Change to the
support
directory. -
Select all the files in the directory.
-
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
-
Start R x64 from the Windows Start menu.
-
Open a Windows command window.
-
Change directory to the
client
directory and type these commands:R CMD INSTALL ROracle_version.zip R CMD INSTALL arules_version.zip R CMD INSTALL Cairo_version.zip R CMD INSTALL DBI_version.zip R CMD INSTALL png_version.zip R CMD INSTALL randomForest_version.zip R CMD INSTALL statmod_version.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
Parent topic: Install the OML4R Supporting Packages
6.4.2 Install the Supporting Packages on Linux or UNIX
Instructions for installing the supporting packages on Linux or UNIX.
For Linux, Verify Cairo and png Dependencies
The Cairo
and png
packages require the
presence of these operating system dependencies:
Cairo
requires thecairo-devel
package.png
requires thelibpng-devel
package.
To verify the presence of these dependencies, do the following.
- 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
- 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
Parent topic: Install the OML4R Supporting Packages
6.5 Connect OML4R Client to OML4R Server
Instructions for connecting to an OML4R server.
To connect an OML4R client to an OML4R server, start R using the ORE
script:
$ ORE R> library(ORE)
The following examples connect as user OMLUSER
with password OMLUSERpsw
:
-
For a remote database, specify the Oracle Database service identifier (SID), the host name, and the port for the connection.
ore.connect(user="OMLUSER", sid="orcl", host="severname", password="OMLUSERpsw", port=1521, all=TRUE)
Note:
To avoid specifying the password and other connection details in embedded R scripts, you can use Oracle Wallet. See Create an Oracle Wallet for an Oracle Machine Learning for R Connection.
-
For a local database, specify the connection as follows:
ore.connect("OMLUSER", password="OMLUSERpsw", conn_string="", all=TRUE)
See Also:
Oracle Machine Learning for R User’s Guide for details about connecting to an OML4R server
Parent topic: Install Oracle Machine Learning for R Client