# 创建用户和组
groupadd -g 1000 oinstall
groupadd -g 1001 dba
groupadd -g 1002 oper
useradd -u 1000 -g oinstall -G dba,oper oracle
# 设置内核参数
vi /etc/sysctl.conf
# 添加以下内容:
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 536870912
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048586
# 应用修改
sysctl -p
# 设置用户限制
vi /etc/security/limits.conf
# 添加以下内容:
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
oracle soft stack 10240
# 以grid用户登录
su - grid
# 运行安装程序
./runInstaller
# 选择"Install and Configure Grid Infrastructure for a Cluster"
# 按照向导完成安装
# 以oracle用户登录
su - oracle
# 运行安装程序
./runInstaller
# 选择"Install database software only"
# 选择"Oracle Real Application Clusters database installation"
# 选择所有要安装的节点
# 按照向导完成安装
# 使用DBCA创建数据库
dbca
# 选择"Oracle Real Application Clusters database"
# 配置数据库选项、存储位置等
# 完成数据库创建
# 检查集群资源状态
crsctl check cluster -all
# 检查节点状态
olsnodes -n
# 检查服务状态
srvctl status database -d <db_name>
节点无法加入集群
共享存储问题
安装失败
如需更详细的安装指导,建议参考Oracle官方文档《Oracle Real Application Clusters Installation Guide for your specific platform》。