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

E36763-17
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

3 Installing R

This chapter explains how to install R for Oracle R Enterprise. This chapter contains these topics:

3.1 About Oracle R Distribution and Open Source R

Oracle R Enterprise requires an installation of R on the computer that hosts Oracle R Enterprise Server and on each computer that hosts an Oracle R Enterprise client. If you intend to use Oracle R Enterprise directly on the server, then only one installation of R is necessary.

See Also:

Table 1-2, "Oracle R Enterprise Server Support Matrix" for the versions of R that are supported with Oracle R Enterprise

3.1.1 Oracle R Distribution for Oracle R Enterprise

Oracle recommends that you use Oracle R Distribution with Oracle R Enterprise Server. Oracle R Distribution is configured to simplify installation, resolve dependencies, and easily integrate with the Intel Math Kernel Library (MKL).

Benefits of Oracle R Distribution: 

  • Oracle R Distribution is compiled with the flags that are required by Oracle R Enterprise server components.

  • Oracle R Distribution uses MKL to provide high performance mathematical computations on x86 hardware. If you have a licensed installation of MKL, you can configure Oracle R Distribution to use it by simply adding it to LD_LIBRARY_PATH path and setting one environment variable. See Section 3.6 for details.

3.1.2 Open Source R for Oracle R Enterprise

You can use open source R with Oracle R Enterprise. Use the following R configuration parameters to build it from source:

./configure  --with-lapack --with-ICU=no --enable-R-shlib

See Also:

  • The R Installation and Administration manual for information about building R from source: http://www.r-project.org/

  • Section 3.7 for information about installing open source R on Windows

3.2 Installing Oracle R Distribution on Linux

Oracle recommends that you use the Oracle Public Yum server for installing R on Linux. Oracle Public Yum is located at the following URL:

http://public-yum.oracle.com/

These topics explain how to install Oracle R Distribution on Linux systems:

3.2.1 Installing Oracle R Distribution on Oracle Linux Using Yum

Before installing Oracle R Distribution, verify that your version of Oracle Linux is supported by Oracle R Enterprise. Refer to Table 1-1, "Oracle R Enterprise Platform Requirements".

To install Oracle R Distribution on Oracle Linux Using Yum: 

  1. Log in to the Linux server as root and change to the /etc/yum.repos.d directory:

    # cd /etc/yum.repos.d
    
  2. Execute the following command to download the yum configuration file from Oracle Public Yum:

    # wget http://public-yum.oracle.com/public-yum-xxx.repo
    

    The name of the configuration file is public-yum-xxx.repo, where xxx is either el5, for Oracle Linux 5, or 0l6., for Oracle Linux 6

    Note: If the yum configuration file is already present in /etc/yum.d, then you can skip this step.

  3. Open the configuration file in a text editor and specify enabled=1 for xxx_latest and xxx_addons, where xxx indicates the version of Linux, either el5 or ol6:

    [xxx_latest]
    enabled=1
    
    [xxx_addons]
    enabled=1
    
  4. Execute the yum install command to install R.

    To install R-2.15.3:

    # yum install R-2.15.3
    

    To install the most recent version of R that is available on Oracle Public Yum:

    # yum install R.x86_64
    

    Important:

    Do not assume that the most recent version of R on Oracle Public Yum is supported by your version of Oracle R Enterprise. Consult Table 1-2, "Oracle R Enterprise Server Support Matrix" to determine which version of R you should use.

3.2.2 Installing Oracle R Distribution on Oracle Linux Using RPMs

Oracle recommends that you use yum to install Oracle R Distribution. However, if yum is not available, you can install Oracle R Distribution using RPMs.

Before installing Oracle R Distribution, verify that your version of Oracle Linux is supported by Oracle R Enterprise. Refer to Table 1-1, "Oracle R Enterprise Platform Requirements".

To download and install the RPMs for Oracle Linux 5, execute the commands shown in Example 3-1. To download and install the RPMs for Oracle Linux 6, execute these same commands but replace el5 with ol6. Note that these RPMs may have dependencies that need resolving.

