#如果没有解压工具的执行下列命令安装一下,下列命令安装了wget,zip,unzip三个工具,根据需要选择
[root@localhost ~]# yum -y install wget zip unzip
#操作系统,系统只支持Red Hat Enterprise Linux 6,CentOS 6其实就是RHEL6,但Oracle不认,所以要改一下
[root@localhost ~]# vi /etc/redhat-release
CentOS release 6.7 (Final) #将这行注释掉换成:Red Hat Enterprise Linux 6
#关闭防火墙,centos7是systemctl stop firewalld,命令有些区别
[root@localhost ~]# chkconfig iptables off
#将SELINUX=enforcing改成SELINUX=disabled
[root@localhost ~]# vi /etc/sysconfig/selinux
[root@localhost ~]# 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
#如果设置过了可以跳过此步骤,数值也不一定要和我一样,可以参考官网,不要低于官网要求的最低值
[root@localhost ~]vi /etc/sysctl.conf
# Kernel sysctl configuration file for Red Hat Linux
#
# For binary values, 0 is disabled, 1 is enabled. See sysctl(8) and
# sysctl.conf(5) for more details.
# Controls IP packet forwarding
net.ipv4.ip_forward = 0
# Controls source route verification
net.ipv4.conf.default.rp_filter = 1
# Do not accept source routing
net.ipv4.conf.default.accept_source_route = 0
# Controls the System Request debugging functionality of the kernel
kernel.sysrq = 0
# Controls whether core dumps will append the PID to the core filename.
# Useful for debugging multi-threaded applications.
kernel.core_uses_pid = 1
# Controls the use of TCP syncookies
net.ipv4.tcp_syncookies = 1
kernel.shmall = 10523004
fs.file-max = 6815744
# Controls the default maxmimum size of a mesage queue
kernel.msgmnb = 65536
# Controls the maximum size of a message, in bytes
kernel.msgmax = 65536
# Controls the maximum shared segment size, in bytes
kernel.shmmax = 68719476736
# Controls the maximum number of shared memory segments, in pages
kernel.shmall = 4294967296
#追加一下内容
net.ipv4.ip_local_port_range= 9000 65500
fs.file-max = 6815744
kernel.shmmni = 4096
kernel.sem = 250 32000 100128
net.core.rmem_default=262144
net.core.wmem_default=262144
net.core.rmem_max=4194304
net.core.wmem_max=1048576
fs.aio-max-nr = 1048576
#使之生效
[root@localhost ~]# sysctl -p
#安装依赖包
[root@localhost ~]# yum -y install \
> binutils \
> compat-libcap1 \
> compat-libstdc++-33 \
> compat-libstdc++-33*.i686 \
> elfutils-libelf-devel \
> gcc \
> gcc-c++ \
> glibc*.i686 \
> glibc \
> glibc-devel \
> glibc-devel*.i686 \
> ksh \
> libgcc*.i686 \
> libgcc \
> libstdc++ \
> libstdc++*.i686 \
> libstdc++-devel \
> libstdc++-devel*.i686 \
> libaio \
> libaio*.i686 \
> libaio-devel \
> libaio-devel*.i686 \
> make \
> sysstat \
> unixODBC \
> unixODBC*.i686 \
> unixODBC-devel \
> unixODBC-devel*.i686 \
> libXp
下列是官网liunx6.x的依赖包要求
binutils-2.20.51.0.2-5.11.el6 (x86_64)
compat-libcap1-1.10-1 (x86_64)
compat-libstdc++-33-3.2.3-69.el6 (x86_64)
compat-libstdc++-33-3.2.3-69.el6.i686
gcc-4.4.4-13.el6 (x86_64)
gcc-c++-4.4.4-13.el6 (x86_64)
glibc-2.12-1.7.el6 (i686)
glibc-2.12-1.7.el6 (x86_64)
glibc-devel-2.12-1.7.el6 (x86_64)
glibc-devel-2.12-1.7.el6.i686
ksh
libgcc-4.4.4-13.el6 (i686)
libgcc-4.4.4-13.el6 (x86_64)
libstdc++-4.4.4-13.el6 (x86_64)
libstdc++-4.4.4-13.el6.i686
libstdc++-devel-4.4.4-13.el6 (x86_64)
libstdc++-devel-4.4.4-13.el6.i686
libaio-0.3.107-10.el6 (x86_64)
libaio-0.3.107-10.el6.i686
libaio-devel-0.3.107-10.el6 (x86_64)
libaio-devel-0.3.107-10.el6.i686
make-3.81-19.el6
sysstat-9.0.4-11.el6 (x86_64)
如果安装依赖包的过程有哪些依赖包出错,可以去网上下载然后手动安装,安装完成后参照上述官方要求依赖包列表用命令检查是否缺失,有耐心的可以好好检查一下,如果不怕错的,可以不检查,嘿嘿,版本号大于等于官方要求的版本即可,无需一致。
rpm包检查
rpm -qa|grep xxx
例子:rpm -qa|grep binutils,rpm -qa|grep compat-libstdc++。不要带版本号,因为你安装的依赖包不一定和官方要求的一样
rpm包安装
rpm -ivh xxx.rpm
rpm包卸载
rpm -e --nodeps xxx.rpm
[root@localhost ~]# groupadd oinstall
[root@localhost ~]# groupadd dba
[root@localhost ~]# groupadd oper
[root@localhost ~]# useradd -g oinstall -G dba,oper oracle
剩下的步骤和我的另外一篇centos7静默安装oracle博客操作步骤一致,可以转至centos7静默安装oracle11gR2 文章的第三小节“开始安装”开始按照步骤操作安装,这篇不再叙述。