Articles from Database administrator
workshop
How to avoid kernel-uek is needed by oracle-rdbms-
server-12cR1-preinstall o...
view plainprint?
1. [root@localhost ~]# rpm -Uvh oracle-rdbms-server-12cR1-preinstall-1.0-
8.el6.x86_64.rpm
2. warning: or...
view plainprint?
1. [mockbuild@localhost ~]$ vi rpmbuild/SPECS/oracle-rdbms-server-12cR1-
preinstall.spec
2. ...
3. #Syste...
42. + /usr/lib/rpm/brp-strip-comment-note
43. Processing files: oracle-rdbms-server-12cR1-preinstall-1.0-8.el6.i386
44. wa...
40. Installing : oracle-rdbms-server-12cR1-preinstall-1.0-
8.el6.i386 1/1
41. Verifying : oracle-rdbms-server-12cR1-preins...
Upcoming SlideShare
Loading in …5
×

How to avoid kernel-uek is needed by oracle-rdbms-server-12c_r1-preinstall on centos while installing 12c

853 views

Published on

http://dbaworkshop.blogspot.com/2013/07/How-to-avoid-kernel-uek-is-needed-by-oracle-rdbms-server-12cR1-preinstall-on-CentOS-while-installing-Oracle-Database-12c-release-1.html

Published in: Technology, News & Politics
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
853
On SlideShare
0
From Embeds
0
Number of Embeds
5
Actions
Shares
0
Downloads
9
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

