Əsas səhifə > Linux, Oracle, Oracle Administration > Use Oracle 12c Preinstall RPM with CentOS 6.5

Use Oracle 12c Preinstall RPM with CentOS 6.5

Oracle-ın Linux üzərinə install-ı zamanı, bəzi pre-install addımlar atılmalıdır ki, burda yeni başlayanlara bəzən çətinlik yaradır.
Bu prosesi sadələşdirmək məqsədilə, Oracle 12cR1 üçün preinstall paketini təqdim edir.
Paketin adı: oracle-rdbms-server-12cR1-preinstall
Lakin bu paket yalnız, Oracle Public Yum Repo-da mövcuddur. Sözsüz ki, repo-ni aktivləşdirmək çox sadədir. Problem isə daha ciddidir, bu pre-install paketi dependency error verir (CentOS,Scientific Linux, Red Hat). Daha dəqiq desək Oracle Linux Kernel teleb edir(UEK).
Sınayaq:

Installing:
 oracle-rdbms-server-12cR1-preinstall    x86_64    1.0-8.el6                  /oracle-rdbms-server-12cR1-preinstall-1.0-8.el6.x86_64     37 k
Installing for dependencies:
 compat-libcap1                          x86_64    1.10-1                     base                                                       17 k
 compat-libstdc++-33                     x86_64    3.2.3-69.el6               base                                                      183 k
 kernel-uek                              x86_64    2.6.39-400.215.7.el6uek    ol6_UEK_latest                                             28 M
 kernel-uek-firmware                     noarch    2.6.39-400.215.7.el6uek    ol6_UEK_latest                                            3.7 M
 ksh                                     x86_64    20120801-10.el6_5.9        ol6_latest                                                757 k
 libaio-devel                            x86_64    0.3.107-10.el6             base                                                       13 k
 sysstat                                 x86_64    9.0.4-22.el6_5.1           ol6_latest                                                230 k

Bəli gördüyümüz kimi, kernel-uekkernel-uek-firmware
dependency tələb edir.
Sözsüz ki, 1 distro-da müxtəlif fərqli vendor-dan kernel olmamalıdır.
Nəticə etibarı ilə, biz bu pre-install RPM paketi CentOS-a qurmaq üçün, RPM-i yenidən rebuild etməli, bu əsnada isə UEK dependency-ni silməliyik.

Bütün addımlar aşağıdakı kimidir:

1. Install rpmbuild and related packages

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

2. Bütün rebuild işlərini görmək üçün, tets user yaradaq

[root@linuxsrv1 ~]# useradd tester -p tester -m -s /bin/bash
[root@linuxsrv1 ~]# su - tester

3. Oracle pre-install source paketlərini əldə edirik

[tester@linuxsrv1 ~]$ wget http://public-yum.oracle.com/repo/OracleLinux/OL6/latest/x86_64/getPackageSource/oracle-rdbms-server-12cR1-preinstall-1.0-11.el6.src.rpm
Saving to: “oracle-rdbms-server-12cR1-preinstall-1.0-11.el6.src.rpm”

100%[====================================================================================================>] 14,075      --.-K/s   in 0.06s   

2014-09-09 22:37:33 (241 KB/s) - “oracle-rdbms-server-12cR1-preinstall-1.0-11.el6.src.rpm” saved [14075/14075]

4. RPMTREE yaradırıq:

[tester@linuxsrv1 ~]$ rpmdev-setuptree
[tester@linuxsrv1 ~]$ ls -l
total 20
-rw-rw-r--. 1 tester tester 14075 Nov 21  2013 oracle-rdbms-server-12cR1-preinstall-1.0-11.el6.src.rpm
drwxrwxr-x. 8 tester tester  4096 Sep  9 22:40 rpmbuild
[tester@linuxsrv1 rpmbuild]$ ls -l
total 24
drwxrwxr-x. 3 tester tester 4096 Sep  9 22:40 BUILD
drwxr-xr-x. 2 tester tester 4096 Sep  9 22:40 BUILDROOT
drwxrwxr-x. 3 tester tester 4096 Sep  9 22:40 RPMS
drwxrwxr-x. 2 tester tester 4096 Sep  9 22:38 SOURCES
drwxrwxr-x. 2 tester tester 4096 Sep  9 22:38 SPECS
drwxrwxr-x. 2 tester tester 4096 Sep  9 22:40 SRPMS

5. src.rpm paketini test user ilə install edirik:

