LoginSignup
3
1

More than 1 year has passed since last update.

Oracle Database Global Data Services構築 その1

Posted at

環境

Oracle Global Data Services(以降GDS)環境を構築します。下記ドキュメントを参考にしました。

本番環境ではGDSが単一障害点とならないよう、GDSの各コンポーネントであるGlobal Service Manager(GSM)、GDSカタログデータベースを冗長化する必要がありますが、本記事のGDS環境は、動作確認を目的とした簡易環境であるため、1ノードにて構成しました。

# ソフトウェア
OS Oracle Linux 7.9
GSM Oracle GSM 19.3.0.0.0
GDSカタログデータベース Oracle Database 19c 19.3.0.0.0

Oracle Databaseソフトウェアのインストールと、データベースの作成は完了している状況です。

GSMインストール

製品マニュアルの「2.1 インストールのプランニング」に記載のRPMパッケージがインストール済みである事を確認します。

[root@gsm01 ~]# rpm -qa|grep make
make-3.82-24.el7.x86_64
[root@gsm01 ~]# rpm -qa|grep binutils
binutils-2.27-44.base.0.3.el7_9.1.x86_64
[root@gsm01 ~]# rpm -qa|grep gcc
gcc-4.8.5-44.0.3.el7.x86_64
gcc-c++-4.8.5-44.0.3.el7.x86_64
libgcc-4.8.5-44.0.3.el7.x86_64
[root@gsm01 ~]# rpm -qa|grep libaio
libaio-0.3.109-13.el7.x86_64
libaio-devel-0.3.109-13.el7.x86_64
[root@gsm01 ~]# rpm -qa|grep libaio-devel
libaio-devel-0.3.109-13.el7.x86_64
[root@gsm01 ~]# rpm -qa|grep libstdc++
libstdc++-4.8.5-44.0.3.el7.x86_64
compat-libstdc++-33-3.2.3-72.el7.x86_64
libstdc++-devel-4.8.5-44.0.3.el7.x86_64
[root@gsm01 ~]# rpm -qa|grep sysstat
sysstat-10.1.5-20.0.1.el7_9.x86_64
[root@gsm01 ~]# rpm -qa|grep compat-libstdc++-33
compat-libstdc++-33-3.2.3-72.el7.x86_64
[root@gsm01 ~]# rpm -qa|grep libgcc
libgcc-4.8.5-44.0.3.el7.x86_64
[root@gsm01 ~]# rpm -qa|grep libstdc++-devel
libstdc++-devel-4.8.5-44.0.3.el7.x86_64
[root@gsm01 ~]# rpm -qa|grep glibc-devel
glibc-devel-2.17-326.0.3.el7_9.x86_64
[root@gsm01 ~]# rpm -qa|grep gcc-c++
gcc-c++-4.8.5-44.0.3.el7.x86_64
[root@gsm01 ~]# rpm -qa|grep glibc
glibc-2.17-326.0.3.el7_9.x86_64
glibc-devel-2.17-326.0.3.el7_9.x86_64
glibc-headers-2.17-326.0.3.el7_9.x86_64
glibc-common-2.17-326.0.3.el7_9.x86_64
[root@gsm01 ~]# rpm -qa|grep ksh-
ksh-20120801-144.0.1.el7_9.x86_64

GSMのOS管理アカウントを作成します。本記事では、gsmという名前で作成しました。

[root@gsm01 ~]# useradd -g oinstall gsm
[root@gsm01 ~]# id gsm
uid=54323(gsm) gid=54321(oinstall) groups=54321(oinstall)

[root@gsm01 ~]# passwd gsm
ユーザー gsm のパスワードを変更。
新しいパスワード:
新しいパスワードを再入力してください:
passwd: すべての認証トークンが正しく更新できました。

Oracle Software Delivery Cloudにて配布している、Oracle Database Global Service Manager 19.3.0.0.0をダウンロードし、zipファイルを展開します。

[root@gsm01 ~]$ su - gsm
[gsm@gsm01 ~]$ cd /software/Oracle_Database_Global_Service_Manager/19.3.0.0.0_for_Linux_x86-64
[gsm@gsm01 19.3.0.0.0_for_Linux_x86-64]$ unzip V982067-01.zip

GSMをサイレントモードでインストールするため、レスポンスファイルを編集します。レスポンスファイルは、zipファイルを展開したディレクトリの gsm/response/gsm_install.rsp となります。下記変数に値を設定します。

環境変数 説明 設定例
ORACLE_HOME GSMインストールディレクトリ /u01/app/gsm/product/19.0.0.0/gsmhome_1
ORACLE_BASE GSMベースディレクトリ /u01/app/gsm
INVENTORY_LOCATION インベントリディレクトリ /u01/app/oraInventory
UNIX_GROUP_NAME インベントリディレクトリのグループ oinstall

ご参考までに筆者環境のレスポンスファイルを下記に示します。

[gsm@gsm01 19.3.0.0.0_for_Linux_x86-64]$ cat gsm/response/gsm_install.rsp

###############################################################################
## Copyright(c) Oracle Corporation 1998,2019. All rights reserved.           ##
##                                                                           ##
## Specify values for the variables listed below to customize                ##
## your installation.                                                        ##
##                                                                           ##
## Each variable is associated with a comment. The comment                   ##
## can help to populate the variables with the appropriate                   ##
## values.                                                                   ##
##                                                                           ##
###############################################################################

#-------------------------------------------------------------------------------
# Do not change the following system generated value.
#-------------------------------------------------------------------------------
oracle.install.responseFileVersion=/oracle/install/rspfmt_gsminstall_response_schema_v19.0.0

#-------------------------------------------------------------------------------
# Unix group to be set for the inventory directory.
#-------------------------------------------------------------------------------
UNIX_GROUP_NAME=oinstall
#-------------------------------------------------------------------------------
# Inventory location.
#-------------------------------------------------------------------------------
INVENTORY_LOCATION=/u01/app/oraInventory
#-------------------------------------------------------------------------------
# Complete path of the Oracle Home
#-------------------------------------------------------------------------------
ORACLE_HOME=/u01/app/gsm/product/19.0.0.0/gsmhome_1

#-------------------------------------------------------------------------------
# Complete path of the Oracle Base.
#-------------------------------------------------------------------------------
ORACLE_BASE=/u01/app/gsm

GSMインストールディレクトリを作成し、パーミッションを775に設定します。

[gsm@gsm01 19.3.0.0.0_for_Linux_x86-64]$ mkdir -p /u01/app/gsm/product/19.0.0.0/gsmhome_1
[gsm@gsm01 19.3.0.0.0_for_Linux_x86-64]$ chmod 775 -R /u01/app/gsm
[gsm@gsm01 19.3.0.0.0_for_Linux_x86-64]$ ls -ld /u01/app/gsm
drwxrwxr-x 3 gsm oinstall 21  5月  4 15:13 /u01/app/gsm
[gsm@gsm01 19.3.0.0.0_for_Linux_x86-64]$ ls -lR /u01/app/gsm
/u01/app/gsm:
合計 0
drwxrwxr-x 3 gsm oinstall 22  5月  4 15:13 product

/u01/app/gsm/product:
合計 0
drwxrwxr-x 3 gsm oinstall 23  5月  4 15:13 19.0.0.0

/u01/app/gsm/product/19.0.0.0:
合計 0
drwxrwxr-x 2 gsm oinstall 6  5月  4 15:13 gsmhome_1

/u01/app/gsm/product/19.0.0.0/gsmhome_1:
合計 0

前提条件チェックを実行し、エラーがないことを確認します。

[gsm@gsm01 gsm]$ ./runInstaller -silent -responseFile /software/Oracle_Database_Global_Service_Manager/19.3.0.0.0_for_Linux_x86-64/gsm/response/gsm_install.rsp -showProgress -executePrereqs
Oracle Universal Installerを起動中です...

一時領域の確認中: 551MBを超えている必要があります.   実際 70302MB    問題なし
Oracle Universal Installerの起動を準備中 /tmp/OraInstall2023-05-04_03-50-29PM. お待ちください...[gsm@gsm01 gsm]$ 前提条件チェックは正常に実行されました。

GSMをサイレントモードでインストールします。

[gsm@gsm01 gsm]$ ./runinstaller -silent -responseFile /software/Oracle_Database_Global_Service_Manager/19.3.0.0.0_for_Linux_x86-64/gsm/response/gsm_install.rsp -showProgress
Oracle Universal Installerを起動中です...

一時領域の確認中: 551MBを超えている必要があります.   実際 70301MB    問題なし
Oracle Universal Installerの起動を準備中 /tmp/OraInstall2023-05-04_03-52-50PM. お待ちください...[gsm@gsm01 gsm]$ このセッションのレスポンス・ファイルは次の場所にあります:
 /u01/app/gsm/product/19.0.0.0/gsmhome_1/install/response/gsm_2023-05-04_03-52-50PM.rsp

このインストール・セッションのログは次の場所にあります:
 /u01/app/oraInventory/logs/installActions2023-05-04_03-52-50PM.log

準備が進行中です。
..................................................   8% 完了しました。

準備が正常に終了しました。

ファイルのコピーが進行中です。
..................................................   13% 完了しました。
..................................................   19% 完了しました。
..................................................   27% 完了しました。
..................................................   33% 完了しました。
..................................................   38% 完了しました。
..................................................   43% 完了しました。
..................................................   48% 完了しました。
..................................................   53% 完了しました。
..................................................   58% 完了しました。
..................................................   64% 完了しました。
..................................................   69% 完了しました。
..................................................   74% 完了しました。
..................................................   79% 完了しました。

ファイルのコピーが正常に終了しました。

バイナリのリンクが進行中です。

バイナリのリンクが正常に終了しました。

ファイルの設定が進行中です。
........................................
ファイルの設定が正常に終了しました。

インベントリの設定が進行中です。

インベントリの設定が正常に終了しました。
..........
設定の終了が進行中です。
..................................................   84% 完了しました。

設定の終了が正常に終了しました。
Oracle Distributed Service and Load Managementのインストールが成功しました。
詳細は'/u01/app/oraInventory/logs/silentInstall2023-05-04_03-52-50PM.log'を確認してください。

Oracleベースの設定が進行中です。

Oracleベースの設定が正常に終了しました。
..................................................   95% 完了しました。

rootユーザーとして次のスクリプトを実行します:
        1. /u01/app/gsm/product/19.0.0.0/gsmhome_1/root.sh



Successfully Setup Software.
..................................................   100% 完了しました。

rootユーザでorainstRoot.shとroot.shを実行します。画面には、orainstRoot.shを実行する旨の出力はありませんが、製品マニュアルに記載があったため、筆者の環境では実行しています。

[root@gsm01 ~]# /u01/app/oraInventory/orainstRoot.sh
権限を変更中 /u01/app/oraInventory.
グループの読取り/書込み権限を追加中。
全ユーザーの読取り/書込み/実行権限を削除中。

グループ名の変更 /u01/app/oraInventory 宛先 oinstall.
スクリプトの実行が完了しました。
[root@gsm01 ~]# /u01/app/gsm/product/19.0.0.0/gsmhome_1/root.sh
Check /u01/app/gsm/product/19.0.0.0/gsmhome_1/install/root_gsm01.besite_2023-05-04_15-56-22-447592375.log for the output of root script

[root@gsm01 ~]# cat /u01/app/gsm/product/19.0.0.0/gsmhome_1/install/root_gsm01.besite_2023-05-04_15-56-22-447592375.log
Performing root user operation.

The following environment variables are set as:
    ORACLE_OWNER= gsm
    ORACLE_HOME=  /u01/app/gsm/product/19.0.0.0/gsmhome_1
   Copying dbhome to /usr/local/bin ...
   Copying oraenv to /usr/local/bin ...
   Copying coraenv to /usr/local/bin ...

Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.
[root@gsm01 ~]#

gsmアカウントの .bash_profile を編集して、ORACLE_BASE と ORACLE_HOMEの環境変数を設定します。また、PATHに$ORACLE_HOME/binを追加します。

[gsm@gsm01 ~]$ vi .bash_profile
[gsm@gsm01 ~]$ cat .bash_profile|grep export
export ORACLE_BASE=/u01/app/gsm
export ORACLE_HOME=${ORACLE_BASE}/product/19.0.0.0/gsmhome_1
export PATH=$PATH:${ORACLE_HOME}/bin
[gsm@gsm01 ~]$
[gsm@gsm01 ~]$ . ~/.bash_profile
[gsm@gsm01 ~]$ env|grep ORA
ORACLE_BASE=/u01/app/gsm
ORACLE_HOME=/u01/app/gsm/product/19.0.0.0/gsmhome_1

以上でGSMのインストールが完了となります。次回は、gdsctlコマンドラインツールを使用してGDSの設定を行っていきます。

3
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
1