ヘッダーをスキップ
Oracle® R Enterpriseインストレーションおよび管理ガイド
リリース1.4 for Windows, Linux, Solaris, and AIX
E52976-01
  目次へ移動
目次
索引へ移動
索引

前
 
次
 

5 ExadataへのOracle R Enterpriseのインストール

この章では、Oracle Exadataデータベース・マシンへのOracle R DistributionおよびOracle R Enterprise Serverのインストール方法を説明します。この章の内容は、次のとおりです。

5.1 ExadataでのOracle R Enterpriseについて

ExadataはOracle R Enterpriseに最も適したプラットフォームです。Oracle R EnterpriseのR計算の並列リソースは、Exadataの大規模なパラレル・グリッド・インフラストラクチャを活用します。

Oracle R EnterpriseをExadataにインストールするには、次の手順を実行します。

  1. ノードで、次の手順を実行します。

  2. 最初のノードでのみ、第7.1項の説明に従ってユーザーを作成します。

次の各項で説明する分散コマンドライン・インタフェース(DCLI)を使用することで、ExadataへのOracle R Enterpriseのインストール・プロセスを簡略化できます。

5.2 ExadataにOracle R EnterpriseをインストールするためのDCLIの使用方法

DCLIを使用してExadataへのOracle R Enterpriseのインストールを簡略化できます。DCLIを使用することで、1つのコマンドを使用して、複数のExadata計算ノードにOracle R DistributionおよびOracle R Enterprise Serverをインストールできます。

例5-1に、このユーティリティの基本構文を説明するDCLIのヘルプ・オプションを示します。

例5-1 DCLIのヘルプ・オプションの出力

$ dcli -h
 
Distributed Shell for Oracle Storage
 
This script executes commands on multiple cells in parallel threads.
The cells are referenced by their domain name or ip address.
Local files can be copied to cells and executed on cells.
This tool does not support interactive sessions with host applications.
Use of this tool assumes ssh is running on local host and cells.
The -k option should be used initially to perform key exchange with
cells.  User may be prompted to acknowledge cell authenticity, and
may be prompted for the remote user password.  This -k step is serialized
to prevent overlayed prompts.  After -k option is used once, then
subsequent commands to the same cells do not require -k and will not require
passwords for that user from the host.
Command output (stdout and stderr) is collected and displayed after the
copy and command execution has finished on all cells.
Options allow this command output to be abbreviated.

Return values:
 0 -- file or command was copied and executed successfully on all cells
 1 -- one or more cells could not be reached or remote execution returned
      non-zero status.
 2 -- An error prevented any command execution

Examples:
 dcli -g mycells -k
 dcli -c stsd2s2,stsd2s3 vmstat
 dcli -g mycells cellcli -e alter iormplan active
 dcli -g mycells -x reConfig.scl
 
usage: dcli [options] [command]

options:
 --version           show program's version number and exit
 -c CELLS            comma-separated list of cells
 -d DESTFILE         destination directory or file
 -f FILE             file to be copied
 -g GROUPFILE        file containing list of cells
 -h, --help          show help message and exit
 -k                  push ssh key to cell's authorized_keys file
 -l USERID           user to login as on remote cells (default: celladmin)
 -n                  abbreviate non-error output
 -r REGEXP           abbreviate output lines matching a regular expression
 -s SSHOPTIONS       string of options passed through to ssh
 --scp=SCPOPTIONS    string of options passed through to scp if different from
                     sshoptions
 --serial            serialize execution over the cells
 -t                  list target cells
 --unkey             drop keys from target cells' authorized_keys file
 -v                  print extra messages to stdout
 --vmstat=VMSTATOPS  vmstat command options
 -x EXECFILE         file to be copied and executed

関連項目:

DCLIの詳細は、My Oracle Supportを参照してください。次のWebサイトに移動し、カスタマサポートIDでログインして、検索ボックスにDCLIと入力します。

https://support.oracle.com/


5.3 Exadata計算ノードを介したOracle R Distributionのインストール

この項では、複数のExadataのLinux計算ノードにOracle R DistributionをインストールするためのDCLIの実行方法を説明します。各コマンドは第5.3.1項にまとめれています。


重要:

インストールを開始する前に、第3章のOracle R Distributionのインストール手順を確認してください。

