您的位置:首页 > 数据库 > Oracle

Using Oracle Preinstall RPM with Red Hat 6

2013-04-04 20:56 459 查看
Setting up a Unix system ready for use with Oracle used to be a bit of a pain. You used to have to go through the

Oracle Database Preinstallation Requirements section of the documentation in pain-staking detail looking for every little kernel setting, operating system package and security configuration necessary to ensure that your database was in a supportable configuration.
If you were installing products such as ASM, CRS or the more-recent Grid Infrastructure then there would be additional preinstallation requirements sections to crawl through.
Things are a lot easier these days, with the Oracle Universal Installer (OUI) checking many settings, warning you if they are incorrect and even offering you a script which will automagically fix them. DBAs have
never had it so good


But the change which really made a difference for me was the creation of the oracle-validated RPM in Oracle Linux. Oracle has always been a great supporter of Linux, since long before most companies considered it
an enterprise-class and data-centre-ready operating system. This addition to the DBA kit bag is what makes Oracle Linux my favourite OS for installing the Oracle Database.

Oracle-Validated

Oracle Linux 5 saw the introduction of the oracle-validated RPM (you can see the first version appearing in OEL5.2 here although
it also snuck in to
later versions of OEL4). Since RPMs can have dependencies, Oracle used the
RPM framework to create a package which would a) setup all of the required kernel and security settings, and b) contain dependencies which would cause the installation of all the required operating system packages e.g. compilers, libraries etc. A look
at the first
oracle-validated source package (version 1.0.0-8) shows these dependencies:

Requires:enterprise-release >= 6:5
Requires:enterprise-release < 6:6

Requires:procps module-init-tools ethtool initscripts bc
Requires:binutils  gcc gcc-c++ glibc-common  glibc-headers kernel-headers libaio-devel make sysstat  elfutils-libelf-devel unixODBC-devel xorg-x11-xinit

Requires:compat-gcc-34 compat-gcc-34-c++ util-linux ksh

%ifarch i386 i486 i586 i686
Requires:compat-db compat-libstdc++-33 glibc glibc-devel libgcc libstdc++ libstdc++-devel libaio setarch unixODBC gdbm libXp libgnome
%endif

%ifarch x86_64
Requires:libdb-4.2.so()(64bit)  libstdc++.so.5()(64bit) libstdc++.so.5  libc.so.6 libc.so.6()(64bit) /usr/lib/libc.so /usr/lib64/libc.so libgcc_s.so.1 libgcc_s.so.1()(64bit) libstdc++.so.6 libstdc++.so.6()(64bit) /usr/lib/gcc/x86_64-redhat-linux/4.1.1/libstdc++.a libaio.so.1()(64bit) /usr/lib/libaio.so.1 libXp.so.6 libodbc.so.1()(64bit) libgdbm.so.2()(64bit) /usr/lib64/libgnome-2.so.0 /usr/lib/libXtst.so.6
%endif

Installation of the oracle-validated RPM using the yum utility looks something like this:

# yum install oracle-validated -y
Loaded plugins: rhnplugin, security
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package oracle-validated.x86_64 0:1.1.0-14.el5 set to be updated
--> Processing Dependency: libXp.so.6 for package: oracle-validated
--> Processing Dependency: gdb for package: oracle-validated
--> Processing Dependency: /usr/lib/libodbccr.so for package: oracle-validated
--> Processing Dependency: /usr/lib64/libc.so for package: oracle-validated
--> Processing Dependency: gcc-c++ for package: oracle-validated
--> Processing Dependency: gcc for package: oracle-validated
--> Processing Dependency: /usr/lib64/libodbccr.so for package: oracle-validated
--> Processing Dependency: unixODBC-devel for package: oracle-validated
--> Processing Dependency: libaio-devel for package: oracle-validated
<...etc...>

It’s worth taking some time to understand what oracle-validated is doing to your system – you might be surprised! For example, since version 1.0.0-24 it has been updating your /boot/grub/grub.conf file to disable
numa (i.e. set numa=off) for all of the kernel entries. A log file is created in /var/log/oracle-validated (although originally it was in /etc/sysconfig) so check the contents.