[tester@linuxsrv1 ~]$ rpm -ivh oracle-rdbms-server-12cR1-preinstall-1.0-11.el6.src.rpm
warning: oracle-rdbms-server-12cR1-preinstall-1.0-11.el6.src.rpm: Header V3 RSA/SHA256 Signature, key ID ec551f03: NOKEY
   1:oracle-rdbms-server-12c########################################### [100%]

6. Dependency hissəsində dəyişiklik edirik:

[tester@linuxsrv1 ~]$ nano rpmbuild/SPECS/oracle-rdbms-server-12cR1-preinstall.spec
#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

7. Yeni SPEC fayldan RPM-i rebuild edirik:

[tester@linuxsrv1 rpmbuild]$ rpmbuild -ba SPECS/oracle-rdbms-server-12cR1-preinstall.spec
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.iYRCvZ
+ umask 022
+ cd /home/tester/rpmbuild/BUILD
+ LANG=C
+ export LANG
+ unset DISPLAY
+ echo RPM_BUILD_ROOT=/home/tester/rpmbuild/BUILDROOT/oracle-rdbms-server-12cR1-preinstall-1.0-11.el6.x86_64
RPM_BUILD_ROOT=/home/tester/rpmbuild/BUILDROOT/oracle-rdbms-server-12cR1-preinstall-1.0-11.el6.x86_64
+ cd /home/tester/rpmbuild/BUILD
+ rm -rf oracle-rdbms-server-12cR1-preinstall-1.0
+ /bin/tar -xf -
+ /usr/bin/gzip -dc /home/tester/rpmbuild/SOURCES/oracle-rdbms-server-12cR1-preinstall-1.0.tar.gz
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd oracle-rdbms-server-12cR1-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.kajs7z
+ umask 022
+ cd /home/tester/rpmbuild/BUILD
+ cd oracle-rdbms-server-12cR1-preinstall-1.0
+ LANG=C
+ export LANG
+ unset DISPLAY
+ exit 0
Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.yw8fMa
+ umask 022
+ cd /home/tester/rpmbuild/BUILD
+ '[' /home/tester/rpmbuild/BUILDROOT/oracle-rdbms-server-12cR1-preinstall-1.0-11.el6.x86_64 '!=' / ']'
+ rm -rf /home/tester/rpmbuild/BUILDROOT/oracle-rdbms-server-12cR1-preinstall-1.0-11.el6.x86_64
++ dirname /home/tester/rpmbuild/BUILDROOT/oracle-rdbms-server-12cR1-preinstall-1.0-11.el6.x86_64
+ mkdir -p /home/tester/rpmbuild/BUILDROOT
+ mkdir /home/tester/rpmbuild/BUILDROOT/oracle-rdbms-server-12cR1-preinstall-1.0-11.el6.x86_64
+ cd oracle-rdbms-server-12cR1-preinstall-1.0
+ LANG=C
+ export LANG
+ unset DISPLAY
+ rm -rf /home/tester/rpmbuild/BUILDROOT/oracle-rdbms-server-12cR1-preinstall-1.0-11.el6.x86_64
+ mkdir -p -m 755 /home/tester/rpmbuild/BUILDROOT/oracle-rdbms-server-12cR1-preinstall-1.0-11.el6.x86_64/etc/sysconfig/oracle-rdbms-server-12cR1-preinstall
+ mkdir -p -m 755 /home/tester/rpmbuild/BUILDROOT/oracle-rdbms-server-12cR1-preinstall-1.0-11.el6.x86_64/usr/bin
+ mkdir -p -m 755 /home/tester/rpmbuild/BUILDROOT/oracle-rdbms-server-12cR1-preinstall-1.0-11.el6.x86_64/etc/rc.d/init.d
+ mkdir -p -m 755 /home/tester/rpmbuild/BUILDROOT/oracle-rdbms-server-12cR1-preinstall-1.0-11.el6.x86_64/etc/security/limits.d
+ mkdir -p -m 700 /home/tester/rpmbuild/BUILDROOT/oracle-rdbms-server-12cR1-preinstall-1.0-11.el6.x86_64/var/log/oracle-rdbms-server-12cR1-preinstall/results
+ install -m 700 oracle-rdbms-server-12cR1-preinstall-verify /home/tester/rpmbuild/BUILDROOT/oracle-rdbms-server-12cR1-preinstall-1.0-11.el6.x86_64/etc/sysconfig/oracle-rdbms-server-12cR1-preinstall
+ install -m 700 oracle-rdbms-server-12cR1-preinstall-verify /home/tester/rpmbuild/BUILDROOT/oracle-rdbms-server-12cR1-preinstall-1.0-11.el6.x86_64/usr/bin
+ install -m 600 oracle-rdbms-server-12cR1-preinstall.param /home/tester/rpmbuild/BUILDROOT/oracle-rdbms-server-12cR1-preinstall-1.0-11.el6.x86_64/etc/sysconfig/oracle-rdbms-server-12cR1-preinstall
+ install -m 700 oracle-rdbms-server-12cR1-preinstall-firstboot /home/tester/rpmbuild/BUILDROOT/oracle-rdbms-server-12cR1-preinstall-1.0-11.el6.x86_64/etc/rc.d/init.d
+ touch /home/tester/rpmbuild/BUILDROOT/oracle-rdbms-server-12cR1-preinstall-1.0-11.el6.x86_64/etc/security/limits.d/oracle-rdbms-server-12cR1-preinstall.conf
+ ln -f -s /etc/sysconfig/oracle-rdbms-server-12cR1-preinstall/oracle-rdbms-server-12cR1-preinstall-verify /home/tester/rpmbuild/BUILDROOT/oracle-rdbms-server-12cR1-preinstall-1.0-11.el6.x86_64/usr/bin/oracle-rdbms-server-12cR1-preinstall-verify
+ /usr/lib/rpm/find-debuginfo.sh --strict-build-id /home/tester/rpmbuild/BUILD/oracle-rdbms-server-12cR1-preinstall-1.0
+ /usr/lib/rpm/check-rpaths /usr/lib/rpm/check-buildroot
+ /usr/lib/rpm/redhat/brp-compress
+ /usr/lib/rpm/redhat/brp-strip-static-archive /usr/bin/strip
+ /usr/lib/rpm/redhat/brp-strip-comment-note /usr/bin/strip /usr/bin/objdump
+ /usr/lib/rpm/brp-python-bytecompile
+ /usr/lib/rpm/redhat/brp-python-hardlink
+ /usr/lib/rpm/redhat/brp-java-repack-jars
Processing files: oracle-rdbms-server-12cR1-preinstall-1.0-11.el6.x86_64
warning: File listed twice: /etc/sysconfig/oracle-rdbms-server-12cR1-preinstall/oracle-rdbms-server-12cR1-preinstall-verify
warning: File listed twice: /etc/sysconfig/oracle-rdbms-server-12cR1-preinstall/oracle-rdbms-server-12cR1-preinstall.param
Provides: config(oracle-rdbms-server-12cR1-preinstall) = 1.0-11.el6 oracle-rdbms-server-12cR1-preinstall = 1.0
Requires(interp): /bin/sh /bin/sh /bin/sh /bin/sh
Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(FileDigests) <= 4.6.0-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
Requires(postun): /bin/sh
Requires: /bin/bash
Processing files: oracle-rdbms-server-12cR1-preinstall-debuginfo-1.0-11.el6.x86_64
Checking for unpackaged file(s): /usr/lib/rpm/check-files /home/tester/rpmbuild/BUILDROOT/oracle-rdbms-server-12cR1-preinstall-1.0-11.el6.x86_64
warning: Could not canonicalize hostname: linuxsrv1
Wrote: /home/tester/rpmbuild/SRPMS/oracle-rdbms-server-12cR1-preinstall-1.0-11.el6.src.rpm
Wrote: /home/tester/rpmbuild/RPMS/x86_64/oracle-rdbms-server-12cR1-preinstall-1.0-11.el6.x86_64.rpm
Wrote: /home/tester/rpmbuild/RPMS/x86_64/oracle-rdbms-server-12cR1-preinstall-debuginfo-1.0-11.el6.x86_64.rpm
Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.7RHWGH
+ umask 022
+ cd /home/tester/rpmbuild/BUILD
+ cd oracle-rdbms-server-12cR1-preinstall-1.0
+ rm -rf /home/tester/rpmbuild/BUILDROOT/oracle-rdbms-server-12cR1-preinstall-1.0-11.el6.x86_64
+ exit 0