How to avoid kernel-uek is needed by oracle-rdbms-server-12c_r1-preinstall on centos while installing 12c

  1. 1. Articles from Database administrator workshop How to avoid kernel-uek is needed by oracle-rdbms- server-12cR1-preinstall on CentOS while installing Oracle Database 12c release 1 So as you should know Oracle Database Server 12c release 1 is finally out there and this is my first post about it. I've just finished to download some fundamental documents from Oracle website such as "2 Day DBA", "New Features Guide", "Concepts Guide", "Upgrade Guide", "Administrator's Guide" (1360 pages!!!), "Backup and Recovery User's Guide" (684 pages) and "Database Installation Guide for Linux". I'm starting to read the "Database Installation Guide for Linux" guide, setting up a running virtual CentOS machine and, of course, preparing to install the new Oracle Database 12cR1: I want to use the so useful rpm package provided by Oracle for automatically complete default operating system configurations. There are many options described on the documentation to configure your Oracle Linux distribution with Oracle RDBMS pre-install rpm... but you can find some difficulties while using a different release such as "RedHat like" distribution like that one I'm going to use: the latest CentOS 6.4 distribution. Do not use the following instruction on a production environment because they won't be supported by Oracle guys: this post is only for testing purpose. So open a terminal and use wget command to get the requested rpm package from Oracle public yum repository: view plainprint? 1. [root@localhost ~]$ wget http://public- yum.oracle.com/repo/OracleLinux/OL6/latest/x86_64/oracle-rdbms-server- 12cR1-preinstall-1.0-8.el6.x86_64.rpm 2. --2013-07-04 10:15:03-- http://public- yum.oracle.com/repo/OracleLinux/OL6/latest/x86_64/oracle-rdbms-server- 12cR1-preinstall-1.0-8.el6.x86_64.rpm While installing the rpm package, it fails because some dependencies were not satisfied. I indeed installed the default minimal CentOS distribution. view plainprint? 1. [root@localhost ~] rpm -Uvh oracle-rdbms-server-12cR1-preinstall-1.0- 8.el6.x86_64.rpm 2. warning: oracle-rdbms-server-12cR1-preinstall-1.0- 8.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID ec551f03: NOKEY 3. error: Failed dependencies: 4. bind-utils is needed by oracle-rdbms-server-12cR1-preinstall-1.0- 8.el6.x86_64 5. compat-libcap1 is needed by oracle-rdbms-server-12cR1-preinstall-1.0- 8.el6.x86_64 6. compat-libstdc++-33 is needed by oracle-rdbms-server-12cR1-preinstall-1.0- 8.el6.x86_64 7. gcc-c++ is needed by oracle-rdbms-server-12cR1-preinstall-1.0- 8.el6.x86_64 8. kernel-uek is needed by oracle-rdbms-server-12cR1-preinstall-1.0- 8.el6.x86_64 9. ksh is needed by oracle-rdbms-server-12cR1-preinstall-1.0-8.el6.x86_64 10. libaio is needed by oracle-rdbms-server-12cR1-preinstall-1.0-8.el6.x86_64 11. libaio-devel is needed by oracle-rdbms-server-12cR1-preinstall-1.0- 8.el6.x86_64 12. libstdc++-devel is needed by oracle-rdbms-server-12cR1-preinstall-1.0- 8.el6.x86_64 13. nfs-utils is needed by oracle-rdbms-server-12cR1-preinstall-1.0- 8.el6.x86_64 14. smartmontools is needed by oracle-rdbms-server-12cR1-preinstall-1.0- 8.el6.x86_64 15. sysstat is needed by oracle-rdbms-server-12cR1-preinstall-1.0- 8.el6.x86_64 Execute a yum install command with the previous missing packages and one of them would not be available from the public CentOS repository. Just try to guess which one... view plainprint? 1. [root@localhost database]# yum -y install compat-libcap1 compat-libstdc++- 33 gcc-c++ kernel-uek ksh libaio libaio-devel libstdc++-devel nfs- utils smartmontools sysstats smartmontools Indeed when you issue again the command to install Oracle RDBMS pre-install package it discovers kernel-uek is still needed: UEK stands for Unbreakable Enterprise Kernel.
  2. 2. view plainprint? 1. [root@localhost ~]# rpm -Uvh oracle-rdbms-server-12cR1-preinstall-1.0- 8.el6.x86_64.rpm 2. warning: oracle-rdbms-server-12cR1-preinstall-1.0- 8.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID ec551f03: NOKEY 3. error: Failed dependencies: 4. kernel-uek is needed by oracle-rdbms-server-12cR1-preinstall-1.0- 8.el6.x86_64 I don't want to use a different kernel just to install a configuration package in a testing environment so why do not recompile that package instead and exclude that dependency ? I loved to recompile packages when I studied at the university: it was time of Red Hat 4.0 and I should still have a CD-ROM to install it at home. So the first things you must have are the packages to rebuild a rpm package. view plainprint? 1. [root@localhost ~]# yum -y install rpm-build rpmdevtools To avoid a rpmbuild error you have to create also the same user Oracle used to compile its package. It was called "mockbuild". So simply create it using useradd command and then set a password for him. view plainprint? 1. [root@localhost ~]# useradd mockbuild -m -s /bin/bash 2. [root@localhost ~]# passwd mockbuild 3. Changing password for user mockbuild. 4. New password: 5. Retype new password: 6. passwd: all authentication tokens updated successfully. Login with the new mockbuild user and download the rpm package containing all the source information that you have to modify. view plainprint? 1. [root@localhost ~]# su - mockbuild 2. [mockbuild@localhost ~]$ wget http://public- yum.oracle.com/repo/OracleLinux/OL6/latest/x86_64/oracle-rdbms-server- 12cR1-preinstall-1.0-8.el6.src.rpm 3. --2013-07-04 10:39:37-- http://public- yum.oracle.com/repo/OracleLinux/OL6/latest/x86_64/oracle-rdbms-server- 12cR1-preinstall-1.0-8.el6.src.rpm 4. Resolving public-yum.oracle.com... 137.254.56.43 5. Connecting to public-yum.oracle.com|137.254.56.43|:80... connected. 6. HTTP request sent, awaiting response... 200 OK 7. Length: 13332 (13K) [application/x-rpm] 8. Saving to: “oracle-rdbms-server-12cR1-preinstall-1.0-8.el6.src.rpm” 9. 10. 100%[=============================================================>] 13,332 44.7K/s in 0.3s 11. 12. 2013-07-04 10:39:37 (44.7 KB/s) - “oracle-rdbms-server-12cR1-preinstall-1.0- 8.el6.src.rpm” saved [13332/13332] Under the home directory of the mockbuild user create the RPM build environment using rpmdev-setuptree: view plainprint? 1. [mockbuild@localhost ~]$ pwd 2. /home/mockbuild 3. [mockbuild@localhost ~]$ rpmdev-setuptree 4. [mockbuild@localhost ~]$ ll 5. total 20 6. -rw-rw-r--. 1 mockbuild mockbuild 13332 Apr 24 03:26 oracle-rdbms-server- 12cR1-preinstall-1.0-8.el6.src.rpm 7. drwxrwxr-x. 7 mockbuild mockbuild 4096 Jul 4 10:40 rpmbuild 8. [mockbuild@localhost ~]$ ll rpmbuild 9. total 20 10. drwxrwxr-x. 2 mockbuild mockbuild 4096 Jul 4 10:40 BUILD 11. drwxrwxr-x. 2 mockbuild mockbuild 4096 Jul 4 10:40 RPMS 12. drwxrwxr-x. 2 mockbuild mockbuild 4096 Jul 4 10:40 SOURCES 13. drwxrwxr-x. 2 mockbuild mockbuild 4096 Jul 4 10:40 SPECS 14. drwxrwxr-x. 2 mockbuild mockbuild 4096 Jul 4 10:40 SRPMS Install the source rpm: view plainprint? 1. [mockbuild@localhost ~]$ rpm -ivh oracle-rdbms-server-12cR1-preinstall-1.0- 8.el6.src.rpm 2. warning: oracle-rdbms-server-12cR1-preinstall-1.0- 8.el6.src.rpm: Header V3 RSA/SHA256 Signature, key ID ec551f03: NOKEY 3. 1:oracle-rdbms-server- 12c########################################### [100%] Edit the oracle-rdbms-server-12cR1-preinstall.spec file removing the kernel-uek dependency (delete or comment that line)
  3. 3. view plainprint? 1. [mockbuild@localhost ~]$ vi rpmbuild/SPECS/oracle-rdbms-server-12cR1- preinstall.spec 2. ... 3. #System requirement 4. Requires:procps module-init-tools ethtool initscripts 5. Requires:bc bind-utils nfs-utils util-linux-ng pam 6. Requires:xorg-x11-utils xorg-x11-xauth 7. Requires:kernel-uek 8. Requires:smartmontools 9. ... Once you have removed the kernel-uek dependency you can rebuild the rpm issuing the following command: view plainprint? 1. [mockbuild@localhost ~]$ rpmbuild -ba rpmbuild/SPECS/oracle-rdbms- server-12cR1-preinstall.spec 2. warning: line 18: prereq is deprecated: PreReq:/etc/redhat-release 3. Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.UzkCll 4. + umask 022 5. + cd /home/mockbuild/rpmbuild/BUILD 6. + echo RPM_BUILD_ROOT=/home/mockbuild/rpmbuild/BUILDROOT/oracle- rdbms-server-12cR1-preinstall-1.0-8.el6.i386 7. RPM_BUILD_ROOT=/home/mockbuild/rpmbuild/BUILDROOT/oracle-rdbms- server-12cR1-preinstall-1.0-8.el6.i386 8. + cd /home/mockbuild/rpmbuild/BUILD 9. + rm -rf oracle-rdbms-server-12cR1-preinstall-1.0 10. + /bin/tar -xf - 11. + /usr/bin/gzip -dc /home/mockbuild/rpmbuild/SOURCES/oracle-rdbms- server-12cR1-preinstall-1.0.tar.gz 12. + STATUS=0 13. + '[' 0 -ne 0 ']' 14. + cd oracle-rdbms-server-12cR1-preinstall-1.0 15. + /bin/chmod -Rf a+rX,u+w,g-w,o-w . 16. + exit 0 17. Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.FUjBhi 18. + umask 022 19. + cd /home/mockbuild/rpmbuild/BUILD 20. + cd oracle-rdbms-server-12cR1-preinstall-1.0 21. + exit 0 22. Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.Qq9rxf 23. + umask 022 24. + cd /home/mockbuild/rpmbuild/BUILD 25. + cd oracle-rdbms-server-12cR1-preinstall-1.0 26. + rm -rf /home/mockbuild/rpmbuild/BUILDROOT/oracle-rdbms-server-12cR1- preinstall-1.0-8.el6.i386 27. + mkdir -p -m 755 /home/mockbuild/rpmbuild/BUILDROOT/oracle-rdbms- server-12cR1-preinstall-1.0-8.el6.i386/etc/sysconfig/oracle-rdbms-server- 12cR1-preinstall 28. + mkdir -p -m 755 /home/mockbuild/rpmbuild/BUILDROOT/oracle-rdbms- server-12cR1-preinstall-1.0-8.el6.i386/usr/bin 29. + mkdir -p -m 755 /home/mockbuild/rpmbuild/BUILDROOT/oracle-rdbms- server-12cR1-preinstall-1.0-8.el6.i386/etc/rc.d/init.d 30. + mkdir -p -m 755 /home/mockbuild/rpmbuild/BUILDROOT/oracle-rdbms- server-12cR1-preinstall-1.0-8.el6.i386/etc/security/limits.d 31. + mkdir -p -m 700 /home/mockbuild/rpmbuild/BUILDROOT/oracle-rdbms- server-12cR1-preinstall-1.0-8.el6.i386/var/log/oracle-rdbms-server-12cR1- preinstall/results 32. + install -m 700 oracle-rdbms-server-12cR1-preinstall- verify /home/mockbuild/rpmbuild/BUILDROOT/oracle-rdbms-server-12cR1- preinstall-1.0-8.el6.i386/etc/sysconfig/oracle-rdbms-server-12cR1-preinstall 33. + install -m 700 oracle-rdbms-server-12cR1-preinstall- verify /home/mockbuild/rpmbuild/BUILDROOT/oracle-rdbms-server-12cR1- preinstall-1.0-8.el6.i386/usr/bin 34. + install -m 600 oracle-rdbms-server-12cR1- preinstall.param /home/mockbuild/rpmbuild/BUILDROOT/oracle-rdbms- server-12cR1-preinstall-1.0-8.el6.i386/etc/sysconfig/oracle-rdbms-server- 12cR1-preinstall 35. + install -m 700 oracle-rdbms-server-12cR1-preinstall- firstboot /home/mockbuild/rpmbuild/BUILDROOT/oracle-rdbms-server- 12cR1-preinstall-1.0-8.el6.i386/etc/rc.d/init.d 36. + touch /home/mockbuild/rpmbuild/BUILDROOT/oracle-rdbms-server-12cR1- preinstall-1.0-8.el6.i386/etc/security/limits.d/oracle-rdbms-server-12cR1- preinstall.conf 37. + ln -f -s /etc/sysconfig/oracle-rdbms-server-12cR1-preinstall/oracle-rdbms- server-12cR1-preinstall- verify /home/mockbuild/rpmbuild/BUILDROOT/oracle-rdbms-server-12cR1- preinstall-1.0-8.el6.i386/usr/bin/oracle-rdbms-server-12cR1-preinstall-verify 38. + /usr/lib/rpm/check-rpaths /usr/lib/rpm/check-buildroot 39. + /usr/lib/rpm/brp-compress 40. + /usr/lib/rpm/brp-strip 41. + /usr/lib/rpm/brp-strip-static-archive 42. + /usr/lib/rpm/brp-strip-comment-note
  4. 4. 42. + /usr/lib/rpm/brp-strip-comment-note 43. Processing files: oracle-rdbms-server-12cR1-preinstall-1.0-8.el6.i386 44. warning: File listed twice: /etc/sysconfig/oracle-rdbms-server-12cR1- preinstall/oracle-rdbms-server-12cR1-preinstall-verify 45. warning: File listed twice: /etc/sysconfig/oracle-rdbms-server-12cR1- preinstall/oracle-rdbms-server-12cR1-preinstall.param 46. Provides: config(oracle-rdbms-server-12cR1-preinstall) = 1.0-8.el6 oracle- rdbms-server-12cR1-preinstall = 1.0 47. Requires(interp): /bin/sh /bin/sh /bin/sh /bin/sh 48. Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4- 1 rpmlib(PayloadFilesHavePrefix) <= 4.0- 1 rpmlib(VersionedDependencies) <= 3.0.3-1 49. Requires(pre): /bin/sh /etc/redhat-release 50. Requires(post): /bin/sh 51. Requires(preun): /bin/sh /etc/redhat-release 52. Requires(postun): /bin/sh 53. Requires: /bin/bash 54. Checking for unpackaged file(s): /usr/lib/rpm/check- files /home/mockbuild/rpmbuild/BUILDROOT/oracle-rdbms-server-12cR1- preinstall-1.0-8.el6.i386 55. Wrote: /home/mockbuild/rpmbuild/SRPMS/oracle-rdbms-server-12cR1- preinstall-1.0-8.el6.src.rpm 56. Wrote: /home/mockbuild/rpmbuild/RPMS/i386/oracle-rdbms-server-12cR1- preinstall-1.0-8.el6.i386.rpm 57. Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.t2jJoi 58. + umask 022 59. + cd /home/mockbuild/rpmbuild/BUILD 60. + cd oracle-rdbms-server-12cR1-preinstall-1.0 61. + rm -rf /home/mockbuild/rpmbuild/BUILDROOT/oracle-rdbms-server-12cR1- preinstall-1.0-8.el6.i386 62. + exit 0 Here is my new RPM file. view plainprint? 1. [mockbuild@localhost ~]$ ls rpmbuild/RPMS/i386/ 2. oracle-rdbms-server-12cR1-preinstall-1.0-8.el6.i386.rpm Log out the mockbuild user and as root issue the yum localinstall command: view plainprint? 1. [mockbuild@localhost ~]$ exit 2. logout 3. [root@localhost ~]# pwd 4. /root 5. [root@localhost ~]# yum localinstall /home/mockbuild/rpmbuild/RPMS/i386/oracle- rdbms-server-12cR1-preinstall-1.0-8.el6.i386.rpm 6. Loaded plugins: fastestmirror, refresh-packagekit 7. Setting up Local Package Process 8. Examining /home/mockbuild/rpmbuild/RPMS/i386/oracle-rdbms-server- 12cR1-preinstall-1.0-8.el6.i386.rpm: oracle-rdbms-server-12cR1-preinstall- 1.0-8.el6.i386 9. Marking /home/mockbuild/rpmbuild/RPMS/i386/oracle-rdbms-server-12cR1- preinstall-1.0-8.el6.i386.rpm to be installed 10. Loading mirror speeds from cached hostfile 11. * base: centos.intergenia.de 12. * extras: centos.copahost.com 13. * updates: centos.bio.lmu.de 14. Resolving Dependencies 15. --> Running transaction check 16. ---> Package oracle-rdbms-server-12cR1-preinstall.i386 0:1.0- 8.el6 will be installed 17. --> Finished Dependency Resolution 18. 19. Dependencies Resolved 20. 21. ======================================================================================================= 22. Package Arch Version Repository Size 23. ======================================================================================================= 24. Installing: 25. oracle-rdbms-server-12cR1-preinstall 26. i386 1.0-8.el6 /oracle-rdbms-server-12cR1-preinstall-1.0- 8.el6.i386 37 k 27. 28. Transaction Summary 29. ======================================================================================================= 30. Install 1 Package(s) 31. 32. Total size: 37 k 33. Installed size: 37 k 34. Is this ok [y/N]: y 35. Downloading Packages: 36. Running rpm_check_debug 37. Running Transaction Test 38. Transaction Test Succeeded 39. Running Transaction
  5. 5. 40. Installing : oracle-rdbms-server-12cR1-preinstall-1.0- 8.el6.i386 1/1 41. Verifying : oracle-rdbms-server-12cR1-preinstall-1.0- 8.el6.i386 1/1 42. 43. Installed: 44. oracle-rdbms-server-12cR1-preinstall.i386 0:1.0- 8.el6 45. 46. Complete! The oracle-rdbms-server-12cR1-preinstall.i386 0:1.0-8.el6 rpm package is finally installed and I can see it creates a new user in my machine. view plainprint? 1. [root@localhost ~]# cd /home/ 2. [root@localhost home]# ls 3. mockbuild oracle In the next post I will continue the installation of the Oracle Database 12c relase 1. That's all.

×