VirtualBox2.2(Mac) のOracle Enterpriseに11gをいれてみる(2)

豚インフル レベル4。。トンフルとかって、呼ぶ人もいるみたいですね。
情報がよくわかりませんが、結局、普通のインフルエンザと同様の対策をするしかないんじゃないでしょうか。。

では、続きを。。

カーネル・パラメータが、推奨値より小さいか確認します。

          • -

[root@localhost ~]# /sbin/sysctl -a | grep shm
vm.hugetlb_shm_group = 0
kernel.shmmni = 4096
kernel.shmall = 268435456
kernel.shmmax = 4294967295
[root@localhost ~]# /sbin/sysctl -a | grep sem
kernel.sem = 250 32000 32 128
[root@localhost ~]# /sbin/sysctl -a | grep file-max
fs.file-max = 131070
[root@localhost ~]# /sbin/sysctl -a | grep ip_local_port_range
net.ipv4.ip_local_port_range = 32768 61000
[root@localhost ~]# /sbin/sysctl -a | grep rmem_default
net.core.rmem_default = 109568
[root@localhost ~]# /sbin/sysctl -a | grep rmem_max
net.core.rmem_max = 131071
[root@localhost ~]# /sbin/sysctl -a | grep wmem_default
net.core.wmem_default = 109568
[root@localhost ~]# /sbin/sysctl -a | grep wmem_max
net.core.wmem_max = 131071
[root@localhost ~]# /sbin/sysctl -a | grep tcp_wmem
net.ipv4.tcp_wmem = 4096 16384 4194304
[root@localhost ~]# /sbin/sysctl -a | grep tcp_rmem
net.ipv4.tcp_rmem = 4096 87380 4194304

          • -

小さいものだけ再設定とあるので、再設定します。

以下、設定値

ーー
kernel.shmall = 268435456
kernel.shmmax = 4294967295
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 131070
net.ipv4.ip_local_port_range = 32768 65000
net.core.rmem_default = 4194304
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 262144
net.ipv4.tcp_wmem = 262144 262144 4194304
net.ipv4.tcp_rmem = 4194304 4194304 4194304
ーー

確認&設定をカーネルに反映。

            • -

[root@localhost ~]# /sbin/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.shmall = 268435456
kernel.shmmax = 4294967295
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 131070
net.ipv4.ip_local_port_range = 32768 65000
net.core.rmem_default = 4194304
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 262144
net.ipv4.tcp_wmem = 262144 262144 4194304
net.ipv4.tcp_rmem = 4194304 4194304 4194304

            • -

こんどは、Oracleユーザの制限を改修する。

/etc/security/limits.conf に、以下の値を設定。

oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536

/etc/pam.d/loginに、以下の行がなければ、追加する。

session required pam_limits.so

調べたら、亡かったので、追加した。

              • -

[root@localhost ~]# cat /etc/pam.d/login | grep pam_limits.so
[root@localhost ~]# vi /etc/pam.d/login
[root@localhost ~]# cat /etc/pam.d/login | grep pam_limits.so
session required pam_limits.so

              • -

bashなので、/etc/profileに、以下を追加。

if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi

ついでに、cshも、設定。

              • -

[root@localhost ~]# cat /etc/csh.login
# /etc/csh.login

# System wide environment and startup programs, for login setup

#Oracle Need
if ( $USER == "oracle" ) then
limit maxproc 16384
limit descriptors 65536
endif

              • -

インストール先を、作成します。

              • -

[root@localhost ~]# mkdir -p /u01/app/
[root@localhost ~]# chown -R oracle:oinstall /u01/app/
[root@localhost ~]# chmod -R 775 /u01/app/

              • -

とりあえず、ここまでで、インストール前の準備は、終わりなはず。。