8. Yeni yaradılmış RPM paketi install edək:

[tester@linuxsrv1 ~]$ cd rpmbuild/RPMS/x86_64/
[tester@linuxsrv1 x86_64]$ ls -l
total 20
-rw-rw-r--. 1 tester tester 15220 Sep  9 22:40 oracle-rdbms-server-12cR1-preinstall-1.0-11.el6.x86_64.rpm
-rw-rw-r--. 1 tester tester  3424 Sep  9 22:40 oracle-rdbms-server-12cR1-preinstall-debuginfo-1.0-11.el6.x86_64.rpm
[tester@linuxsrv1 x86_64]$ su -
Password: 
[root@linuxsrv1 ~]# yum localinstall /home/tester/rpmbuild/RPMS/x86_64/oracle-rdbms-server-12cR1-preinstall-1.0-11.el6.x86_64.rpm
Dependencies Resolved

==============================================================================================================================================
 Package                                 Arch      Version                   Repository                                                  Size
==============================================================================================================================================
Installing:
 oracle-rdbms-server-12cR1-preinstall    x86_64    1.0-11.el6                /oracle-rdbms-server-12cR1-preinstall-1.0-11.el6.x86_64     38 k
Installing for dependencies:
 compat-libcap1                          x86_64    1.10-1                    base                                                        17 k
 compat-libstdc++-33                     x86_64    3.2.3-69.el6              base                                                       183 k
 ksh                                     x86_64    20120801-10.el6_5.9       updates                                                    757 k
 libaio-devel                            x86_64    0.3.107-10.el6            base                                                        13 k
 sysstat                                 x86_64    9.0.4-22.el6_5.1          updates                                                    230 k

