在RHEL上安装oracle数据库前期准备工作非常繁琐(包括创建用户,修改系统参数等)
在OEL上安装oracle就很方便,因为OEL提供了内置的RPM包oracle-validate,只需要配置好yum,然后yum install oracle-validated即可。
但是生产环境中用的大多是RHEL,而非OEL,所以如果想在生产环境中方便的部署oracle,可以下载oracle-validate RPM包和GPG-KEY文件,安装即可。
具体操作步骤
oracle-validated RPM下载路径 http://oss.oracle.com/el5/oracle-validated/
如下图,进入后选择需要的版本。
相应的GPG-KEY文件可以点击上级目录parent directory下载
通过wget方式下载(因为方便)
[root@localhost tmp]# wget https://oss.oracle.com/el5/oracle-validated/oracle-validated-1.0.0-24.el5.x86_64.rpm
[root@localhost tmp]# wget https://oss.oracle.com/el5/RPM-GPG-KEY-oracle
挂载光盘到/mnt目录下
[root@localhost tmp]# mount /dev/cdrom-hdc /mnt
修改yum配置文件
[root@localhost tmp]# vi /etc/yum.repos.d/rhel-debuginfo.repo
[rhel-debuginfo]
name=Red Hat Enterprise Linux $releasever - $basearch - Debug
baseurl=file:///mnt/Server
enabled=1
gpgcheck=0
[root@localhost tmp]# yum clean all
检查yum配置是否正确
[root@localhost tmp]# yum list
先导入RPM GPG KEY,否则安装oracle-validated包会报错
[root@localhost tmp]# rpm --import RPM-GPG-KEY-oracle
然后安装oracle-validated包
[root@localhost tmp]# yum installoracle-validated-1.0.0-24.el5.x86_64.rpm
Loaded plugins: katello, product-id, security, subscription-manager
Updating certificate-based repositories.
Unable to read consumer identity
Setting up Install Process
Examining oracle-validated-1.0.0-24.el5.x86_64.rpm: oracle-validated-1.0.0-24.el5.x86_64
Marking oracle-validated-1.0.0-24.el5.x86_64.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package oracle-validated.x86_64 0:1.0.0-24.el5 set to be updated
--> Processing Dependency: /usr/lib/libaio.so for package: oracle-validated
Importing additional filelist information
--> Processing Dependency: /usr/lib/libodbc.so.1 for package: oracle-validated
--> Processing Dependency: /usr/lib/libodbccr.so for package: oracle-validated
--> Processing Dependency: /usr/lib64/libaio.so for package: oracle-validated
--> Processing Dependency: /usr/lib64/libodbccr.so for package: oracle-validated
--> Processing Dependency: compat-gcc-34 for package: oracle-validated
--> Processing Dependency: compat-gcc-34-c++ for package: oracle-validated
--> Processing Dependency: libXp.so.6 for package: oracle-validated
--> Processing Dependency: libaio-devel for package: oracle-validated
--> Processing Dependency: sysstat for package: oracle-validated
--> Processing Dependency: unixODBC-devel for package: oracle-validated
--> Processing Dependency: libdb-4.2.so()(64bit) for package: oracle-validated
--> Processing Dependency: libodbc.so.1()(64bit) for package: oracle-validated
--> Running transaction check
---> Package compat-db.x86_64 0:4.2.52-5.1 set to be updated
---> Package compat-gcc-34.x86_64 0:3.4.6-4.1 set to be updated
---> Package compat-gcc-34-c++.x86_64 0:3.4.6-4.1 set to be updated
---> Package libXp.i386 0:1.0.0-8.1.el5 set to be updated
---> Package libaio-devel.i386 0:0.3.106-5 set to be updated
---> Package libaio-devel.x86_64 0:0.3.106-5 set to be updated
---> Package sysstat.x86_64 0:7.0.2-11.el5 set to be updated
---> Package unixODBC-devel.i386 0:2.2.11-10.el5 set to be updated
--> Processing Dependency: unixODBC = 2.2.11-10.el5 for package: unixODBC-devel
---> Package unixODBC-devel.x86_64 0:2.2.11-10.el5 set to be updated
---> Package unixODBC-libs.i386 0:2.2.11-10.el5 set to be updated
---> Package unixODBC-libs.x86_64 0:2.2.11-10.el5 set to be updated
--> Running transaction check
---> Package unixODBC.x86_64 0:2.2.11-10.el5 set to be updated
--> Finished Dependency Resolution
Dependencies Resolved
=================================================================================================
Package Arch Version Repository Size
=================================================================================================
Installing:
oracle-validated x86_64 1.0.0-24.el5 /oracle-validated-1.0.0-24.el5.x86_64 60 k
Installing for dependencies:
compat-db x86_64 4.2.52-5.1 rhel-debuginfo 1.6 M
compat-gcc-34 x86_64 3.4.6-4.1 rhel-debuginfo 4.3 M
compat-gcc-34-c++ x86_64 3.4.6-4.1 rhel-debuginfo 13 M
libXp i386 1.0.0-8.1.el5 rhel-debuginfo 22 k
libaio-devel i386 0.3.106-5 rhel-debuginfo 12 k
libaio-devel x86_64 0.3.106-5 rhel-debuginfo 11 k
sysstat x86_64 7.0.2-11.el5 rhel-debuginfo 187 k
unixODBC x86_64 2.2.11-10.el5 rhel-debuginfo 291 k
unixODBC-devel i386 2.2.11-10.el5 rhel-debuginfo 739 k
unixODBC-devel x86_64 2.2.11-10.el5 rhel-debuginfo 793 k
unixODBC-libs i386 2.2.11-10.el5 rhel-debuginfo 551 k
unixODBC-libs x86_64 2.2.11-10.el5 rhel-debuginfo 554 k
Transaction Summary
=================================================================================================
Install 13 Package(s)
Upgrade 0 Package(s)
Total size: 22 M
Total download size: 22 M
Is this ok [y/N]: y
Downloading Packages:
-------------------------------------------------------------------------------------------------
Total 1.6 GB/s | 22 MB 00:00
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : unixODBC-libs 1/13
Installing : unixODBC 2/13
Installing : compat-gcc-34 3/13
Installing : sysstat 4/13
Installing : compat-db 5/13
Installing : unixODBC-devel 6/13
Installing : libaio-devel 7/13
Installing : libaio-devel 8/13
Installing : unixODBC-libs 9/13
Installing : libXp 10/13
Installing : compat-gcc-34-c++ 11/13
Installing : unixODBC-devel 12/13
Installing : oracle-validated 13/13
rhel-debuginfo/productid | 1.7 kB 00:00
Installed products updated.
Installed:
oracle-validated.x86_64 0:1.0.0-24.el5
Dependency Installed:
compat-db.x86_64 0:4.2.52-5.1 compat-gcc-34.x86_64 0:3.4.6-4.1
compat-gcc-34-c++.x86_64 0:3.4.6-4.1 libXp.i386 0:1.0.0-8.1.el5
libaio-devel.i386 0:0.3.106-5 libaio-devel.x86_64 0:0.3.106-5
sysstat.x86_64 0:7.0.2-11.el5 unixODBC.x86_64 0:2.2.11-10.el5
unixODBC-devel.i386 0:2.2.11-10.el5 unixODBC-devel.x86_64 0:2.2.11-10.el5
unixODBC-libs.i386 0:2.2.11-10.el5 unixODBC-libs.x86_64 0:2.2.11-10.el5
Complete!
另:安装最新版oracle-validated包的时候报错,原因是依赖包、内核等不是RHEL自带的,需要下载编译内核,比较麻烦,不如直接安装OEL,故未做测试。
[root@localhost tmp]# yum install oracle-validated-1.1.0-7.el5.x86_64.rpm
Loaded plugins: katello, product-id, security, subscription-manager
Updating certificate-based repositories.
Unable to read consumer identity
Setting up Install Process
Examining oracle-validated-1.1.0-7.el5.x86_64.rpm: oracle-validated-1.1.0-7.el5.x86_64
Marking oracle-validated-1.1.0-7.el5.x86_64.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package oracle-validated.x86_64 0:1.1.0-7.el5 set to be updated
--> Processing Dependency: irqbalance >= 2:0.55-16 for package: oracle-validated
--> Processing Dependency: kernel-uek >= 2.6.32 for package: oracle-validated
--> Processing Dependency: /usr/lib/libaio.so for package: oracle-validated
Importing additional filelist information
rhel-debuginfo/filelists | 2.8 MB 00:00
rhel-debuginfo 3285/3285
--> Processing Dependency: /usr/lib/libodbc.so.1 for package: oracle-validated
--> Processing Dependency: /usr/lib/libodbccr.so for package: oracle-validated
--> Processing Dependency: /usr/lib64/libaio.so for package: oracle-validated
--> Processing Dependency: /usr/lib64/libodbccr.so for package: oracle-validated
--> Processing Dependency: compat-gcc-34 for package: oracle-validated
--> Processing Dependency: compat-gcc-34-c++ for package: oracle-validated
--> Processing Dependency: kernel-uek-headers for package: oracle-validated
--> Processing Dependency: libXp.so.6 for package: oracle-validated
--> Processing Dependency: libaio-devel for package: oracle-validated
--> Processing Dependency: oraclelinux-release for package: oracle-validated
--> Processing Dependency: sysstat for package: oracle-validated
--> Processing Dependency: unixODBC-devel for package: oracle-validated
--> Processing Dependency: libdb-4.2.so()(64bit) for package: oracle-validated
--> Processing Dependency: libodbc.so.1()(64bit) for package: oracle-validated
--> Running transaction check
---> Package compat-db.x86_64 0:4.2.52-5.1 set to be updated
---> Package compat-gcc-34.x86_64 0:3.4.6-4.1 set to be updated
---> Package compat-gcc-34-c++.x86_64 0:3.4.6-4.1 set to be updated
---> Package libXp.i386 0:1.0.0-8.1.el5 set to be updated
---> Package libaio-devel.i386 0:0.3.106-5 set to be updated
---> Package libaio-devel.x86_64 0:0.3.106-5 set to be updated
---> Package oracle-validated.x86_64 0:1.1.0-7.el5 set to be updated
--> Processing Dependency: irqbalance >= 2:0.55-16 for package: oracle-validated
--> Processing Dependency: kernel-uek >= 2.6.32 for package: oracle-validated
--> Processing Dependency: kernel-uek-headers for package: oracle-validated
--> Processing Dependency: oraclelinux-release for package: oracle-validated
---> Package sysstat.x86_64 0:7.0.2-11.el5 set to be updated
---> Package unixODBC-devel.i386 0:2.2.11-10.el5 set to be updated
--> Processing Dependency: unixODBC = 2.2.11-10.el5 for package: unixODBC-devel
---> Package unixODBC-devel.x86_64 0:2.2.11-10.el5 set to be updated
---> Package unixODBC-libs.i386 0:2.2.11-10.el5 set to be updated
---> Package unixODBC-libs.x86_64 0:2.2.11-10.el5 set to be updated
--> Running transaction check
---> Package oracle-validated.x86_64 0:1.1.0-7.el5 set to be updated
--> Processing Dependency: irqbalance >= 2:0.55-16 for package: oracle-validated
--> Processing Dependency: kernel-uek >= 2.6.32 for package: oracle-validated
--> Processing Dependency: kernel-uek-headers for package: oracle-validated
--> Processing Dependency: oraclelinux-release for package: oracle-validated
---> Package unixODBC.x86_64 0:2.2.11-10.el5 set to be updated
--> Finished Dependency Resolution
oracle-validated-1.1.0-7.el5.x86_64 from /oracle-validated-1.1.0-7.el5.x86_64 has depsolving problems
-->Missing Dependency: irqbalance>= 2:0.55-16 is needed by package oracle-validated-1.1.0-7.el5.x86_64 (/oracle-validated-1.1.0-7.el5.x86_64)
oracle-validated-1.1.0-7.el5.x86_64 from /oracle-validated-1.1.0-7.el5.x86_64 has depsolving problems
-->Missing Dependency: kernel-uek >= 2.6.32 is needed by package oracle-validated-1.1.0-7.el5.x86_64 (/oracle-validated-1.1.0-7.el5.x86_64)
oracle-validated-1.1.0-7.el5.x86_64 from /oracle-validated-1.1.0-7.el5.x86_64 has depsolving problems
-->Missing Dependency: kernel-uek-headers is needed by package oracle-validated-1.1.0-7.el5.x86_64 (/oracle-validated-1.1.0-7.el5.x86_64)
oracle-validated-1.1.0-7.el5.x86_64 from /oracle-validated-1.1.0-7.el5.x86_64 has depsolving problems
-->Missing Dependency: oraclelinux-releaseis needed by package oracle-validated-1.1.0-7.el5.x86_64 (/oracle-validated-1.1.0-7.el5.x86_64)
Error: Missing Dependency: oraclelinux-release is needed by package oracle-validated-1.1.0-7.el5.x86_64 (/oracle-validated-1.1.0-7.el5.x86_64)
Error: Missing Dependency: irqbalance >= 2:0.55-16 is needed by package oracle-validated-1.1.0-7.el5.x86_64 (/oracle-validated-1.1.0-7.el5.x86_64)
Error: Missing Dependency: kernel-uek >= 2.6.32 is needed by package oracle-validated-1.1.0-7.el5.x86_64 (/oracle-validated-1.1.0-7.el5.x86_64)
Error: Missing Dependency: kernel-uek-headers is needed by package oracle-validated-1.1.0-7.el5.x86_64 (/oracle-validated-1.1.0-7.el5.x86_64)
You could try using --skip-broken to work around the problem
You could try running: package-cleanup --problems
package-cleanup --dupes
rpm -Va --nofiles --nodigest
The program package-cleanup is found in the yum-utils package.
参考文章:
http://www.cnblogs.com/iImax/archive/2013/05/29/linux-server-install-oracle-validated-package.html
http://perumal.org/prepare-your-linux-server-to-install-oracle-database-using-oracle-validated-rpm/