Example 3-1 Installing Oracle R Distribution on Oracle Linux 5 Using RPMs

# rpm -Uvh libXdmcp-devel-1.0.1-2.1.x86_64.rpm 
# rpm -Uvh libXau-devel-1.0.1-3.1.x86_64.rpm
# rpm -Uvh R-2.15.3-1.el5.x86_64.rpm
# rpm -Uvh chkfontpath-1.10.1-1.1.x86_64.rpm
# rpm -Uvh libfontenc-1.0.2-2.2.el5.x86_64.rpm
# rpm -Uvh libRmath-devel-2.15.3-1.el5.x86_64.rpm
# rpm -Uvh avahi-compat-libdns_sd-0.6.16-10.el5_6.x86_64.rpm
# rpm -Uvh hicolor-icon-theme-0.9-2.1.noarch.rpm
# rpm -Uvh libFS-1.0.0-3.1.x86_64.rpm
# rpm -Uvh paps-0.6.6-20.el5.x86_64.rpm
# rpm -Uvh bzip2-devel-1.0.3-6.el5_5.x86_64.rpm
# rpm -Uvh ttmkfdir-3.0.9-23.el5.x86_64.rpm
# rpm -Uvh ed-0.2-39.el5_2.x86_64.rpm
# rpm -Uvh zlib-1.2.3-7.el5.i386.rpm
# rpm -Uvh zlib-1.2.3-7.el5.x86_64.rpm
# rpm -Uvh desktop-file-utils-0.10-7.x86_64.rpm
# rpm -Uvh xorg-x11-xfs-1.0.2-5.el5_6.1.x86_64.rpm
# rpm -Uvh poppler-utils-0.5.4-19.el5.x86_64.rpm
# rpm -Uvh xorg-x11-font-utils-7.1-3.x86_64.rpm
# rpm -Uvh R-devel-2.15.3-1.el5.x86_64.rpm
# rpm -Uvh libgcc-4.1.2-54.el5.i386.rpm
# rpm -Uvh libgcc-4.1.2-54.el5.x86_64.rpm
# rpm -Uvh zlib-devel-1.2.3-7.el5.x86_64.rpm
# rpm -Uvh libRmath-2.15.3-1.el5.x86_64.rpm
# rpm -Uvh dialog-1.0.20051107-1.2.2.x86_64.rpm
# rpm -Uvh pcre-devel-6.6-6.el5_6.1.x86_64.rpm
# rpm -Uvh dbus-python-0.70-9.el5_4.x86_64.rpm
# rpm -Uvh cups-libs-1.3.7-30.el5_9.3.x86_64.rpm
# rpm -Uvh gmp-4.1.4-10.el5.x86_64.rpm
# rpm -Uvh atk-1.12.2-1.fc6.x86_64.rpm
# rpm -Uvh libgfortran-4.1.2-52.el5_8.1.i386.rpm
# rpm -Uvh libgfortran-4.1.2-54.el5.x86_64.rpm
# rpm -Uvh libXfont-1.2.2-1.0.4.el5_7.x86_64.rpm
# rpm -Uvh xorg-x11-proto-devel-7.1-13.el5.x86_64.rpm
# rpm -Uvh avahi-0.6.16-10.el5_6.x86_64.rpm
# rpm -Uvh libtiff-3.8.2-18.el5_8.x86_64.rpm
# rpm -Uvh pango-1.14.9-8.0.1.el5_7.3.x86_64.rpm
# rpm -Uvh bitstream-vera-fonts-1.10-7.noarch.rpm
# rpm -Uvh libstdc++-4.1.2-54.el5.x86_64.rpm
# rpm -Uvh libstdc++-4.1.2-54.el5.i386.rpm
# rpm -Uvh cairo-1.2.4-5.el5.x86_64.rpm
# rpm -Uvh mesa-libGL-devel-6.5.1-7.11.el5_9.x86_64.rpm
# rpm -Uvh tetex-dvips-3.0-33.15.el5_8.1.x86_64.rpm
# rpm -Uvh libX11-devel-1.0.3-11.el5_7.1.x86_64.rpm
# rpm -Uvh ghostscript-fonts-5.50-13.1.1.noarch.rpm
# rpm -Uvh tk-devel-8.4.13-5.el5_1.1.x86_64.rpm
# rpm -Uvh netpbm-10.35.58-10.el5.x86_64.rpm
# rpm -Uvh tcl-devel-8.4.13-6.el5.x86_64.rpm
# rpm -Uvh tcl-8.4.13-6.el5.x86_64.rpm
# rpm -Uvh netpbm-progs-10.35.58-10.el5.x86_64.rpm
# rpm -Uvh libstdc++-devel-4.1.2-54.el5.x86_64.rpm
# rpm -Uvh libstdc++-devel-4.1.2-54.el5.i386.rpm
# rpm -Uvh cpp-4.1.2-54.el5.x86_64.rpm
# rpm -Uvh poppler-0.5.4-19.el5.x86_64.rpm
# rpm -Uvh cups-1.3.7-30.el5_9.3.x86_64.rpm
# rpm -Uvh gcc-gfortran-4.1.2-54.el5.x86_64.rpm
# rpm -Uvh gcc-c++-4.1.2-54.el5.x86_64.rpm
# rpm -Uvh tetex-latex-3.0-33.15.el5_8.1.x86_64.rpm
# rpm -Uvh urw-fonts-2.3-6.1.1.noarch.rpm
# rpm -Uvh gcc-4.1.2-54.el5.x86_64.rpm
# rpm -Uvh gtk2-2.10.4-29.el5.x86_64.rpm
# rpm -Uvh mesa-libGL-6.5.1-7.11.el5_9.x86_64.rpm
# rpm -Uvh tetex-3.0-33.15.el5_8.1.x86_64.rpm
# rpm -Uvh ghostscript-8.70-14.el5_8.1.x86_64.rpm
# rpm -Uvh tetex-fonts-3.0-33.15.el5_8.1.x86_64.rpm
# rpm -Uvh R-core-2.15.3-1.el5.x86_64.rpm
# rpm -Uvh libRmath-2.15.3-1.el5.x86_64.rpm

