Linux下安装ORACLE 10g前的系统设置脚本


在Linux下安装Oracle 10g前的系统设置脚本为最初的雏形,没有什么逻辑关系,小心使用。

 #!/bin/bash
cat >> /etc/sysctl.conf << "EOF"
#use for oracle
kernel.shmall = 2097152
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=262144
net.core.rmem_max=262144
net.core.wmem_default=262144
net.core.wmem_max=262144
EOF
/sbin/sysctl -p
cat >> /etc/security/limits.conf << "EOF"
#use for oracle
* soft nproc 2047
* hard nproc 16384
* soft nofile 1024
* hard nofile 65536
EOF
echo "session    required     pam_limits.so" >>/etc/pam.d/login
cat >> /etc/profile << "EOF"
if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi

export ORACLE_BASE=/u01/app/oracle
export ORACLE_SID=orcl
EOF
mkdir -p /u01/app/oracle
chown -R oracle:oinstall /u01/app/oracle
/usr/sbin/groupadd oinstall
/usr/sbin/groupadd dba
/usr/sbin/useradd -m -g oinstall -G dba oracle
passwd oracle

相关内容