在linux/unix上安装Oracle数据库软件的过程是个痛苦的过程,包括:依赖的rpm包,内核参数,创建用户等等这些个步骤,一不留神,就会漏下某个步骤。对于Oracle Linux,只需要安装oracle-rdbms-server-11gR2-preinstall RPM包即可全部搞定所有的准备工作,但这个包在centos上没有提供,这里描述如何在Centos上安装这个包。
安装Oracle的repository
-rw-r--r--. 1 root root 5701 11月 23 2018 CentOS-Vault.repo [root@db_taibao yum.repos.d]# wget get http://public-yum.oracle.com/public-yum-ol7.repo --2020-06-11 20:52:10-- http://get/ Resolving get (get)... failed: Name or service not known. wget: unable to resolve host address ‘get’ --2020-06-11 20:52:10-- http://public-yum.oracle.com/public-yum-ol7.repo Resolving public-yum.oracle.com (public-yum.oracle.com)... 104.84.227.131 Connecting to public-yum.oracle.com (public-yum.oracle.com)|104.84.227.131|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 16402 (16K) [text/plain] Saving to: ‘public-yum-ol7.repo’ 100%[==================================================================================================================================================================>] 16,402 13.3KB/s in 1.2s 2020-06-11 20:52:12 (13.3 KB/s) - ‘public-yum-ol7.repo’ saved [16402/16402] FINISHED --2020-06-11 20:52:12-- Total wall clock time: 2.2s Downloaded: 1 files, 16K in 1.2s (13.3 KB/s)
在6的版本上下载用 http://public-yum.oracle.com/public-yum-ol6.repo
下载oracle的key
wget http://public-yum.oracle.com/RPM-GPG-KEY-oracle-ol7 -O /etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
所需安装版本项下字段enabled=0更改为enabled=1,并且把需要密钥的GPGKEY改成0。
安装oracle-rdbms-server-11gR2-preinstall
# yum install oracle-rdbms-server-11gR2-preinstall ...... Dependencies Resolved ============================================================================================================================================================================================================ Package Arch Version Repository Size ============================================================================================================================================================================================================ Installing: oracle-rdbms-server-11gR2-preinstall x86_64 1.0-6.el7 ol7_latest 22 k Installing for dependencies: compat-libcap1 x86_64 1.10-7.el7 base 19 k compat-libstdc++-33 x86_64 3.2.3-72.el7 base 191 k cpp x86_64 4.8.5-39.0.3.el7 ol7_latest 6.0 M gcc x86_64 4.8.5-39.0.3.el7 ol7_latest 16 M gcc-c++ x86_64 4.8.5-39.0.3.el7 ol7_latest 7.2 M glibc-devel x86_64 2.17-307.0.1.el7.1 ol7_latest 1.1 M glibc-headers x86_64 2.17-307.0.1.el7.1 ol7_latest 691 k kernel-container x86_64 3.10.0-0.0.0.2.el7 ol7_latest 2.6 k kernel-headers x86_64 3.10.0-1127.10.1.el7 ol7_latest 8.9 M ksh x86_64 20120801-142.0.1.el7 ol7_latest 882 k libaio-devel x86_64 0.3.109-13.el7 base 13 k libstdc++-devel x86_64 4.8.5-39.0.3.el7 ol7_latest 1.5 M Updating for dependencies: glibc x86_64 2.17-307.0.1.el7.1 ol7_latest 3.6 M glibc-common x86_64 2.17-307.0.1.el7.1 ol7_latest 12 M libgcc x86_64 4.8.5-39.0.3.el7 ol7_latest 103 k libgomp x86_64 4.8.5-39.0.3.el7 ol7_latest 158 k libstdc++ x86_64 4.8.5-39.0.3.el7 ol7_latest 306 k Transaction Summary ============================================================================================================================================================================================================ Install 1 Package (+12 Dependent packages) Upgrade ( 5 Dependent packages)
oracle-rdbms-server-11gR2-preinstal软件包执行的日志位于下面的目录:
cat /var/log/oracle-rdbms-server-11gR2-preinstall/results/orakernel.log