3.2.3 Installing Oracle R Distribution on Red Hat Enterprise Linux

Before installing Oracle R Distribution, verify that your version of Red Hat Enterprise Linux is supported by Oracle R Enterprise. Refer to Table 1-1, "Oracle R Enterprise Platform Requirements".

Note:

The following installation instructions are specific to Red Hat Enterprise Linux 6. For Red Hat Enterprise Linux 5, change ol6 to el5.

To install Oracle R Distribution on Red Hat Enterprise Linux 6: 

  1. Create an RPM build directory structure:

    % mkdir -p ~/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
    
  2. Set up RPM tools to use your own build tree (to avoid root login):

    % echo '%_topdir %(echo $HOME)/rpmbuild' > ~/.rpmmacros
    
  3. Download the source RPMs (*.src.rpm) from Oracle Public Yum. For Red Hat Enterprise Linux 6:

    http://public-yum.oracle.com/repo/OracleLinux/OL6/

    Save the source RPMs to the rpmbuild/SRPMS directory.

  4. Rebuild Red Hat Enterprise Linux using rpmbuild.

    % rpmbuild --rebuild ~/rpmbuild/SRPMS/R-2.15.3-1.el6.src.rpm
    

    Note:

    If any dependencies are missing, install them as root.

    The binary RPMs are built and saved under ~/rpmbuild/RPMS.

  5. Log in as root and execute this command to install R:

    # rpm -i path/rpmbuild/RPMS/R-core_RPM
    

    For example, this command installs R 2.15.3 on Red Hat Enterprise Linux x86-64 version 6, where the path to rpmbuild is /refresh/home/.

    # rpm -i /refresh/home/rpmbuild/RPMS/x86_64/R-core-2.15.3-1.el6.x86_64.rpm
    

3.3 Installing Oracle R Distribution on Oracle Solaris

