配置系统和安装所需软件包
-
关闭selinux
临时关闭(不用重启)
[root@SVR-3-125 ~]# setenforce 0
修改配置文件(需要重启): 将SELINUX=enforcing改为SELINUX=disabled
[root@SVR-3-125 ~]# vi /etc/selinux/config
-
升级程序包(可选)
[root@SVR-3-125 ~]# yum update -y
-
修改hosts,添加一条主机记录
[root@SVR-3-125 ~]# vi /etc/hosts
-
安装oracle所需的软件包
yum install gcc gcc-c++ glibc glibc-devel glibc-headers ksh libaio libaio-devel libgcc libstdc++ libstdc++-devel make sysstat unixODBC unixODBC-devel zlib-devel unzip compat-libcap1 compat-libstdc++-33
-
添加oracle用户组
[root@SVR-3-125 ~]#groupadd oinstall
[root@SVR-3-125 ~]#groupadd dba
[root@SVR-3-125 ~]#groupadd oper
[root@SVR-3-125 ~]#useradd -g oinstall -G dba,oper oracle
-
修改系统参数/etc/sysctl.conf
[root@SVR-3-125 ~]# vim /etc/sysctl.conf
添加如下内容:
fs.file-max = 6815744 kernel.sem = 250 32000 100 128 kernel.shmmni = 4096 kernel.shmall = 1073741824 kernel.shmmax = 4398046511104 net.core.rmem_default = 262144 net.core.rmem_max = 4194304 net.core.wmem_default = 262144 net.core.wmem_max = 1048576 fs.aio-max-nr = 1048576 net.ipv4.ip_local_port_range = 9000 65500
使应用生效
[root@SVR-3-125 ~]#sysctl -p
-
修改/etc/security/limits.conf
[root@SVR-3-125 ~]# vim /etc/security/limits.conf
添加以下参数:
oracle soft nofile 1024 oracle hard nofile 65536 oracle soft nproc 2047 oracle hard nproc 16384 oracle soft stack 10240 oracle hard stack 32768
-
创建安装文件夹
[root@SVR-3-125 ~]# mkdir -p /usr/local/oracle/product/12.1.2/db_1 [root@SVR-3-125 ~]# chown oracle:oinstall /usr/local/oracle -R