DCLIを使用してExadataにOracle R Distributionをインストールするには、次の手順を実行します。

  1. 各計算ノードでDCLIに対する自動認証を有効化するようにExadata環境を構成します。

    1. rootユーザーのSSH公開鍵-秘密鍵を生成します。任意のノードで次のコマンドをrootで実行します。

      $ ssh-keygen -N '' -f /.ssh/id_dsa -t dsa
      

      このコマンドによって、rootユーザーのホーム・ディレクトリの.sshサブディレクトリに公開鍵および秘密鍵のファイルが生成されます。

    2. テキスト・エディタで、ラック内のすべての計算ノードの名前を含むファイルを作成します。1行に1つのノード名を指定します。たとえば、2ノード・クラスタのnodesファイルには、次のようなエントリが含まれます。

      $ cat nodes
      exadb01
      exadb02
      
    3. 全ノードでSSH信頼を確立するために、-kオプションを使用してDCLIコマンドを実行します。-kオプションによって、DCLIが各ノードに順に(並行にではなく)接触し、各ノードのパスワードの入力が求められます。

      $ dcli -t -g nodes -l root -k -s "\-o StrictHostkeyChecking=no"
      

      -kを使用したDCLIは、SSH信頼およびユーザー等価関係を確立します。この後のDCLIコマンドではパスワードの入力は求められません。

  2. 任意の計算ノードにrootでログインします。Oracle R Distributionのオープン・ソース・ソフトウェアのダウンロード・ページに移動します。

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

    ファイルord-linux-x86_64-3.0.1.tar.gzをダウンロードします。

  3. ディレクトリを作成し、このディレクトリにダウンロードしたファイルをすべてのノードにレプリケートします。たとえば、次のコマンドは、ディレクトリ/home/oracle/ORDを作成し、ファイルord-linux-x86_64-3.0.1.tar.gzをこのディレクトリにレプリケートします。

    $ dcli -t -g nodes -l root mkdir -p /home/oracle/ORD
    $ dcli -t -g nodes -l root -f ord-linux-x86_64-3.0.1.tar.gz -d
              /home/oracle/ORD/ord-linux-x86_64-3.0.1.tar.gz
    
  4. このファイルを圧縮解除およびuntarして、全ノードに依存RPMをレプリケートします。

    $ dcli -t -g nodes -l root tar xvfz 
              /home/oracle/ORD/ord-linux-x86_64-3.0.1.tar.gz -C /home/oracle/ORD
    $ ls /home/oracle/ORD/ord-linux-x86_64-3.0.1
    

    または、これらのRPMをhttp://public-yum.oracle.com/にあるOracle Public Yumサーバーからダウンロードできます。

    R開発RPMで必要な一部の依存性は、標準のExadataアップグレードで競合を引き起こす可能性があります。この競合を回避するには、次のRPMをリストから削除します。

    gcc-gfortran
    mesa-libGl-devel
    libpng-devel
    R-devel-3.0.1.el5.x86_64.rpm
    
  5. 新しいRPMをインストールし、全ノードの既存のRPMを更新するには、次のRPMコマンドを実行します。

    $ dcli -t -g nodes -l root rpm -i --force 
              /home/oracle/ORD/ord-linux-x86_64-3.0.1/*.rpm
    

    --forceフラグによって、循環依存のエラーが発生しません。

  6. Rがインストールされている場所に戻ってからRを開始することによって、各ノードでRインストールを確認します。

    $ dcli -g nodes -l oracle R RHOME
    exadb01: /usr/lib64/R
    exadb02: /usr/lib64/R
    

    次のコマンドでは、各ノードに対して次の出力を返します。

    $ dcli -g nodes -l oracle R --vanilla
    exadb01: Oracle Distribution of R version 3.0.1 (--) -- "Good Sport"
    exadb01: Copyright (C) The R Foundation for Statistical Computing
    exadb01: Platform: x86_64-unknown-linux-gnu (64-bit)
    exadb01:
    exadb01: R is free software and comes with ABSOLUTELY NO WARRANTY.
    exadb01: You are welcome to redistribute it under certain conditions.
    exadb01: Type 'license()' or 'licence()' for distribution details.
    exadb01:
    exadb01: Natural language support but running in an English locale
    exadb01:
    exadb01: R is a collaborative project with many contributors.
    exadb01: Type 'contributors()' for more information and
    exadb01: 'citation()' on how to cite R or R packages in publications.
    exadb01:
    exadb01: Type 'demo()' for some demos, 'help()' for on-line help, or
    exadb01: 'help.start()' for an HTML browser interface to help.
    exadb01: Type 'q()' to quit R.
    exadb01:
    exadb01: You are using Oracle's distribution of R. Please contact
    exadb01: Oracle Support for any problems you encounter with this
    exadb01: distribution.
    

5.3.1 ExadataへのOracle R Distributionインストール用のDCLIコマンドのサマリー

例5-2に、Linux ExadataシステムへのOracle R Distribution 3.0.1のインストールで使用するDCLIコマンドをリストします。

例5-2 Oracle R Distribution用のDCLIコマンドのサマリー

ssh-keygen -N " -f ~/.ssh/id_dsa -t dsa
vi nodes # enter node names
dcli -t -g nodes -l root -k -s "\-o StrictHostkeyChecking=no" 
dcli -t -g nodes -l root mkdir -p /home/oracle/ORD
dcli -t -g nodes -l root -f ord-linux-x86_64-3.0.1.tar.gz -d
           /home/oracle/ORD/ord-linux-x86_64-3.0.1.tar.gz 
dcli -t -g nodes -l root tar xvfz /home/oracle/ORD/ord-linux-x86_64-3.0.1.tar.gz
          -C /home/oracle/ORD
dcli -t -g nodes -l root rpm -i --force 
          /home/oracle/ORD/ord-linux-x86_64-3.0.1/*.rpm
dcli -g nodes -l root R RHOME
dcli -g nodes -l root R --vanilla

5.4 Exadata計算ノードを介したOracle R Enterprise Serverのインストール

この項では、複数のExadataのLinux計算ノードにOracle R Enterprise ServerをインストールするためのDCLIの実行方法を説明します。各コマンドは第5.4.1項にまとめてあります。


重要:

インストールを開始する前に、第4章のOracle R Enterprise Serverのインストール手順を確認してください。

DCLIを使用してExadataにOracle R Enterprise Serverをインストールするには、次の手順を実行します。

  1. Oracle Technology NetworkのOracle R Enterpriseのホーム・ページに移動します。

    http://www.oracle.com/technetwork/database/options/advanced-analytics/r-enterprise/
    

    「Oracle R Enterprise Downloads」を選択します。「Downloads」ページで、「Oracle R Enterprise Server」および「Supporting Packages for Linux」を選択します。Oracle R Enterprise 1.4用の次のファイルがダウンロードされます。

    ore-server-linux-x86-64-1.4.zip
    ore-supporting-linux-x86-64-1.4.zip
    
  2. Oracle R Enterprise ServerおよびSupporting Packagesのインストーラを全ノードにコピーします。

    $ dcli -g nodes -l oracle mkdir -p /home/oracle/ORE
    $ dcli -g nodes -l oracle -f ore-server-linux-x86-64-1.4.zip -d /home/oracle/ORE/ore-server-linux-x86-64-1.4.zip
    $ dcli -g nodes -l oracle -f ore-supporting-linux-x86-64-1.4.zip -d /home/oracle/ORE/ore-supporting-linux-x86-64-1.4.zip
    
  3. 両方のインストーラを解凍します。

    $ dcli -t -g nodes -l oracle unzip
         /home/oracle/ORE/ore-server-linux-x86-64-1.4.zip -d /home/oracle/ORE
    $ dcli -t -g nodes -l oracle unzip
         /home/oracle/ORE/ore-supporting-linux-x86-64-1.4.zip -d /home/oracle/ORE
    
  4. Oracle R Enterprise Serverコンポーネントをインストールします。

    $ dcli -t -g nodes -l oracle /home/oracle/ORE/server/./install.sh
    
  5. Oracle R Enterpriseユーザーを作成します。

    $ dcli -t -g nodes -l oracle /home/oracle/ORE/server/./demo_user.sh
    
  6. demo_user.shスクリプトを実行してOracle R Enterpriseユーザーに権限を付与します。デフォルト・ユーザーはrquserです。データベースは共有されているため、権限は1つのノードにのみ付与する必要があります。

    $ cd /home/oracle/ORE 
    $ sqlplus / as sysdba
      grant RQADMIN to rquser;
      grant CREATE TABLE to rquser;
      grant CREATE SESSION to rquser;
      grant CREATE VIEW to rquser;
      grant CREATE PROCEDURE to rquser;
      grant CREATE MINING MODEL to rquser;
    
  7. Oracle R Enterprise Supporting Packagesをインストールします。

    $ dcli -t -g nodes -l oracle R CMD INSTALL 
       /home/oracle/ORE/supporting/DBI_0.2-7_R_x86_64-unknown-linux-gnu.tar.gz
    $ dcli -t -g nodes -l oracle R CMD INSTALL 
       /home/oracle/ORE/supporting/ROracle_1.1-11_R_x86_64-unknown-linux-gnu.tar.gz
    $ dcli -t -g nodes -l oracle R CMD INSTALL 
       /home/oracle/ORE/supporting/png_0.1-7_R_x86_64-unknown-linux-gnu.tar.gz
    $ dcli -t -g nodes -l oracle R CMD INSTALL 
       /home/oracle/ORE/supporting/cairo_1.5-5_R_x86_64-unknown-linux-gnu.tar.gz
    
  8. Oracle R Enterpriseのロードを確認します。

    > library(ORE)
    Loading required package: OREbase
    Attaching package: OREbase
    The following objects are masked from âpackage:baseâ:
        cbind, data.frame, eval, interaction, order, paste, pmax, pmin,
        rbind, table
    Loading required package: OREembed
    Loading required package: OREstats
    Loading required package: MASS
    Loading required package: OREgraphics
    Loading required package: OREeda
    Loading required package: OREmodels
    Loading required package: OREdm
    Loading required package: lattice
    Loading required package: OREpredict
    Loading required package: ORExml 
    

5.4.1 Oracle R Enterprise Server用のDCLIコマンドのサマリー

例5-3に、Linux ExadataシステムへのOracle R Enterprise Server 1.4およびSupporting Packagesのインストールで使用するDCLIコマンドをリストします。

例5-3 Oracle R Enterprise Server用のDCLIコマンドのサマリー

dcli -g nodes -l oracle mkdir -p /home/oracle/ORE
dcli -g nodes -l oracle -f ore-server-linux-x86-64-1.4.zip -d
    /home/oracle/ORE/ore-server-linux-x86-64-1.4.zip
dcli -g nodes -l oracle -f ore-supporting-linux-x86-64-1.4.zip -d
    /home/oracle/ORE/ore-supporting-linux-x86-64-1.4.zip
 
dcli -t -g nodes -l oracle unzip
    /home/oracle/ORE/ore-server-linux-x86-64-1.4.zip -d /home/oracle/ORE
dcli -t -g nodes -l oracle unzip
     /home/oracle/ORE/ore-supporting-linux-x86-64-1.4.zip -d /home/oracle/ORE
 
dcli -t -g nodes -l oracle /home/oracle/ORE/server/./install.sh
dcli -t -g nodes -l oracle /home/oracle/ORE/server/./demo_user.sh
 
cd /home/oracle/ORE 
sqlplus / as sysdba
  grant RQADMIN to rquser;
  grant CREATE TABLE to rquser;
  grant CREATE SESSION to rquser;
  grant CREATE VIEW to rquser;
  grant CREATE PROCEDURE to rquser;
  grant CREATE MINING MODEL to rquser;
 
$ dcli -t -g nodes -l oracle R CMD INSTALL 
   /home/oracle/ORE/supporting/DBI_0.2-7_R_x86_64-unknown-linux-gnu.tar.gz
$ dcli -t -g nodes -l oracle R CMD INSTALL 
   /home/oracle/ORE/supporting/ROracle_1.1-11_R_x86_64-unknown-linux-gnu.tar.gz
$ dcli -t -g nodes -l oracle R CMD INSTALL 
   /home/oracle/ORE/supporting/png_0.1-7_R_x86_64-unknown-linux-gnu.tar.gz
$ dcli -t -g nodes -l oracle R CMD INSTALL 
   /home/oracle/ORE/supporting/cairo_1.5-5_R_x86_64-unknown-linux-gnu.tar.gz

dcli -t -g nodes -l oracle ORE -e "library(ORE)"