1) Install ORE on Red Hat Enterprise Linux 6

reference the page: 

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

http://docs.oracle.com/cd/E27988_01/doc/doc.112/e26499/install.htm#BABBJEBJ

http://www.oracle.com/technetwork/indexes/downloads/r-distribution-1532464.html

 

 

 

2) Install ORE Server on Red Hat Enterprise Linux 6

Note: 

use oracle user to install ORE

 

1@@@@ download install files.

  http://www.oracle.com/technetwork/database/options/advanced-analytics/r-enterprise/ore-downloads-1502823.html

download the Oracle R Enterprise Client Support Packages for Linux 64bit Operation System.

download the Oracle R Enterprise Server Packages for Linux 64bit Operation System.

 

 

2@@@@ install ORE supporting and ORE server packages 

[oracle@station78 R]$ pwd                                         

/home/oracle/R

[oracle@station78 R]$ unzip ore-server-linux-x86-64-1.3.1.zip

[oracle@station78 R]$ unzip ore-supporting-linux-x86-64-1.3.1.zip

 

@@@1# after zip you would get two directory, install supporting directory first.

[oracle@station78 R]$ ll -d server supporting

drwxr-xr-x. 2 oracle oinstall 4096 Jun  5 01:44 server

drwxr-xr-x. 2 oracle oinstall 4096 Jun  5 01:42 supporting

 

@@@2# install the supporting files 

[oracle@station78 supporting]$ ll

total 1260

-rw-rw-r--. 1 oracle oinstall 958912 Apr  3 04:51 DBI_0.2-5_R_x86_64-unknown-linux-gnu.tar.gz

-rw-rw-r--. 1 oracle oinstall  46160 Apr  3 04:51 png_0.1-4_R_x86_64-unknown-linux-gnu.tar.gz

-rw-rw-r--. 1 oracle oinstall 275764 Apr  3 04:51 ROracle_1.1-9_R_x86_64-unknown-linux-gnu.tar.gz

[oracle@station78 supporting]$ R CMD INSTALL DBI_0.2-5_R_x86_64-unknown-linux-gnu.tar.gz

[oracle@station78 supporting]$ R CMD INSTALL png_0.1-4_R_x86_64-unknown-linux-gnu.tar.gz

[oracle@station78 supporting]$ R CMD INSTALL ROracle_1.1-9_R_x86_64-unknown-linux-gnu.tar.gz

 

@@@3# after install the supporting files, install ORE server packages. 

[oracle@station78 R]$ ls -lt server/install.sh 

-r-xr-xr-x. 1 oracle oinstall 19970 Apr  3 04:51 server/install.sh

 

@@@4# set the environment need be setted

[oracle@station78 ~]$ cat .bash_profile 

if [ -f ~/.bashrc ]; then

. ~/.bashrc

fi

 

# User specific environment and startup programs

export ORACLE_BASE=/u01/app/oracle 

export ORACLE_HOME=$ORACLE_BASE/product/11.2.0.3

export ORACLE_SID=ocm11g 

export ORACLE_OWNER=oracle 

export ORACLE_TERM=vt100 

export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib:/usr/local/lib

export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib 

export CLASSPATH=$CLASSPATH:$ORACLE_HOME/network/jlib

export PATH=$PATH:$ORACLE_HOME/bin:$HOME/bin

export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/Apache/Apache/bin:$PATH 

export PATH=$PATH:/usr/sbin:/usr/bin;

export NLS_LANG=american_america.AL32UTF8 

export LANG=en_US  

export EDITOR=vim 

export TNS_ADMIN=$ORACLE_HOME/network/admin

export NLS_DATA_FORMAT="yyyy-mm-dd hh24:mi:ss"

export TZ="GMT+08:00"

 

 

@@@5# run the install script.

[oracle@station78 server]$ ./install.sh 

 

Oracle R Enterprise 1.3.1 Server Installation.

 

Copyright (c) 2012, 2013 Oracle and/or its affiliates. All rights reserved.

 

Checking R ................... Pass

Checking R libraries ......... Pass

Checking ORACLE_HOME ......... Pass

Checking ORACLE_SID .......... Pass

Checking sqlplus ............. Pass

Checking ORACLE instance ..... Pass

Checking ORE ................. Pass

 

Current configuration

  R_HOME               = /usr/lib64/R

  R_LIBS_USER          = /u01/app/oracle/product/11.2.0.3/R/library

  ORACLE_HOME          = /u01/app/oracle/product/11.2.0.3

  ORACLE_SID           = ocm11g

 

Do you wish to install ORE? [yes] yes

 

Choosing RQSYS tablespaces

  PERMANENT tablespace to use for RQSYS [SYSAUX]: 

  TEMPORARY tablespace to use for RQSYS [TEMP]: 

 

Tablespaces summary

  PERMANENT tablespace = SYSAUX

  TEMPORARY tablespace = TEMP

 

Installing libraries ......... Pass

Installing RQSYS data ........ Pass

Installing RQSYS code ........ Pass