Oracle R Distribution is supported on Oracle Solaris x86-64 and SPARC. Before installing Oracle R Distribution, verify that your version of Oracle Solaris is supported by Oracle R Enterprise. Refer to Table 1-1, "Oracle R Enterprise Platform Requirements".

To install Oracle R Distribution on Oracle Solaris: 

  1. Go to the Oracle Open Source Software Download page for Oracle R Distribution:

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

  2. Download the files for your installation. The following are the files for R-2.15.3:

    • For x86 64-bit systems:

      ord-2.15.3-sol10-x86-64-sunstudio12u3.tar.gz
      ord-2.15.3-supporting-sol10-x86-64-sunstudio12u3.tar.gz
      
    • For SPARC 64-bit systems:

      ord-2.15.3-sol10-sparc-64-sunstudio12u3.tar.gz
      ord-2.15.3-supporting-sol10-sparc-64-sunstudio12u3.tar.gz
      
  3. Uncompress the first file, either sol110-x86-64 or sol10-sparc.

  4. Run install.sh as root to install the Solaris PKG file for Oracle R Distribution.

    # install.sh
    
  5. Uncompress the second file, either supporting-sol10-x86-64 or supporting-sol10-sparc, to a local directory such as $ORACLE_HOME/lib. Add that directory to $LD_LIBRARY_PATH.

    These tar files contain the shared libraries for libR.so:

    • libiconv.so.2

    • libncurses.so.5

    • libreadline.so.6

    • libsunperf.so (This library and its dependent shared libraries usually ship with Oracle Solaris Studio).

  6. Run the following command to verify that libR.so is picking up its shared library dependencies correctly from the local directory.

    # ldd -r /usr/lib/64/R/lib/libR.so
    
  7. Start R by typing R at the command prompt:

    % R
    

3.4 Installing Oracle R Distribution on IBM AIX

Oracle R Distribution is supported on IBM AIX. Before installing Oracle R Distribution, verify that your version of IBM AIX is supported by Oracle R Enterprise. Refer to Table 1-1, "Oracle R Enterprise Platform Requirements".

To install Oracle R Distribution on IBM AIX: 

  1. Go to the Oracle Open Source Software Download page for Oracle R Distribution:

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

  2. Download the files for your installation. The following are the files for R-2.15.3:

    ORD.2.15.3.0.bff.gz
    ord-supporting-aix.tar.gz
    
  3. Uncompress and untar ord-supporting-aix.tar.gz:

    $ gunzip ord-supporting-aix.tar.gz  # get ord-supporting-aix.tar
    $ tar -xvf ord-supporting-aix.tar   # extract contents of .tar file
    $ ls ord-supporting-aix             # list of rpms
    bash-4.2-5.aix5.1.ppc.rpm
    expat-2.0.1-3.aix5.1.ppc.rpm
    gettext-0.17-1.aix5.1.ppc.rpm
    glib2-2.28.6-1.aix5.1.ppc.rpm
    info-4.13a-2.aix5.1.ppc.rpm
    libiconv-1.14-1.aix5.1.ppc.rpm
    libpng-1.5.9-1.aix5.1.ppc.rpm
    libpng-devel-1.5.9-1.aix5.1.ppc.rpm
    pkg-config-0.25-2.aix5.1.ppc.rpm
    readline-6.2-3.aix5.1.ppc.rpm
    readline-devel-6.2-3.aix5.1.ppc.rpm
    texinfo-4.13a-2.aix5.1.ppc.rpm
    zlib-1.2.6-1.aix5.1.ppc.rpm
    zlib-devel-1.2.6-1.aix5.1.ppc.rpm
    

    You can also download these RPMs from http://www.perzl.org/aix/.

  4. Install the RPMs as root using an rpm command:

    $ cd /download_directory
    $ su
    # rpm -i *.rpm
    

    To upgrade existing dependencies, use:

    # rpm -UF *.rpm
    

    If you experience conflicts with dependencies, use:

    # rpm -UF --nodeps *.rpm
    
  5. Add /opt/freeware/lib to the LIBPATH environment variable:

    • For ksh:

      $ export LIBPATH=/opt/freeware/lib:$LIBPATH
      
    • For csh:

      $ setenv LIBPATH /opt/freeware/lib:$LIBPATH
      

    Ensure that /opt/freeware/lib is before /usr/lib.

  6. Uncompress ORD-2.15.1-aix.bff.gz to get ORD-2.15.1-aix.bff:

    $ gunzip ORD.2.15.1.0.bff.gz
    
  7. To install all of the filesets in Oracle R Distribution, execute the installp command (with the apply option) as root:

    $ cd /download_directory
    $ su
    # installp -a -d . ORD   # install all the filesets in ORD
    

    You can also install independent filesets:

    # installp -a -d . ORD.core   # installs only ORE.core 
    # installp -a -d . ORD.devel  # installs only ORE.devel
    
  8. Run ldd to ensure that shared library dependencies were picked up correctly:

    $ ldd /usr/lib/R/bin/exec/R
    $ ldd /usr/lib/R/lib/libR.so (libiconv, libreadline)
    $ ldd /usr/lib/R/lib/libRlapack.so
    $ ldd /usr/lib/R/lib/libRblas.so
    
  9. Add /usr/lib/R/lib to the LIBPATH environment variable:

    • For ksh:

      $ export LIBPATH=/usr/lib/R/lib:$LIBPATH
      
    • For csh:

      $ setenv LIBPATH /usr/lib/R/lib:$LIBPATH
      

