红帽子6.8安装oracle,红帽安装oracle 10g系统环境配置脚本
时间: 2023-12-21 14:03:17 浏览: 31
以下是在 Red Hat Enterprise Linux 6.8 上安装 Oracle 10g 的系统环境配置脚本:
```bash
#!/bin/bash
# 安装必要的软件包
yum -y install binutils compat-libstdc++-33 elfutils-libelf elfutils-libelf-devel gcc gcc-c++ glibc glibc-common glibc-devel glibc-headers libaio libaio-devel libgcc libstdc++ libstdc++-devel make sysstat unixODBC unixODBC-devel
# 创建安装用户和组
groupadd oinstall
groupadd dba
useradd -g oinstall -G dba oracle
# 设置密码
echo "oracle:password" | chpasswd
# 修改内核参数
cat >> /etc/sysctl.conf << EOF
# Oracle 10g 需要的参数
kernel.sem = 250 32000 100 128
kernel.shmmax = 2147483648
kernel.shmmni = 4096
kernel.shmall = 2097152
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048586
EOF
sysctl -p
# 修改系统限制
cat >> /etc/security/limits.conf << EOF
# Oracle 10g 需要的限制
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
EOF
# 修改登录 shell 限制
cat >> /etc/profile << EOF
# Oracle 10g 需要的限制
if [ \$USER = "oracle" ]; then
if [ \$SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi
EOF
```
请注意,此脚本只是系统环境配置脚本,并不包括 Oracle 10g 的安装步骤。在执行此脚本之前,请确保已经按照 Oracle 10g 的安装指南进行了相应的安装准备工作。