Installing ORE packages ...... Pass

Creating ORE script .......... Pass

 

NOTE: ORE has been enabled for all database users. Next, install the

      supporting packages.

 

      You may create an ORE user with the demo_user.sh script, which

      automatically grants the required privileges. A complete list of

      privileges is available in the script rquser.sql.

 

      To use ORE Embedded R Execution functionality, grant the user

      the RQADMIN role.

 

      Please, consult the documentation for more information.

 

Done

 

 

@@@6# run the rquser.sql to create schema RQUSER

check rquser.sql introduction:

Rem    DESCRIPTION

Rem      Creates RQUSER schema.

Rem

Rem    NOTES

Rem      The script takes four parameters:

Rem        arg1 - user name (RQUSER)

Rem        arg2 - user password

Rem        arg3 - default tablespace (USER)

Rem        arg4 - tempopary tablespace (TEMP)

Rem        arg5 - quota on default tablespace (unlimited)

 

SQL> @rquser.sql RQUSER rquser users temp unlimited 

old   1: create user &&1 identified by &&2

new   1: create user RQUSER identified by rquser

old   2: default tablespace &&3

new   2: default tablespace users

old   3: temporary tablespace &&4

new   3: temporary tablespace temp

old   4: quota &&5 on &&3

new   4: quota unlimited on users

 

User created.

 

old   3: to &&1

new   3: to RQUSER

 

Grant succeeded.

 

 

3@@@@ login by oracle, load ORE package.

Note: 

I install the R-2.15 by root user, then install the ORE by oracle user.

so install supporting packages by root user again. it would work.

 

R> library(ORE)

Loading required package: OREbase

 

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: OREdm

Loading required package: lattice

Loading required package: OREpredict

Loading required package: ORExml

 

 

4@@@@ connect oracle by execute program

@@@1# set the .Rprofile to ~/.Rprofile

[oracle@station78 ~]$ pwd

/home/oracle

[oracle@station78 ~]$ cat .Rprofile 

library("DBI")

library("ROracle")

library("ORE")

options(prompt = "ORE> ")

.First <- function()

{

library(DBI)

library(ROracle)

library(ORE)

 

user = "rquser"

password = "rquser"

sid = "ocm11g"

host = "station78"

cat("Connecting to ORE \n")

cat("     User:", user, "\n")

cat("      SID:", sid , "\n")

cat("     Host:", host, "\n")

ore.connect(user, sid, host, password, all=TRUE)

cat("Connected. \n")

}

 

 

@@@2#  

[oracle@station78 admin]$ pwd

/u01/app/oracle/product/11.2.0.3/network/admin

[oracle@station78 admin]$ cat listener.ora 

# listener.ora Network Configuration File: /u01/app/oracle/product/11.2.0.3/network/admin/listener.ora

# Generated by Oracle configuration tools.

 

#LISTENER =

#  (DESCRIPTION_LIST =

#    (DESCRIPTION =

#      (ADDRESS = (PROTOCOL = TCP)(HOST = station78.example.com)(PORT = 1521))

#      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))

#    )

#  )

 

ADR_BASE_LISTENER = /u01/app/oracle

 

SID_LIST_LISTENER =

  (SID_LIST =

    (SID_DESC =

      (SID_NAME = PLSExtProc)

      (ORACLE_HOME = /u01/app/oracle/product/11.2.0.3)

      (PROGRAM = extproc)

    )

  )

 

LISTENER =

  (DESCRIPTION_LIST =

    (DESCRIPTION =

#     (ADDRESS = (PROTOCOL = TCP)(HOST = station78 )(PORT = 1521)(IP = FIRST))

      (ADDRESS = (PROTOCOL = TCP)(HOST = station78 )(PORT = 1521)(IP = FIRST))

      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))

    )

  )

 

 

@@@3#

[oracle@station78 admin]$ cat tnsnames.ora 

# tnsnames.ora Network Configuration File: /u01/app/oracle/product/11.2.0.3/network/admin/tnsnames.ora

# Generated by Oracle configuration tools.

 

OCM11G =

  (DESCRIPTION =

    (ADDRESS = (PROTOCOL = TCP)(HOST = station78.example.com)(PORT = 1521))

    (CONNECT_DATA =

      (SERVER = DEDICATED)

      (SERVICE_NAME = ocm11g)

    )

  )

 

EXTPROC_CONNECTION_DATA =

  (DESCRIPTION =

    (ADDRESS_LIST =

      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))

    )

    (CONNECT_DATA =

      (SID = PLSExtProc)

      (PRESENTATION = RO)

    )

  )

 

 

 

 

 

 

 

 

 

鍛ㄥ洿鏈変竴濂楁埧瀛愶紝澶氬皯閽卞崠锛??0骞崇背锛?褰撳湴鍧囦环240涓囷紝260涓囥傛壘鍒板潎琛$偣銆?0骞崇背锛?瀹や竴鍘咃紝涓瓑瑁呬慨锛岀嫭绔嬮槼鍙帮紝鍚庤姳鍥€?