Category Archives: Data Science
Before starting to deal with large volumes of data problems on Oracle R Enterprise (ORE) you need to perform a couple of configurations over your Oracle Linux and Oracle Database systems. Here is the recipe:
- Ensure that you have the following lines in your oracle users .bash_profile file
export R_HOME=/usr/lib64/R export PATH=/usr/bin:$PATH
- Ensure that you have already installed libpng.x86_64 and libpng-devel.x86_64 packages on your Oracle Linux otherwise issue to install them.
yum install libpng.x86_64 libpng-devel.x86_64
- Switch to root and issue R. Once you are in R session, install two prerequisites of ORE:
- Ensure that your database is 188.8.131.52 otherwise refer you need to apply several database patches:
- Go to Oracle R Enterprise Download Page and download Oracle R Enterprise Server Install for Oracle Database on Linux 64-bit (91M) and Oracle R Enterprise Client Supporting Packages for Linux 64-bit Platform (1M) (ore-server-linux-x86-64-1.1.zip and ore-supporting-linux-x86-64-1.1.zip) under Oracle R Enterprise Downloads (v1.1) section
- Unzip the file by issuing
unzip ore-server-linux-x86-64-1.1.zip ore-supporting-linux-x86-64-1.1.zip
- At this point ensure that your database to support Oracle R Enterprise is up and running
install.shin order to create ORE libraries and database objects into SYS and RQSYS schemas.
cd server ./install.sh
Oracle R Enterprise 1.1 Server Installation.
Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
Do you wish to proceed? [yes]
Checking R ................... Pass
Checking R libraries ......... Pass
Checking ORACLE_HOME ......... Pass
Checking ORACLE_SID .......... Pass
Checking sqlplus ............. Pass
Checking ORE ................. Pass
Choosing RQSYS tablespaces
PERMANENT tablespace to use for RQSYS [SYSAUX]:
TEMPORARY tablespace to use for RQSYS [TEMP]:
R_HOME = /usr/lib64/R
R_LIBS_USER = /u01/app/oracle/product/11.2.0/dbhome_1/R/library
ORACLE_HOME = /u01/app/oracle/product/11.2.0/dbhome_1
ORACLE_SID = orcl
PERMANENT tablespace = SYSAUX
TEMPORARY tablespace = TEMP
Installing libraries ......... Pass
Installing RQSYS ............. Pass
Installing ORE packages ...... Pass
Creating ORE script .......... Pass
NOTE: To use ORE functionality, a database user with RQROLE role,
a few more grants and synonyms is required. A complete list of
requirements is available in rquser.sql. There is also a demo
script demo_user.sh creating a new user RQUSER.
To use embedded R functionality, an RQADMIN role is required.
Please, consult the documentation for more information on various
- Finally install some required R libraries/packages by using
install.packagescommand in R. Ensure that user (
rootwill do that) you will start R has a write permission on
install.packages("/home/oracle/Desktop/server/ORE_1.1_R_x86_64-unknown-linux-gnu.tar.gz", repos = NULL) install.packages("/home/oracle/Desktop/server/OREbase_1.1_R_x86_64-unknown-linux-gnu.tar.gz", repos = NULL) install.packages("/home/oracle/Desktop/server/OREeda_1.1_R_x86_64-unknown-linux-gnu.tar.gz", repos = NULL) install.packages("/home/oracle/Desktop/server/OREgraphics_1.1_R_x86_64-unknown-linux-gnu.tar.gz", repos = NULL) install.packages("/home/oracle/Desktop/server/OREstats_1.1_R_x86_64-unknown-linux-gnu.tar.gz", repos = NULL) install.packages("/home/oracle/Desktop/server/ORExml_1.1_R_x86_64-unknown-linux-gnu.tar.gz", repos = NULL) install.packages("/home/oracle/Desktop/supporting/ROracle_1.1-2_R_x86_64-unknown-linux-gnu.tar.gz", repos = NULL)
- Finally start a R session (ensure that
$ORACLE_HOME/libis in your
LD_LIBRARY_PATHbefore starting R session) and load ORE library
library(ORE) Loading required package: OREbase Loading required package: ROracle Loading required package: DBI Attaching package: 'OREbase' The following object(s) are masked from 'package:base': cbind, data.frame, eval, interaction, order, paste, pmax, pmin, rbind, table Loading required package: OREstats Loading required package: MASS Loading required package: OREgraphics Loading required package: OREeda Loading required package: ORExml
It is very common to have people running R on their individual PCs. One major problem is the hardware limitations of your PCs will inhibit you to deal with large volumes of data.
Moreover if you wish to use Oracle R Enterprise you need a database connectivity and for some platforms like Mac there is no client available yet. In this post you will find how you can install R in a centralised fashion so that any individual can access it via their favorite browser.
Preparing Oracle Enterprise Linux
- Ensure that ol5_u6_base (or a further release) and el5_addons (ol5_addons is also ok) repos are enabled in /etc/yum.repos.d/public-yum-el5.repo file(by setting enabled flag to 1)
- Issue yum install R.x86_64 (Notice that R package is in el5_addons and other dependendents from el5_addons and ol5_u6_base)
- Download 64-bit RStudio-Server by issuing wget http://download2.rstudio.org/rstudio-server-0.96.331-x86_64.rpm
- Install RStudio-Server by issuing sudo rpm -Uvh rstudio-server-0.96.331-x86_64.rpm
- Start a browser and go to http://<rstudio-servername>:8787
- Provide your linux authentication details
- RStudio-Server is ready to use