oracle-database-server-12cR2-preinstall安装oracle12R2官方建议参数
入职新坑使用的都是oracle12C,决定好好的研究下,oracle数据库版本升级太快,现在官网已经到了oracle 19C,现在oracle12c也慢慢的被大家认可,一些新特性也很实用,今天把oracle-database-server-12cR2-preinstall安装oracle12c官方参数分享给大家。详细的安装过程我会发在另一篇文章中。
首先我们要知道oracle-database-server-12cR2-preinstall为我们做了什么
(1)自动安装oracle所需的RPM包
(2)自动创建oracle用户和dba、oinstall组
(3)自动配置/etc/sysctl.conf内核参数
(4)自动配置/etc/security/limits.conf参数
(5)关闭NUMA=OFF (关闭非一致内存访问)
(6)关闭NOZEROCONF=yes
(7)修改系统启动版本信息
稍后我会贴上oracle-database-server-12cR2-preinstall更改的日志
在centos 7.6 安装oracle-database-server-12cR2-preinstall过程如下:
1,配置合适的yum源,需要oracle 提供的yum源,同时我也配好了阿里的镜像源
wget -O /etc/yum.repos.d/oracle.repo http://public-yum.oracle.com/public-yum-ol7.repo
wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
yum clean all
yum makecache
2,安装oracle-database-server-12cR2-preinstall
yum -y install oracle-database-server-12cR2-preinstall
报错GPG key retrieval failed: [Errno 14] curl#37 - "Couldn't open file /etc/pki/rpm-gpg/RPM-GPG-KEY-oracle"
vim /etc/yum.repos.d/oracle.repo
把gpgcheck=1,改为gpgcheck=0
继续执行:yum -y install oracle-database-server-12cR2-preinstall
Transaction check error:
file /usr/lib/systemd/system-preset/90-default.preset from install of redhat-release-server-1:7.8-2.0.1.el7.x86_64 conflicts with file from package centos-release-7-6.1810.2.el7.centos.x86_64
file /etc/os-release from install of oraclelinux-release-7:7.8-1.0.7.el7.x86_64 conflicts with file from package centos-release-7-6.1810.2.el7.centos.x86_64
file /etc/redhat-release from install of oraclelinux-release-7:7.8-1.0.7.el7.x86_64 conflicts with file from package centos-release-7-6.1810.2.el7.centos.x86_64
file /etc/rpm/macros.dist from install of oraclelinux-release-7:7.8-1.0.7.el7.x86_64 conflicts with file from package centos-release-7-6.1810.2.el7.centos.x86_64
file /etc/system-release from install of oraclelinux-release-7:7.8-1.0.7.el7.x86_64 conflicts with file from package centos-release-7-6.1810.2.el7.centos.x86_64
file /etc/system-release-cpe from install of oraclelinux-release-7:7.8-1.0.7.el7.x86_64 conflicts with file from package centos-release-7-6.1810.2.el7.centos.x86_64
报错 oracle需要redhat版本信息,因为oracle官方要求使用redhat,我们删除centos版本信息
rpm -e --nodeps centos-release-7-6.1810.2.el7.centos.x86_64
rpm -ivh redhat-release-server-7.8-2.0.1.el7.x86_64.rpm
redhat-release-server-7.8-2.0.1.el7.x86_64.rpm下载地址百度网盘
链接: https://pan.baidu.com/s/1VxyIokp01HhcfJhStukzZw?pwd=sfhg 提取码: sfhg
版本信息由centos变成了redhat
[root@localhost ~]# cat /etc/redhat-release
CentOS Linux release 7.6.1810 (Core)
[root@localhost packages]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.8 (Maipo)
继续执行:yum -y install oracle-database-server-12cR2-preinstall
安装成功
执行日志
[root@localhost ~]# cd /var/log/oracle-database-server-12cR2-preinstall/results/
[root@localhost results]# ll
total 8
-rw-r--r--. 1 root root 5918 Jun 30 18:29 orakernel.log
[root@localhost results]# cat orakernel.log
Adding group oinstall with gid 54321
Adding group dba with gid 54322
Adding group oper with gid 54323
Adding group backupdba with gid 54324
Adding group dgdba with gid 54325
Adding group kmdba with gid 54326
Adding group racdba with gid 54330
Adding user oracle with user id 54321, initial login group oinstall, supplementary groups oinstall,dba,oper,backupdba,dgdba,kmdba,racdba and home directory /home/oracle
Changing ownership of /home/oracle to oracle:oinstall
Please set password for user - oracle
uid=54321(oracle) gid=54321(oinstall) groups=54321(oinstall),54322(dba),54323(oper),54324(backupdba),54325(dgdba),54326(kmdba),54330(racdba)
User creation passed
Saving a copy of the initial sysctl.conf
Verifying kernel parameters as per Oracle recommen