3.5 Installing Oracle R Distribution on Oracle Exadata Database Machine

Oracle recommends that you use Oracle R Distribution for Oracle R Enterprise on Exadata. You must install R on each Exadata node.

For Linux systems, Oracle recommends that you install Oracle R Distribution from Oracle Public Yum:

http://public-yum.oracle.com/

Refer to the instructions in Section 3.2, "Installing Oracle R Distribution on Linux".

For Oracle Solaris systems, Oracle recommends that you install Oracle R Distribution from the Open Source Software Downloads page on the Oracle Technology Network:

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

Refer to the instructions in Section 3.3, "Installing Oracle R Distribution on Oracle Solaris".

3.6 Using the Intel Math Kernel Library

The Intel Math Kernel Library (MKL) includes highly vectorized and threaded Linear Algebra, Fast Fourier Transforms (FFT), Vector Math and Statistics functions. Oracle R Distribution includes support that dynamically picks up MKL if it is installed on your system.

Follow these steps to use MKL with Oracle R Distribution on Linux:

  1. Add libmkl_rt.so, $RHOME/lib, and $ORACLE_HOME/lib to the LD_LIBRARY_PATH system environment variable.

  2. Start R and execute this Oracle R Distribution function Sys.BlasLapack:

    R> Sys.BlasLapack()
         $vendor
         [1] "Intel Math Kernel Library (Intel MKL)"
         $nthreads
         [1] -1
    

    The vendor value returned indicates the presence of MKL instead of R's internal BLAS.

  3. In order to get the speedup provided by MKL, you must set the MKL_THREADING_LAYER environment variable to GNU before you start Oracle R Distribution on your system. In the Bash shell, set the variable as follows:

    % export MKL_THREADING_LAYER=GNU
    

3.7 Installing R on Windows

Oracle R Distribution is not supported on Windows, however the binaries distributed by the Comprehensive R Archive Network (CRAN) for Windows work with Oracle R Enterprise.

Before installing R, verify that your version of Microsoft Windows is supported by Oracle R Enterprise. Refer to Table 1-1, "Oracle R Enterprise Platform Requirements".

Follow these steps to install R on Windows: 

  1. Go to the R home page:

    http://www.r-project.org

  2. Under Download, Packages, choose CRAN.

  3. Select a CRAN Mirror.

  4. Choose Download R for Windows.

  5. Under Subdirectories, choose base.

  6. Under Other builds, choose Previous releases.

  7. Download the most recent version of R specified in Section 1.7.

  8. When the download completes, double-click the executable file to start the Windows installer for R. For example:

    R-2.15.3-win.exe
    
  9. Follow the instructions to complete the installation.