9. Uğurla install edirik

Installed:
  oracle-rdbms-server-12cR1-preinstall.x86_64 0:1.0-11.el6                                                                                    

Dependency Installed:
  compat-libcap1.x86_64 0:1.10-1                compat-libstdc++-33.x86_64 0:3.2.3-69.el6          ksh.x86_64 0:20120801-10.el6_5.9         
  libaio-devel.x86_64 0:0.3.107-10.el6          sysstat.x86_64 0:9.0.4-22.el6_5.1                 

Complete!

10.Uğurlu installdan sonra görürük ki, əvvəllər manual olaraq etdiyimiz bütün addımlar indi avtomatik olaraq yerinə yetirilmişdir:

[root@linuxsrv1 ~]# cat /etc/group | grep oracle
dba:x:54322:oracle
[root@linuxsrv1 ~]# cat /etc/group | grep oinstall
oinstall:x:54321:

[root@linuxsrv1 ~]# cat /etc/sysctl.conf | grep oracle
# oracle-rdbms-server-12cR1-preinstall setting for fs.file-max is 6815744
# oracle-rdbms-server-12cR1-preinstall setting for kernel.sem is '250 32000 100 128'
# oracle-rdbms-server-12cR1-preinstall setting for kernel.shmmni is 4096
# oracle-rdbms-server-12cR1-preinstall setting for kernel.shmall is 1073741824 on x86_64
# oracle-rdbms-server-12cR1-preinstall setting for kernel.shmmax is 4398046511104 on x86_64
# oracle-rdbms-server-12cR1-preinstall setting for net.core.rmem_default is 262144
# oracle-rdbms-server-12cR1-preinstall setting for net.core.rmem_max is 4194304
# oracle-rdbms-server-12cR1-preinstall setting for net.core.wmem_default is 262144
# oracle-rdbms-server-12cR1-preinstall setting for net.core.wmem_max is 1048576
# oracle-rdbms-server-12cR1-preinstall setting for fs.aio-max-nr is 1048576
# oracle-rdbms-server-12cR1-preinstall setting for net.ipv4.ip_local_port_range is 9000 65500

Artıq hazırladığım paketi aşağıdakı linkdən yükləyə bilərsiniz:

12c Preinstall RPM for CentOS

Təşəkkürlər.

  1. Hələlik heç bir şərh yoxdur
  1. No trackbacks yet.

Bir cavab yazın

Sistemə daxil olmaq üçün məlumatlarınızı daxil edin və ya ikonlardan birinə tıklayın:

WordPress.com Loqosu

WordPress.com hesabınızdan istifadə edərək şərh edirsinz. Çıxış / Dəyişdir )

Twitter rəsmi

Twitter hesabınızdan istifadə edərək şərh edirsinz. Çıxış / Dəyişdir )

Facebook fotosu

Facebook hesabınızdan istifadə edərək şərh edirsinz. Çıxış / Dəyişdir )

Google+ foto

Google+ hesabınızdan istifadə edərək şərh edirsinz. Çıxış / Dəyişdir )

%s qoşulma

%d bloqqer bunu bəyənir: