#topicpath
[[技術文書/Oracle/11g/CentOS5.2(64bit)にOracle11gR1をインストール]]
で作った環境に、11gR2 をインストールしていきます。
OS は yum upgrade で CentOS 5.3 になってます。
* 参考文献 [#va766039]
- [[Oracle® Database Client Quick Installation Guide 11g Release 2 (11.2) for Linux x86-64:http://download.oracle.com/docs/cd/E11882_01/install.112/e10861/toc.htm]]
* OUI の起動 [#vde11094]
例によって runInstaller で起動します。
これまでとはかなり見た目が変わりました。
#pre{{
oracle@ora1 ~]$ cd database/
[oracle@ora1 database]$ ls
doc install response rpm runInstaller sshsetup stage welcome.html
[oracle@ora1 database]$ ./runInstaller
Oracle Universal Installerを起動中です...
一時領域の確認中: 120MBを超えている必要があります. 実際 6044MB 問題なし
スワップ領域の確認中: 150MBを超えている必要があります. 実際 1983MB 問題なし
モニターの確認中: 少なくとも256色表示するよう設定されている必要があります. 実際 16777216 問題なし
Oracle Universal Installerの起動を準備中 /tmp/OraInstall2009-09-05_09-18-44PM. お待ちください...
}}
一直線に進んでいきます。
&ref(1.png,,70%);
&ref(2.png,,70%);
&ref(3.png,,70%);
&ref(4.png,,70%);
&ref(5.png,,70%);
&ref(6.png,,70%);
&ref(7.png,,70%);
&ref(8.png,,70%);
&ref(9.png,,70%);
&ref(10.png,,70%);
&ref(11.png,,70%);
前提条件チェックで引っ掛かりました。
* カーネルパラメータの変更 [#f6143850]
/etc/sysctl.conf を編集します。
11g R1 用に書いてあったところを変えます。
まずは 11g R1 のものをコメントアウト。
#pre{{
# for Oracle 11g
##kernel.shmmax = 2147483648
#kernel.shmmni = 4096
#kernel.sem = 250 32000 100 128
##fs.file-max = 65536
#net.ipv4.ip_local_port_range = 1024 65000
#net.core.rmem_default = 4194304
#net.core.rmem_max = 4194304
#net.core.wmem_default = 262144
#net.core.wmem_max = 262144
#fs.file-max = 6553600
}}
11g R2 用に変更。OUI に言われた値にします。
#pre{{
# for Oracle 11g R2
#kernel.shmmax = 2147483648
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65000
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 4194304
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
fs.file-max = 6815744
fs.aio-max-nr = 1048576
}}
有効にします。
#pre{{
[root@ora1 ~]# sysctl -p
net.ipv4.ip_forward = 0
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.default.accept_source_route = 0
kernel.sysrq = 0
kernel.core_uses_pid = 1
net.ipv4.tcp_syncookies = 1
kernel.msgmnb = 65536
kernel.msgmax = 65536
kernel.shmmax = 68719476736
kernel.shmall = 4294967296
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65000
net.core.rmem_default = 4194304
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
fs.file-max = 6815744
fs.aio-max-nr = 1048576
}}
OUI に戻って「再チェック」を押します。
* 不足パッケージ [#w03911ee]
&ref(12.png,,70%);
カーネルパラメータのエラーはなくなりました。
pdksh-5.2.14 がないと言われますが、CentOS 5.3 にはなくて
ksh-20080202-2.el5 になってしまっているので、
そのまま無視します。
メモリとスワップについてもここでは気にしないことにして、
「すべて無視」のチェックを付けて先に進みます。
&ref(13.png,,70%);
* OUI 継続 [#abf8a075]
&ref(14.png,,70%);
&ref(15.png,,70%);
&ref(16.png,,70%);
root.sh を実行します。
#pre{{
[root@ora1 ~]# /u01/app/oracle/product/11.2.0/dbhome_1/root.sh
Running Oracle 11g root.sh script...
The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /u01/app/oracle/product/11.2.0/dbhome_1
Enter the full pathname of the local bin directory: [/usr/local/bin]:
The file "dbhome" already exists in /usr/local/bin. Overwrite it? (y/n)
[n]: y
Copying dbhome to /usr/local/bin ...
The file "oraenv" already exists in /usr/local/bin. Overwrite it? (y/n)
[n]: y
Copying oraenv to /usr/local/bin ...
The file "coraenv" already exists in /usr/local/bin. Overwrite it? (y/n)
[n]: y
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.sh script.
Now product-specific root actions will be performed.
Finished product-specific root actions.
[root@ora1 ~]#
}}
&ref(17.png,,70%);
これでインストールは終了です。
* 環境変数の変更 [#cf82931f]
oracle ユーザが 11gR2 を使うように、~oracle/.bash_profile の環境変数を変えておきます。
#pre{{
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
# 11g R2
ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1
PATH=$PATH:$HOME/bin:$ORACLE_HOME/bin
LD_LIBRARY_PATH=$ORACLE_HOME/lib
NLS_LANG=Japanese_Japan.utf8
ORACLE_SID=orcl
# 11g
#ORACLE_HOME=/u01/app/oracle/product/11.1.0/db_1
#PATH=$PATH:$HOME/bin:$ORACLE_HOME/bin
#LD_LIBRARY_PATH=$ORACLE_HOME/lib
#NLS_LANG=Japanese_Japan.utf8
#ORACLE_SID=orcl
export ORACLE_HOME
export PATH
export LD_LIBRARY_PATH
export NLS_LANG
export ORACLE_SID
umask 022
}}
----
#comment