Oracle® R Enterpriseインストレーションおよび管理ガイド リリース1.4.1 for Windows, Linux, Solaris, and AIX E57721-01 |
|
前 |
次 |
この章では、Oracle Exadataデータベース・マシンへのOracle R DistributionおよびOracle R Enterprise Serverのインストール方法を説明します。この章の内容は、次のとおりです。
ExadataはOracle R Enterpriseに最も適したプラットフォームです。Oracle R EnterpriseのR計算の並列リソースは、Exadataの大規模なパラレル・グリッド・インフラストラクチャを活用します。
Oracle R EnterpriseをExadataにインストールするには、次の手順を実行します。
各ノードで、次の手順を実行します。
第3章の説明に従って、Oracle R Distributionをインストールします。
第4.3項、「Oracle R Enterprise Serverの要件」の説明に従って、環境を確認および構成します。
第4.4項の説明に従って、Oracle R Enterprise ServerおよびSupporting Packagesをインストールします。
最初のノードでのみ、第7.4項の説明に従ってユーザーを作成します。
次の各項で説明する分散コマンドライン・インタフェース(DCLI)を使用することで、ExadataへのOracle R Enterpriseのインストール・プロセスを簡略化できます。
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 と入力します。
|
この項では、複数のExadataのLinux計算ノードにOracle R DistributionをインストールするためのDCLIの実行方法を説明します。各コマンドは第5.3.1項にまとめれています。
DCLIを使用してExadataにOracle R Distributionをインストールするには、次の手順を実行します。
各計算ノードでDCLIに対する自動認証を有効化するようにExadata環境を構成します。
rootユーザーのSSH公開鍵-秘密鍵を生成します。任意のノードで次のコマンドをrootで実行します。
$ ssh-keygen -N '' -f /.ssh/id_dsa -t dsa
このコマンドによって、rootユーザーのホーム・ディレクトリの.ssh
サブディレクトリに公開鍵および秘密鍵のファイルが生成されます。
テキスト・エディタで、ラック内のすべての計算ノードの名前を含むファイルを作成します。1行に1つのノード名を指定します。たとえば、2ノード・クラスタのnodes
ファイルには、次のようなエントリが含まれます。
$ cat nodes exadb01 exadb02
全ノードでSSH信頼を確立するために、-k
オプションを使用してDCLIコマンドを実行します。-k
オプションによって、DCLIが各ノードに順に(並行にではなく)接触し、各ノードのパスワードの入力が求められます。
$ dcli -t -g nodes -l root -k -s "\-o StrictHostkeyChecking=no"
-k
を使用したDCLIは、SSH信頼およびユーザー等価関係を確立します。この後のDCLIコマンドではパスワードの入力は求められません。
任意の計算ノードにrootでログインします。Oracle R Distributionのオープン・ソース・ソフトウェアのダウンロード・ページに移動します。
ファイルord-linux-x86_64-3.0.1.tar.gz
をダウンロードします。
ディレクトリを作成し、このディレクトリにダウンロードしたファイルをすべてのノードにレプリケートします。たとえば、次のコマンドは、ディレクトリ/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
このファイルを圧縮解除および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
また、次の場所にあるOracle Public YumサーバーからこれらのRPMをダウンロードすることもできます。
http://public-yum.oracle.com/
.
R開発RPMで必要な一部の依存性は、標準のExadataアップグレードで競合を引き起こす可能性があります。この競合を回避するには、次のRPMをリストから削除します。
gcc-gfortran mesa-libGl-devel libpng-devel R-devel-3.0.1.el5.x86_64.rpm
新しいRPMをインストールし、全ノードの既存のRPMを更新するには、次のRPMコマンドを実行します。
$ dcli -t -g nodes -l root rpm -i --force /home/oracle/ORD/ord-linux-x86_64-3.0.1/*.rpm
--force
フラグによって、循環依存のエラーが発生しません。
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-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
この項では、複数のExadataのLinux計算ノードにOracle R Enterprise ServerをインストールするためのDCLIの実行方法を説明します。各コマンドは第5.4.1項にまとめてあります。
DCLIを使用してExadataにOracle R Enterprise Serverをインストールするには、次の手順を実行します。
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.1用の次のファイルがダウンロードされます。
ore-server-linux-x86-64-1.4.1.zip ore-supporting-linux-x86-64-1.4.1.zip
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.1.zip -d /home/oracle/ORE/ore-server-linux-x86-64-1.4.1.zip $ dcli -g nodes -l oracle -f ore-supporting-linux-x86-64-1.4.1.zip -d /home/oracle/ORE/ore-supporting-linux-x86-64-1.4.1.zip
Oracle R Enterprise Serverコンポーネントをインストールします。
$ dcli -t -g nodes -l oracle /home/oracle/ORE/server.sh
注意: server スクリプトによって、Oracle R Enterpriseのユーザーが作成されます。デフォルトでは、ユーザーにrqadmin ロールは付与されません。
すべてのOracle R Enterpriseユーザーは埋込みRを実行できますが、データベースのRスクリプトを作成および削除できるのは 第7.4.1項「RQADMINロールについて」を参照してください。 |
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-3に、Linux ExadataシステムへのOracle R Enterprise Server 1.4.1および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.1.zip -d /home/oracle/ORE/ore-server-linux-x86-64-1.4.1.zip dcli -g nodes -l oracle -f ore-supporting-linux-x86-64-1.4.1.zip -d /home/oracle/ORE/ore-supporting-linux-x86-64-1.4.1.zip dcli -t -g nodes -l oracle /home/oracle/ORE/server/./server.sh ./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; exit; dcli -t -g nodes -l oracle ORE -e "library(ORE)"