1.配置系统内核参数
vi /etc/sysctl.conf
fs.aio-max-nr = 1048576
fs.file-max = 6815744
#kernel.shmall = 33554432
#kernel.shmmax = 68719476736
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
vm.min_free_kbytes = 524288
vm.swappiness = 100
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 = 1048576
执行下面命令让内核参数立即生效
sysctl -p
2. SHELL 资源限制 /etc/security/limits.conf
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
oracle soft stack 10240
3.配置/etc/security/limits.conf,增加以下内容
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
oracle hard stack 10240
4.创建oracle相关群组及用
groupadd -g 601 oinstall
groupadd -g 602 dba
useradd -g oinstall -G dba oracle
echo oracle | passwd oracle --stdin
5.创建安装目录并赋予oracle相应权限
mkdir -p /u01/app/oracle/product/11.2.0/db_1
mkdir -p /u01/app/oracle/oradata
chown -R oracle:oinstall /u01
chmod -R 775 /u01
6.配置oracle环境变量
su - oracle
vi ~/.bash_profile
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1
export ORACLE_SID=orcl
export PATH=$ORACLE_HOME/bin:/usr/sbin:$PATH
export NLS_LANG="AMERICAN_AMERICA.AL32UTF8"
if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi
umask 022
执行source .bash_profile使环境变量生效
cd /home/oracle/database
./runInstaller
二、卸载
方法:手工删除文件办法
删除 /etc/ora*
删除/usr/local/bin/oraenv
删除/usr/local/bin/dbhome
删除/usr/local/bin/coraenv
删除$ORACLE_BASE/*