Oracle Preinstall

As of Oracle Linux 6 the oracle-validated RPM has been deprecated. One of the main reasons for this was that “oracle-validated” as a name sounded as if it would create a validated environment for
any Oracle product. With the proliferation of Oracle products and versions out there, this was becoming increasingly difficult to manage, so Oracle decided to
relaunch it as the Oracle Preinstall RPM, with the name of the intended-to-be-installed product contained within the RPM name. As a result, a look at the RPMs contained in
OL6U3 shows the following:

oracle-rdbms-server-11gR2-preinstall-1.0-6.el6.src.rpm
oracle-rdbms-server-11gR2-preinstall-1.0-6.el6.x86_64.rpm

So clearly this version is specific to Oracle RDBMS 11g Release 2. By downloading and extracting the

source RPM we can see the following:

Summary: Sets the system for Oracle single instance and Real Application Cluster install for Oracle Linux 6

%description
This package installs software packages and sets system parameters required for Oracle single instance and Real Application Cluster install for Oracle Linux Release 6
Files affected: /etc/sysctl.conf, /etc/security/limits.conf, /boot/grub/menu.lst

So far so good. But something additional has crept into this new incarnation of oracle-validated. Let’s have a look at the dependencies:

#System requirement
Requires:procps module-init-tools ethtool initscripts
Requires:bc bind-utils nfs-utils util-linux-ng pam
Requires:xorg-x11-utils xorg-x11-xauth
Requires:kernel-uek
Requires:smartmontools

The new Oracle-Preinstall RPM has a dependency on kernel-uek, which is of course the Oracle

Unbreakable Enterprise Kernel. So if you install the Oracle-Preinstall package you will likely find that next time you reboot your machine you are running a different kernel. And that sort of thing tends to come as a shock to those that weren’t expecting
it…

Oracle Unbreakable Enterprise Kernel



The
UEK is based on version 2.6.32 of the Linux kernel, which is only really a couple of hops away from the 2.6.18 kernel used by Red Hat in RHEL5 (and therefore also available in OEL5). Ok so technically it is 32 – 18 = 14 hops away, but the only other Oracle-supported
version of Linux I’m aware of that counts is SUSE Linux who had a 2.6.27 kernel for a time.

The big deal with 2.6.32 is that it implements a load of flash-related features such as support for
Advanced Format drives (i.e.
4k block size). That’s of particular interested to me, because Violin Memory flash uses 4k block sizes, although it can emulate 512 byte if required.

Once you get to Red Hat 6 however, the RHEL kernel is also based on version 2.6.32 and therefore those same features are present. But of course if you are a Red Hat customer you will not find the UEK available from
the Red Hat Network, since it is an Oracle product.

So if you are a Red Hat customer using the RHN yum channels you now have a problem trying to install the Oracle Preinstall RPM, because of the dependency on the UEK – which is only available from Oracle and which
may impact your support from Red Hat (but don’t rely on me for that, check it yourself to be absolutely sure).

So if you are a Red Hat customer what do you do now?

Oracle-Validated on Red Hat 4/5



Installing the oracle-validated RPM on Red
Hat was easy – in fact it even told you how to do it in the
Oracle Documentation. Although the oracle-validated RPM is not available from the Red Hat Network, you could simply download it from Oracle’s Public Yum Server and then perform a yum localinstall:

# wget http://public-yum.oracle.com/repo/OracleLinux/OL5/8/base/x86_64/oracle-validated-1.0.0-29.el5.x86_64.rpm # yum localinstall oracle-validated-1.0.0-29.el5.x86_64.rpm -y

The dependencies contained in the oracle-validated could be sourced from the RHN yum channels, so everything worked and you were left with an environment ready for the database installation. But what about Oracle-Preinstall
with RHEL6?

Oracle Preinstall on Red Hat 6

Not so simple. Look what happens if I try to perform a yum localinstall of this package when I only have the RHN channels configured:

[root@server1 ~]# yum localinstall oracle-rdbms-server-11gR2-preinstall-1.0-6.el6.x86_64.rpm
Loaded plugins: product-id, rhnplugin, security
Setting up Local Package Process
Examining oracle-rdbms-server-11gR2-preinstall-1.0-6.el6.x86_64.rpm: oracle-rdbms-server-11gR2-preinstall-1.0-6.el6.x86_64
Marking oracle-rdbms-server-11gR2-preinstall-1.0-6.el6.x86_64.rpm to be installed
Resolving Dependencies
...
--> Finished Dependency Resolution
Error: Package: oracle-rdbms-server-11gR2-preinstall-1.0-6.el6.x86_64 (/oracle-rdbms-server-11gR2-preinstall-1.0-6.el6.x86_64)
Requires: kernel-uek
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest

Why the error message? Because of the dependency on the UEK which is only available from Oracle. So if you are going to be using Red Hat, what are the choices?

Use the Oracle Public Yum server to install the UEK and then switch back to the RHEL kernel post installation, potentially impacting your support agreement
Manually install all of the packages and set the kernel / security settings instead of using Oracle Preinstall
Hack the RPM database so it thinks the UEK is installed when it isn’t
Rewrite and recompile the Oracle Preinstall RPM so that it no longer includes the dependency on the UEK

I’m not keen on the first one as I haven’t read all of the small print in my Red Hat support agreement. I’m even less keen on the second one because I am a DBA and therefore inherently lazy… I’d rather spend 10 hours
working out how to hack it than 5 hours doing it properly.

So let’s look at the remaining options…

Hack the RPM Database

RPM uses a local database to keep track of which packages are installed. So one simple if unclean option is to tell the RPM database that the UEK is installed even when it isn’t.

I have a Linux system running Red Hat 6 Update 3 and have disabled selinux and turned
off the iptables firewall. I have also used
rhn_register to register the system with the Red Hat Network in order to be able to use Red Hat’s yum servers.

[root@server1 ~]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 6.3 (Santiago)
[root@server1 ~]# uname -s -n -r -m
Linux server1.vmem.local 2.6.32-279.9.1.el6.x86_64 x86_64

I want to install the Oracle Preinstall RPM, but of course the package is only available from Oracle so first I need to fetch it from
Oracle’s public OL6 repository:

[root@server1 ~]# wget http://public-yum.oracle.com/repo/OracleLinux/OL6/latest/x86_64/oracle-rdbms-server-11gR2-preinstall-1.0-6.el6.x86_64.rpm [root@server1 ~]# ls -l oracle-rdbms-server-11gR2-preinstall-1.0-6.el6.x86_64.rpm
-rw-r--r-- 1 root root 15416 Jun 8 02:16 oracle-rdbms-server-11gR2-preinstall-1.0-6.el6.x86_64.rpm

I also need a kernel-uek RPM in order to run the command which will alter the database. There are ways of doing this without the actual kernel-uek RPM but this is just simpler, so I’ll also download it from the Oracle
Public Yum server:

[root@server1 ~]# wget http://public-yum.oracle.com/repo/OracleLinux/OL6/latest/x86_64/kernel-uek-2.6.32-300.32.3.el6uek.x86_64.rpm[/code] Now remember that earlier I ran a yum localinstall of the oracle-preinstall RPM and it failed with the message:

Error: Package: oracle-rdbms-server-11gR2-preinstall-1.0-6.el6.x86_64 (/oracle-rdbms-server-11gR2-preinstall-1.0-6.el6.x86_64)
Requires: kernel-uek

This time I will fake the installation of the kernel-uek package using the rpm option “–justdb”. However, kernel-uek also has dependencies, so it’s going to fail with a message saying that it needs the kernel-uek-firmware
package:

[root@server1 ~]# rpm -ivh kernel-uek-2.6.32-300.32.3.el6uek.x86_64.rpm --justdb
warning: kernel-uek-2.6.32-300.32.3.el6uek.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID ec551f03: NOKEY
error: Failed dependencies:
kernel-uek-firmware = 2.6.32-300.32.3.el6uek is needed by kernel-uek-2.6.32-300.32.3.el6uek.x86_64

