/usr/sbin/groupadd oinstall
/usr/sbin/groupadd dba
/usr/sbin/useradd -m -g oinstall -G dba oracle
id oracle
# uid=501(oracle) gid=502(oinstall) groups=502(oinstall),503(dba)
passwd oracle # 設定密碼
mkdir -p /u01/app/oracle
chown -R oracle:oinstall /u01/app
chmod -R 775 /u01/app
ORACLE_BASE=/u01/app/oracle,後續安裝指向此處。
kernel.shmall = 2097152
kernel.shmmax = 536870912 # 11g 建議 4GB 以上,視實體記憶體調整
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.wmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_max = 262144
# 立即生效
/sbin/sysctl -p
# 驗證
/sbin/sysctl -a | grep -E 'shm|sem|file-max|ip_local_port_range|rmem|wmem'
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
session required /lib/security/pam_limits.so
if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
umask 022
fi
if ( $USER == "oracle" ) then
limit maxproc 16384
limit descriptors 65536
umask 022
endif
id oracle 顯示正確群組/u01/app/oracle 擁有者 oracle:oinstall、權限 775sysctl -p 無錯誤、關鍵參數生效su - oracle; ulimit -a 顯示 nproc/nofile 符合硬限制hostname 可解析、/etc/hosts 含 IP、FQDN、短名shmmax 建議設為實體記憶體 50%~80%,但至少 536870912 (512MB)。runInstaller。