az @Wiki

OracleRAC

最終更新:

az

- view
だれでも歓迎! 編集

仮想ネットワークの設定

  • 不要サービスを停止する
[コントロールパネル]>[管理ツール]>[サービス]>[VMware DHCP Server]>[プロパティ] >
スタートアップの種類:手動
  • OS上からのNAT Switch(VMnet8)の設定
[コントロールパネル]>[ネットワーク接続]>[VMware Network Adapter VMnet8]>[プロパティ]>[TCP/IP]>[プロパティ]
IPアドレス: 192.168.1.253
サブネットマスク: 255.255.255.0
デフォルトゲートウェイ: 192.168.1.254
  • VMware上からのNAT Switch(VMnet8 *Publicネットワーク)の設定
[VMware]>[Edit]>[Virtual Network Settings...]>[ホスト仮想ネットワークの割当て]>[VMnet8]>[>]>[サブネット]
IPアドレス: 192.168.1.0
サブネットマスク: 255.255.255.0
  • VMnet7 (PrivateネットワークSwitch)の設定
[VMware]>[Edit]>[Virtual Network Settings...]>[ホスト仮想ネットワークの割当て]>[VMnet7]>[>]>[サブネット]
IPアドレス: 192.168.10.0
サブネットマスク: 255.255.255.0
  • DHCPサーバの停止と設定の確認
[VMware]>[Edit] > [Virtual Network Settings...] > [DHCP] > [VMnetX] > [削除]
[VMware]>[Edit] > [Virtual Network Settings...] > [DHCP] > [DHCPサービス]>[停止]

仮想マシンの作成

  • VMwareを起動する 。
  • New Virtual Machine を選択し、以下の設定で仮想マシンを作成する。
Virtual machine configuration: Custom
Virtual machine format: New - Workstation 5
Guest operationg system: Linux
Version: Red Hat Enterprise Linux 3
Virtual machine name: oracle1
location: C:\vmware\oracle1\
Number of processors: One
Memoery: 320MB
Network connecion: Use network address translation(NAT)
SCSI Adapters: BusLogic
Disk: Create a new virtual disk
Virtual Disk Type: SCSI
Disk size: 8.0
Allocate all disk space now: Yes
Split disk into 2GB files: No

OSインストール

  • VMware を起動する。
  • [oracle1]タブ>[Devices]>[CD-ROM1(IDE 1.0)]>[Use ISO image]でisoファイルを選択する。
  • [Commands]>[Start this virtual machine]
  • 下記以外はデフォルト設定でインストールする。
Language: Japanese
キーボード: 日本語
パーティション: 自動パーティション設定
IP Address: 192.168.1.1
NetMask: 255.255.255.0
ホスト名: oracle01.jp.oracle.com
ゲートウェイ: 192.168.1.254
1番目のDNS: 192.168.0.1
rootパスワード: password
インストールするパッケージを選択: すべて
色の深さ: True Color(24Bit)
画面の解像度: 800*600
ログインの種類: テキスト
  • 2枚目のCDを求められたら、[VM]>[Removable Devices]>[CD-ROM1(IDE 1.0)]>[Edit]>[Use ISO image]>[Browse]で交換する。

VMware Tools のインストール

  • [VM]>[Install VMware Tools...]を選択し、以下のコマンドを実行する。
# kon
# mount /mnt/cdrom
# cd /tmp
# tar zxf /mnt/cdrom/vmware-linux-tools.tar.gz
# umount /mnt/cdrom
# cd /tmp/vmware-tools-distrib ← ここに移動してからインストールしないと失敗する。
# ./vmware-install.pl

共有フォルダを作成する

  • [VM]>[Settings...]>[Options]>[Shared Folders]>[Add]で以下の通り設定する。
Name:Share
Host folder:C:\vmware\share
  • フォルダを共有できていることを確認する
# ls /mnt/hgfs
Share

仮想マシンのコピーインストール

  • 「D:\vmware\oracle1」以下の全ファイルを「D:\vmware\oracle2」以下にコピーする。
  • 「D:\vmware\oracle2\Red Hat Enterprise Linux 3.vmx」を以下の通り変更する。
displayName = “oracle02”

oracle1のEth1の設定

  • [oracle1]タブ>[Commands]>[Edit virual machine setings]>[Hardware]>[Add]>[Ethernet Adapter]>[Next]>[Custom]>[VMnet7]
  • [oracle1]タブ>[Commands]>[Start this virtual machine]
  • 「Press any key to continue」と表示されたら、任意のキーを押す。
  • [Eth1]を以下の通り設定する。
IP Address: 192.168.10.1
Netmask: 255.255.255.0
Defaul gateway: 設定しない
Primary Nameserver: 設定しない

oracle2のNICの取り外し

  • [File]>[Open]で「C:\vmware\oracle2\Red Hat Enterprise Linux 3.vmx」を選択する。
  • [oracle2]タブ>[Commands]>[Edit virual machine setings]>[Hardware]>[Ethernet]を選択し、[Remove]を押下する。
  • [oracle2]タブ>[Commands]>[Start this virtual machine]
What do you want to do?: create
「Press any key to continue」と表示されたら、任意のキーを押す。
[Remove Configuration]を選択する。
  • root でログインしてシャットダウンする。
# shutdown -h now

oracle2のNICの取付け

  • [oracle2]タブ>[Commands]>[Edit virual machine setings]>[Hardware]>[Add]>[Ethernet Adapter]>[Next]>[NAT]>[完了]
  • [oracle2]タブ>[Commands]>[Edit virual machine setings]>[Hardware]>[Add]>[Ethernet Adapter]>[Next]>[Custom]>[VMnet7]
  • [oracle2]タブ>[Commands]>[Start this virtual machine]
  • 「Press any key to continue」と表示されたら、任意のキーを押す。
  • [Configure]を選択する。
  • [Eth0]を以下の通り設定する。
IP Address: 192.168.1.2
Netmask: 255.255.255.0
Defaul gateway: 192.168.1.254
Primary Nameserver: 192.168.0.1
  • [Eth1]を以下の通り設定する。
IP Address: 192.168.10.2
Netmask: 255.255.255.0
Defaul gateway: 設定しない
Primary Nameserver: 設定しない
  • ホスト名を変更する
# vi /etc/sysconfig/network
HOSTNAME=oracle02.jp.oracle.com

リモートシェル設定

  • sshクライアント設定
# mv /etc/ssh/ssh_config /etc/ssh/ssh_config.bkp
# vi /etc/ssh/ssh_config
RSAAuthentication no
PubkeyAuthentication no
HostbasedAuthentication yes
PasswordAuthentication no
preferredAuthentications hostbased,publickey,password
EnableSSHKeysign yes
  • sshサーバ設定
# mv /etc/ssh/sshd_config /etc/ssh/sshd_config.bkp
# vi /etc/ssh/sshd_config
PermitRootLogin yes 
RSAAuthentication no 
PubkeyAuthentication no 
IgnoreRhosts no 
HostbasedAuthentication yes 
PasswordAuthentication no 
ChallengeResponseAuthentication no
  • sshサーバを再起動する
# /etc/init.d/sshd restart
  • /root/.shostsの設定
# vi /root/.shosts
(oracle01では以下の通り記述する)
oracle02.jp.oracle.com
(oracle02では以下の通り記述する)
oracle01.jp.oracle.com
  • 接続確認
(oracle01)
# ssh oracle02.jp.oracle.com
(oracle02)
# ssh oracle01.jp.oracle.com

リモートXの設定

  • Xサーバ側の設定
#vi /etc/X0.hosts
oracle01.jp.oracle.com
oracle02.jp.oracle.com
  • Xクライアント側の設定
# vi /root/.bash_profile
(oracle01では以下の通り記載する)
export DISPLAY=oracle02.jp.oracle.com:0.0
(oracle02では以下の通り記載する)
export DISPLAY=oracle01.jp.oracle.com:0.0
# . /root/.bash_profile
  • 動作確認
# startx (oracle01で実行)
# xclock (oracle02で実行) → oracle01 に時計が表示されればOK。
# startx (oracle02で実行)
# xclock (oracle01で実行) → oracle02 に時計が表示されればOK。

OSのカーネルパラメータチューニング

#vi /etc/sysctl.conf
net.core.rmem_default = 262144 
net.core.wmem_default = 262144 
net.core.rmem_max = 262144 
net.core.wmem_max = 262144
#/sbin/sysctl ‒p

ユーザ設定

# groupadd -g 500 oinstall
# groupadd -g 501 dba
# useradd ‒u 500 ‒g oinstall ‒G dba ‒d /home/oracle oracle
# passwd oracle

環境変数設定

#vi /home/oracle/rac.env
export LANG=ja_JP 
export NLS_LANG=Japanese_Japan.JA16EUC 
export ORACLE_BASE=/home/oracle 
export ORA_CRS_HOME=$ORACLE_BASE/product/10.1.0/crs
# vi /home/oracle/.bash_profile
(oracle01では以下の通り記述する)
export DISPLAY=oracle02.jp.oracle.com:0.0
(oracle02では以下の通り記述する)
export DISPLAY=oracle01.jp.oracle.com:0.0 
. ./rac.env 

タグ:

+ タグ編集
  • タグ:

このサイトはreCAPTCHAによって保護されており、Googleの プライバシーポリシー利用規約 が適用されます。

人気記事ランキング
目安箱バナー