That’s ok, I can add another option to the rpm call which is “–nodeps” to ignore any dependencies:

[root@server1 ~]# rpm -ivh kernel-uek-2.6.32-300.32.3.el6uek.x86_64.rpm --justdb --nodeps
warning: kernel-uek-2.6.32-300.32.3.el6uek.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID ec551f03: NOKEY
Preparing... ########################################### [100%]

This time the package “installs” into the RPM database with no issues. Now I can call the yum localinstall option on the oracle-preinstall package to setup the environment for my database. First though, because I
know that oracle-preinstall adds lines to my /boot/grub/grub.conf file (specifically to disable numa) I will take a copy of it:

[root@server1 ~]# cp /boot/grub/grub.conf /root/grub.conf
[root@server1 ~]# yum localinstall oracle-rdbms-server-11gR2-preinstall-1.0-3.el6.x86_64.rpm
Loaded plugins: product-id, rhnplugin, security
Setting up Local Package Process
Examining oracle-rdbms-server-11gR2-preinstall-1.0-3.el6.x86_64.rpm: oracle-rdbms-server-11gR2-preinstall-1.0-3.el6.x86_64
Marking oracle-rdbms-server-11gR2-preinstall-1.0-3.el6.x86_64.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package oracle-rdbms-server-11gR2-preinstall.x86_64 0:1.0-3.el6 will be installed

<...snip!...>

--> Finished Dependency Resolution

Dependencies Resolved

<...snip!...>

Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Warning: RPMDB altered outside of yum.
** Found 1 pre-existing rpmdb problem(s), 'yum check' output follows:
kernel-uek-2.6.32-300.32.3.el6uek.x86_64 has missing requires of kernel-uek-firmware = ('0', '2.6.32', '300.32.3.el6uek')

<...snip!...>

Installed:
oracle-rdbms-server-11gR2-preinstall.x86_64 0:1.0-3.el6

It works (despite the warning message) and now the environment is setup ready for the database to be installed. I need to check the new /boot/grub/grub.conf against my copy and of course check the contents of the
log file in /var/log/oracle-rdbms-server-11gR2-preinstall but my system is good to go. This method works… but it’s dirty.

Rewrite and Recompile the Oracle Preinstall RPM

WARNING: I am offering this example for educational purposes. If you rewrite and recompile any code written by a third party it is your duty to first investigate license agreements and support
policies.

An alternative method to installing Oracle Preinstall on a Red Hat system (or I guess any other RPM-based Linux system) is to download the source RPM file and then remove the dependency on the UEK and recompile.
Here’s an example:

First I’m going to install the rpm tools necessary to do this work:

[root@rh6u3 ~]# yum install rpm-build rpmdevtools -y

Now I am ready to create the RPM development environment, but first I must point out the golden rule of RPM package creation:
Never create RPMs as the root user!!! Oracle appears (at least in recent oracle-preinstall packages) to use a user called mockbuild, so that’s exactly what I am going to use:

[root@rh6u3 ~]# useradd mockbuild -p mockbuild -m -s /bin/bash
[root@rh6u3 ~]# su - mockbuild

[mockbuild@rh6u3 ~]$ wget http://public-yum.oracle.com/repo/OracleLinux/OL6/3/base/x86_64/oracle-rdbms-server-11gR2-preinstall-1.0-6.el6.src.rpm[/code] I’ve created the mockbuild user and switched to that account, then downloaded the source RPM for the latest oracle-preinstall file. I now need to create the RPM development environment which goes off and creates
(amongst other things) a load of subdirectories for me under a top-level directory called “rpmbuild”:

[mockbuild@rh6u3 ~]$ rpmdev-setuptree
[mockbuild@rh6u3 ~]$ ls -l
total 20
-rw-rw-r--. 1 mockbuild mockbuild 14422 Jun 8 02:16 oracle-rdbms-server-11gR2-preinstall-1.0-6.el6.src.rpm
drwxrwxr-x. 7 mockbuild mockbuild 4096 Oct 9 11:44 rpmbuild
[mockbuild@rh6u3 ~]$ ls -l rpmbuild/
total 20
drwxrwxr-x. 2 mockbuild mockbuild 4096 Oct 9 11:44 BUILD
drwxrwxr-x. 2 mockbuild mockbuild 4096 Oct 9 11:44 RPMS
drwxrwxr-x. 2 mockbuild mockbuild 4096 Oct 9 11:44 SOURCES
drwxrwxr-x. 2 mockbuild mockbuild 4096 Oct 9 11:44 SPECS
drwxrwxr-x. 2 mockbuild mockbuild 4096 Oct 9 11:44 SRPMS

I will now install the source RPM (as the mockbuild user) which will unpack itself into these directories:

[mockbuild@rh6u3 ~]$ rpm -ivh oracle-rdbms-server-11gR2-preinstall-1.0-6.el6.src.rpm
warning: oracle-rdbms-server-11gR2-preinstall-1.0-6.el6.src.rpm: Header V3 RSA/SHA256 Signature, key ID ec551f03: NOKEY
1:oracle-rdbms-server-11g########################################### [100%]

[mockbuild@rh6u3 ~]$ ls -l rpmbuild/SOURCES rpmbuild/SPECS
rpmbuild/SOURCES:
total 8
-rw-r--r--. 1 mockbuild mockbuild 7016 Jun 8 02:14 oracle-rdbms-server-11gR2-preinstall-1.0.tar.gz
rpmbuild/SPECS:
total 8
-rw-r--r--. 1 mockbuild mockbuild 5947 Jun 8 02:14 oracle-rdbms-server-11gR2-preinstall.spec
[mockbuild@rh6u3 ~]$ vi rpmbuild/SPECS/oracle-rdbms-server-11gR2-preinstall.spec

The important file here is the SPEC file which contains all of the dependency information for RPM and yum. You can see the last command is to edit the spec file in order to remove the line which says kernel-uek:

#System requirement
Requires:procps module-init-tools ethtool initscripts
Requires:bc bind-utils nfs-utils util-linux-ng pam
Requires:xorg-x11-utils xorg-x11-xauth
Requires:kernel-uek
Requires:smartmontools

Once that dependency is removed the modification is complete and I can repackage – I don’t need to change anything in the RPM payload (the tarball located in the SOURCES directory). The build command will throw some
interesting warnings but they can (usually) be ignored… stand by because this is going to create a long spool of output:

[mockbuild@rh6u3 ~]$ rpmbuild -ba rpmbuild/SPECS/oracle-rdbms-server-11gR2-preinstall.spec
warning: line 18: prereq is deprecated: PreReq:/etc/redhat-release
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.wgaFJn
+ umask 022
+ cd /home/mockbuild/rpmbuild/BUILD
+ echo RPM_BUILD_ROOT=/home/mockbuild/rpmbuild/BUILDROOT/oracle-rdbms-server-11gR2-preinstall-1.0-6.el6.x86_64
RPM_BUILD_ROOT=/home/mockbuild/rpmbuild/BUILDROOT/oracle-rdbms-server-11gR2-preinstall-1.0-6.el6.x86_64
+ cd /home/mockbuild/rpmbuild/BUILD
+ rm -rf oracle-rdbms-server-11gR2-preinstall-1.0
+ /usr/bin/gzip -dc /home/mockbuild/rpmbuild/SOURCES/oracle-rdbms-server-11gR2-preinstall-1.0.tar.gz
+ /bin/tar -xf -
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd oracle-rdbms-server-11gR2-preinstall-1.0
+ /bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ exit 0
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.oNjPub
+ umask 022
+ cd /home/mockbuild/rpmbuild/BUILD
+ cd oracle-rdbms-server-11gR2-preinstall-1.0
+ exit 0
Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.1Htc90
+ umask 022
+ cd /home/mockbuild/rpmbuild/BUILD
+ cd oracle-rdbms-server-11gR2-preinstall-1.0
+ rm -rf /home/mockbuild/rpmbuild/BUILDROOT/oracle-rdbms-server-11gR2-preinstall-1.0-6.el6.x86_64
+ mkdir -p -m 755 /home/mockbuild/rpmbuild/BUILDROOT/oracle-rdbms-server-11gR2-preinstall-1.0-6.el6.x86_64/etc/sysconfig/oracle-rdbms-server-11gR2-preinstall
+ mkdir -p -m 755 /home/mockbuild/rpmbuild/BUILDROOT/oracle-rdbms-server-11gR2-preinstall-1.0-6.el6.x86_64/usr/bin
+ mkdir -p -m 755 /home/mockbuild/rpmbuild/BUILDROOT/oracle-rdbms-server-11gR2-preinstall-1.0-6.el6.x86_64/etc/rc.d/init.d
+ install -m 755 oracle-rdbms-server-11gR2-preinstall-verify /home/mockbuild/rpmbuild/BUILDROOT/oracle-rdbms-server-11gR2-preinstall-1.0-6.el6.x86_64/etc/sysconfig/oracle-rdbms-server-11gR2-preinstall
+ install -m 755 oracle-rdbms-server-11gR2-preinstall-verify /home/mockbuild/rpmbuild/BUILDROOT/oracle-rdbms-server-11gR2-preinstall-1.0-6.el6.x86_64/usr/bin
+ install -m 644 oracle-rdbms-server-11gR2-preinstall.param /home/mockbuild/rpmbuild/BUILDROOT/oracle-rdbms-server-11gR2-preinstall-1.0-6.el6.x86_64/etc/sysconfig/oracle-rdbms-server-11gR2-preinstall
+ install -m 755 oracle-rdbms-server-11gR2-preinstall-firstboot /home/mockbuild/rpmbuild/BUILDROOT/oracle-rdbms-server-11gR2-preinstall-1.0-6.el6.x86_64/etc/rc.d/init.d
+ ln -f -s /etc/sysconfig/oracle-rdbms-server-11gR2-preinstall/oracle-rdbms-server-11gR2-preinstall-verify /home/mockbuild/rpmbuild/BUILDROOT/oracle-rdbms-server-11gR2-preinstall-1.0-6.el6.x86_64/usr/bin/oracle-rdbms-server-11gR2-preinstall-verify
+ /usr/lib/rpm/check-rpaths /usr/lib/rpm/check-buildroot
+ /usr/lib/rpm/brp-compress
+ /usr/lib/rpm/brp-strip
+ /usr/lib/rpm/brp-strip-static-archive
+ /usr/lib/rpm/brp-strip-comment-note
Processing files: oracle-rdbms-server-11gR2-preinstall-1.0-6.el6.x86_64
Provides: config(oracle-rdbms-server-11gR2-preinstall) = 1.0-6.el6 oracle-rdbms-server-11gR2-preinstall = 1.0
Requires(interp): /bin/sh /bin/sh /bin/sh /bin/sh
Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1 rpmlib(VersionedDependencies) <= 3.0.3-1
Requires(pre): /bin/sh /etc/redhat-release
Requires(post): /bin/sh
Requires(preun): /bin/sh /etc/redhat-release
Requires(postun): /bin/sh
Requires: /bin/bash
Checking for unpackaged file(s): /usr/lib/rpm/check-files /home/mockbuild/rpmbuild/BUILDROOT/oracle-rdbms-server-11gR2-preinstall-1.0-6.el6.x86_64
warning: Could not canonicalize hostname: rh6u3
Wrote: /home/mockbuild/rpmbuild/SRPMS/oracle-rdbms-server-11gR2-preinstall-1.0-6.el6.src.rpm
Wrote: /home/mockbuild/rpmbuild/RPMS/x86_64/oracle-rdbms-server-11gR2-preinstall-1.0-6.el6.x86_64.rpm
Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.04LldE
+ umask 022
+ cd /home/mockbuild/rpmbuild/BUILD
+ cd oracle-rdbms-server-11gR2-preinstall-1.0
+ rm -rf /home/mockbuild/rpmbuild/BUILDROOT/oracle-rdbms-server-11gR2-preinstall-1.0-6.el6.x86_64
+ exit 0

The result of all that madness is a new RPM file located in the RPM/<architecture> directory:

[mockbuild@rh6u3 ~]$ ls -lR rpmbuild/RPMS/
rpmbuild/RPMS/:
total 4
drwxr-xr-x. 2 mockbuild mockbuild 4096 Oct 9 12:10 x86_64
rpmbuild/RPMS/x86_64:
total 16
-rw-rw-r--. 1 mockbuild mockbuild 14437 Oct 9 12:10 oracle-rdbms-server-11gR2-preinstall-1.0-6.el6.x86_64.rpm

Now I can log out of the mockbuild account and run yum localinstall (as root) of the newly created RPM. My work is done! And unlike the “hack the RPM database” option I haven’t got a load of broken dependencies hiding
somewhere which might cause me trouble later.

[root@rh6u3 ~]# yum localinstall ~mockbuild/rpmbuild/RPMS/x86_64/oracle-rdbms-server-11gR2-preinstall-1.0-6.el6.x86_64.rpm
Loaded plugins: product-id, rhnplugin, security
Setting up Local Package Process
Examining /home/mockbuild/rpmbuild/RPMS/x86_64/oracle-rdbms-server-11gR2-preinstall-1.0-6.el6.x86_64.rpm: oracle-rdbms-server-11gR2-preinstall-1.0-6.el6.x86_64
Marking /home/mockbuild/rpmbuild/RPMS/x86_64/oracle-rdbms-server-11gR2-preinstall-1.0-6.el6.x86_64.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package oracle-rdbms-server-11gR2-preinstall.x86_64 0:1.0-6.el6 will be installed
--> Processing Dependency: compat-libcap1 for package: oracle-rdbms-server-11gR2-preinstall-1.0-6.el6.x86_64
--> Processing Dependency: compat-libstdc++-33 for package: oracle-rdbms-server-11gR2-preinstall-1.0-6.el6.x86_64
--> Processing Dependency: gcc for package: oracle-rdbms-server-11gR2-preinstall-1.0-6.el6.x86_64
--> Processing Dependency: gcc-c++ for package: oracle-rdbms-server-11gR2-preinstall-1.0-6.el6.x86_64
--> Processing Dependency: glibc-devel for package: oracle-rdbms-server-11gR2-preinstall-1.0-6.el6.x86_64
--> Processing Dependency: ksh for package: oracle-rdbms-server-11gR2-preinstall-1.0-6.el6.x86_64
--> Processing Dependency: libaio-devel for package: oracle-rdbms-server-11gR2-preinstall-1.0-6.el6.x86_64
--> Processing Dependency: libstdc++-devel for package: oracle-rdbms-server-11gR2-preinstall-1.0-6.el6.x86_64
--> Processing Dependency: make for package: oracle-rdbms-server-11gR2-preinstall-1.0-6.el6.x86_64
--> Processing Dependency: nfs-utils for package: oracle-rdbms-server-11gR2-preinstall-1.0-6.el6.x86_64
--> Running transaction check
---> Package compat-libcap1.i686 0:1.10-1 will be installed
---> Package compat-libstdc++-33.i686 0:3.2.3-69.el6 will be installed
---> Package gcc.i686 0:4.4.6-4.el6 will be installed
--> Processing Dependency: libgomp = 4.4.6-4.el6 for package: gcc-4.4.6-4.el6.i686
--> Processing Dependency: cpp = 4.4.6-4.el6 for package: gcc-4.4.6-4.el6.i686
--> Processing Dependency: cloog-ppl >= 0.15 for package: gcc-4.4.6-4.el6.i686
--> Processing Dependency: libgomp.so.1 for package: gcc-4.4.6-4.el6.i686
---> Package gcc-c++.i686 0:4.4.6-4.el6 will be installed
--> Processing Dependency: libmpfr.so.1 for package: gcc-c++-4.4.6-4.el6.i686
---> Package glibc-devel.i686 0:2.12-1.80.el6_3.5 will be installed
--> Processing Dependency: glibc-headers = 2.12-1.80.el6_3.5 for package: glibc-devel-2.12-1.80.el6_3.5.i686
--> Processing Dependency: glibc = 2.12-1.80.el6_3.5 for package: glibc-devel-2.12-1.80.el6_3.5.i686
--> Processing Dependency: glibc-headers for package: glibc-devel-2.12-1.80.el6_3.5.i686
---> Package ksh.i686 0:20100621-16.el6 will be installed
---> Package libaio-devel.i686 0:0.3.107-10.el6 will be installed
---> Package libstdc++-devel.i686 0:4.4.6-4.el6 will be installed
---> Package make.i686 1:3.81-20.el6 will be installed
---> Package nfs-utils.i686 1:1.2.3-26.el6 will be installed
--> Processing Dependency: nfs-utils-lib >= 1.1.0-3 for package: 1:nfs-utils-1.2.3-26.el6.i686
--> Processing Dependency: keyutils >= 1.4-4 for package: 1:nfs-utils-1.2.3-26.el6.i686
--> Processing Dependency: rpcbind for package: 1:nfs-utils-1.2.3-26.el6.i686
--> Processing Dependency: libtirpc.so.1 for package: 1:nfs-utils-1.2.3-26.el6.i686
--> Processing Dependency: libtirpc for package: 1:nfs-utils-1.2.3-26.el6.i686
--> Processing Dependency: libnfsidmap.so.0 for package: 1:nfs-utils-1.2.3-26.el6.i686
--> Processing Dependency: libgssglue.so.1(libgssapi_CITI_2) for package: 1:nfs-utils-1.2.3-26.el6.i686
--> Processing Dependency: libgssglue.so.1 for package: 1:nfs-utils-1.2.3-26.el6.i686
--> Processing Dependency: libgssglue for package: 1:nfs-utils-1.2.3-26.el6.i686
--> Processing Dependency: libevent-1.4.so.2 for package: 1:nfs-utils-1.2.3-26.el6.i686
--> Processing Dependency: libevent for package: 1:nfs-utils-1.2.3-26.el6.i686
--> Running transaction check
---> Package cloog-ppl.i686 0:0.15.7-1.2.el6 will be installed
--> Processing Dependency: libppl_c.so.2 for package: cloog-ppl-0.15.7-1.2.el6.i686
--> Processing Dependency: libppl.so.7 for package: cloog-ppl-0.15.7-1.2.el6.i686
---> Package cpp.i686 0:4.4.6-4.el6 will be installed
---> Package glibc.i686 0:2.12-1.80.el6 will be updated
--> Processing Dependency: glibc = 2.12-1.80.el6 for package: glibc-common-2.12-1.80.el6.i686
---> Package glibc.i686 0:2.12-1.80.el6_3.5 will be an update
---> Package glibc-headers.i686 0:2.12-1.80.el6_3.5 will be installed
--> Processing Dependency: kernel-headers >= 2.2.1 for package: glibc-headers-2.12-1.80.el6_3.5.i686
--> Processing Dependency: kernel-headers for package: glibc-headers-2.12-1.80.el6_3.5.i686
---> Package keyutils.i686 0:1.4-4.el6 will be installed
---> Package libevent.i686 0:1.4.13-4.el6 will be installed
---> Package libgomp.i686 0:4.4.6-4.el6 will be installed
---> Package libgssglue.i686 0:0.1-11.el6 will be installed
---> Package libtirpc.i686 0:0.2.1-5.el6 will be installed
---> Package mpfr.i686 0:2.4.1-6.el6 will be installed
---> Package nfs-utils-lib.i686 0:1.1.5-4.el6 will be installed
---> Package rpcbind.i686 0:0.2.0-9.el6 will be installed
--> Running transaction check
---> Package glibc-common.i686 0:2.12-1.80.el6 will be updated
---> Package glibc-common.i686 0:2.12-1.80.el6_3.5 will be an update
---> Package kernel-headers.i686 0:2.6.32-279.9.1.el6 will be installed
---> Package ppl.i686 0:0.10.2-11.el6 will be installed
--> Finished Dependency Resolution


From:http://flashdba.com/install-cookbooks/using-oracle-preinstall-rpm-with-red-hat-6/
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: