一、 准备工作
1.建立用户及组
groupadd oinstall
groupadd dba
groupadd oper
useradd -g oinstall -G dba,oper oracle
passwd oracle
2.创建目录
mkdir -p /software/app/oracle
mkdir -p /software/app/oraInventory
chown -R oracle:oinstall /software/app/
chmod -R 755 /software/app/
3.配置内核参数(操作系统内存16G)
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
4.设置登录限制
cat >> /etc/pam.d/login <<EOF
session required pam_limits.so
EOF
5.设置profile
vi /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
Source /etc/profile
6.用户资源进行限制
vi /etc/sysctl.conf
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 8388688
kernel.shmmax = 34359738367
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
/sbin/sysctl -p
7.检查CentOS依赖包
rpm -q binutils compat-libstdc+±33 elfutils-libelf elfutils-libelf-devel gcc gcc-c++ glibc glibc-common glibc-devel glibc-headers kernel-headers libaio libaio-devel libgcc libgomp libstdc++ libstdc+±devel make numactl-devel sysstat unixODBC unixODBC-de