1.创建用户组及用户
[root@chun ~]# groupadd oinstall
[root@chun ~]# groupadd dba
[root@chun ~]# useradd oracle -g oinstall -G dba
[root@chun ~]# passwd oracle
2.创建目录
[root@chun ~]# mkdir /u01/app/oracle -p
[root@chun ~]# chown oracle.oinstall /u01 -R
3.配置环境变量
<pre name="code" class="html">切换到oracle用户
[root@chun ~]# su - oracle
[oracle@chun ~]$ vim .bash_profile
增加如下:
export PATH
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/db_1
export ORACLE_SID=orcl
export PATH=$ORACLE_HOME/bin:$PATH
刷新配置文件:
[oracle@chun ~]$ source .bash_profile
4.设置内核参数:
[oracle@chun ~]$ vim /etc/sysctl.conf
kernel.shmall = 268435456 kernel.shmmni = 4096 kernel.sem = 250 32000 100 128 fs.file-max = 6815744 net.ipv4.ip_local_port_range = 9000 65500 net.core.rmem_default = 1048576 net.core.rmem_max = 5048576 net.core.wmem_default = 262144 net.core.wmem_max = 1048576 fs.aio-max-nr = 2048576
5.解压oracle安装软件包,进入database
[oracle@chun database]$ ./runInstaller
6.进入安装画面了,如果检查不同过,看缺什么包直接安装即可,其中有个
Hard Limit: maximum open file descriptors....检查不通过。
[oracle@chun database]$ vim /etc/security/limits.conf 增加:
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
[oracle@chun database]$ vim /etc/pam.d/login 增加
session required /lib/security/pam_limits.so
[oracle@chun database]$ vim /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