Friday, November 22, 2013

Installing 12c database in Linux 6 x84_64

STEP BY STEP INSTALLATION OF 12 C DATABASE IN REDHAT LINUX 6.4 X86_64

This are the steps to install the 12c database [single node] in Redhat Linux 6.4 [or ] oracle Linux 6.4

Step1

create the oracle public yum repository and enable the version
Run the prerequisite Rpm for the 12 c from the oracle public yum repository
oracle has the pre- built rpm like 11g release for the 12c which will be helpful
[root@oracledb1 ~]# yum install *oracle*12*
Loaded plugins: downloadonly, product-id, refresh-packagekit, rhnplugin, security, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
This system is receiving updates from RHN Classic or RHN Satellite.
ol6_UEK_latest
ol6_addons
ol6_ofed_UEK                                                                                                                                     | 1.2 kB     00:00
ol6_u4_base                                                                                                                                      | 1.4 kB     00:00
rackspace-rhel-x86_64-server-6-ius                                                                                                               |  871 B     00:00
rhel-x86_64-server-6                                                                                                                             | 1.5 kB     00:00
rhel-x86_64-server-6-common                                                                                                                      |  871 B     00:00
rhel-x86_64-server-optional-6                                                                                                                    | 1.5 kB     00:00
rhn-tools-rhel-x86_64-server-6                                                                                                                   | 1.3 kB     00:00
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package oracle-em-agent-12cR1-preinstall.x86_64 0:1.0-4.el6 will be installed
---> Package oracle-rdbms-server-12cR1-preinstall.x86_64 0:1.0-8.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

========================================================================================================================================================================
 Package                                                      Arch                           Version                           Repository                          Size
========================================================================================================================================================================
Installing:
 oracle-em-agent-12cR1-preinstall                             x86_64                         1.0-4.el6                         ol6_addons                         7.0 k
 oracle-rdbms-server-12cR1-preinstall                         x86_64                         1.0-8.el6                         ol6_latest                          15 k

Transaction Summary
========================================================================================================================================================================
Install       2 Package(s)

Total size: 22 k
Installed size: 42 k
Is this ok [y/N]: Y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : oracle-em-agent-12cR1-preinstall-1.0-4.el6.x86_64                                                                                                    1/2
  Installing : oracle-rdbms-server-12cR1-preinstall-1.0-8.el6.x86_64                                                                                                2/2
  Verifying  : oracle-rdbms-server-12cR1-preinstall-1.0-8.el6.x86_64                                                                                                1/2
  Verifying  : oracle-em-agent-12cR1-preinstall-1.0-4.el6.x86_64                                                                                                    2/2
Installed:
  oracle-em-agent-12cR1-preinstall.x86_64 0:1.0-4.el6                              oracle-rdbms-server-12cR1-preinstall.x86_64 0:1.0-8.el6

Complete!
 It will create the necessary Rpm's with the dependencies and add the entries in the /etc/sysctl.conf for the necessary Kernel Parameter's.. and /etc/security/limits.conf files
and it will create the new user named oracle with the oinstall as the group id 

Step 2
If you are using the oracle linux with support we can use the ksplice to apply the security updates with out rebooting

[1] Download the ksplice Rpm

[root@oracledb1 security]# wget https://www.ksplice.com/yum/uptrack/ol/ksplice-uptrack-release.noarch.rpm
--2013-11-20 20:29:27--  https://www.ksplice.com/yum/uptrack/ol/ksplice-uptrack-release.noarch.rpm
Resolving www.ksplice.com... 137.254.56.32
Connecting to www.ksplice.com|137.254.56.32|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 6876 (6.7K) [application/x-redhat-package-manager]
Saving to: âksplice-uptrack-release.noarch.rpmâ

100%[==============================================================================================================================>] 6,876       --.-K/s   in 0s

2013-11-20 20:29:27 (15.4 MB/s) - âksplice-uptrack-release.noarch.rpmâ

[root@oracledb1 security]# rpm -i ksplice-uptrack-release.noarch.rpm
warning: ksplice-uptrack-release.noarch.rpm: Header V3 DSA/SHA1 Signature, key ID 16c083cd: NOKEY


[2] Install the ksplice rpm using the yum

[root@oracledb1 security]# yum -y install uptrack
Loaded plugins: downloadonly, product-id, refresh-packagekit, rhnplugin, security, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
This system is receiving updates from RHN Classic or RHN Satellite.
ksplice-uptrack                                                             951 B     00:00
ksplice-uptrack/primary                                               3.9 kB     00:00
kspliceuptrack                                                                                                                                           12/12
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package uptrack.noarch 0:1.2.12-0.el6 will be installed
--> Processing Dependency: uptrack-PyYAML for package: uptrack-1.2.12-0.el6.noarch
--> Running transaction check
---> Package uptrack-PyYAML.x86_64 0:3.08-4.el6 will be installed
--> Processing Dependency: uptrack-libyaml >= 0.1.3-1 for package: uptrack-PyYAML-3.08-4.el6.x86_64
--> Running transaction check
---> Package uptrack-libyaml.x86_64 0:0.1.3-1.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

========================================================================================================================================================================
 Package                                    Arch                              Version                                  Repository                                  Size
========================================================================================================================================================================
Installing:
 uptrack                                    noarch                            1.2.12-0.el6                             ksplice-uptrack                            375 k
Installing for dependencies:
 uptrack-PyYAML                             x86_64                            3.08-4.el6                               ksplice-uptrack                            143 k
 uptrack-libyaml                            x86_64                            0.1.3-1.el6                              ksplice-uptrack                             48 k

Transaction Summary
========================================================================================================================================================================
Install       3 Package(s)

Total download size: 566 k
Installed size: 1.8 M
Downloading Packages:
(1/3): uptrack-1.2.12-0.el6.noarch.rpm                                                                                                           | 375 kB     00:00
(2/3): uptrack-PyYAML-3.08-4.el6.x86_64.rpm                                                                                                      | 143 kB     00:00
(3/3): uptrack-libyaml-0.1.3-1.el6.x86_64.rpm                                                                                                    |  48 kB     00:00
------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                   330 kB/s | 566 kB     00:01
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Warning: RPMDB altered outside of yum.
  Installing : uptrack-libyaml-0.1.3-1.el6.x86_64                                                                                                                   1/3
  Installing : uptrack-PyYAML-3.08-4.el6.x86_64                                                                                                                     2/3
  Installing : uptrack-1.2.12-0.el6.noarch                                                                                                                          3/3
There are no existing modules on disk that need basename migration.
  Verifying  : uptrack-PyYAML-3.08-4.el6.x86_64                                                                                                                     1/3
  Verifying  : uptrack-1.2.12-0.el6.noarch                                                                                                                          2/3
  Verifying  : uptrack-libyaml-0.1.3-1.el6.x86_64                                                                                                                   3/3

Installed:
  uptrack.noarch 0:1.2.12-0.el6

Dependency Installed:
  uptrack-PyYAML.x86_64 0:3.08-4.el6                                                uptrack-libyaml.x86_64 0:0.1.3-1.el6

Complete!

Step 3

Prerequisite rpm's for 12c database 

Required rpm's  the Oracle r12c database for Linux x86_64

check the installed rpm this rpm's are the mandatory rpm's for the database installation if some of the rpm's are not install install through the oracle public yum
[root@oracledb1 ~]# rpm -q binutils-* \
>  compat-libcap* \
>  compat-libstdc++* \
>  compat-libstdc++* \
>  gcc-* \
>  gcc-c++* \
>  glibc-* \
>  glibc-devel* \
>  ksh* \
>  libgcc-* \
>  libstdc++* \
>  libstdc++-devel * \
>  libaio * \
>  libaio-devel \
>  libXext- \
>  libXtst \
>  libX11 \
>  libXau- \
>  libxcb- \
>  libXi-1.3 \
>  make- \
>  sysstat \
>  unixODBC \
>  cvuqdisk \
>  cloog-ppl \
>  cpp.x86_64 \
>  glibc-headers \
> kernel-headers \
> mpfr.x86_64 \
>  ppl.x86_64
libXtst-1.2.1-2.el6.x86_64
binutils-devel-2.20.51.0.2-5.36.el6.x86_64
gcc-objc++-4.4.7-3.el6.x86_64
cloog-ppl-0.15.7-1.2.el6.x86_64
libXtst-1.2.1-2.el6.i686
gcc-objc-4.4.7-3.el6.x86_64
unixODBC-2.2.14-12.el6_3.x86_64
compat-libstdc++-33-3.2.3-69.el6.x86_64
glibc-common-2.12-1.107.el6_4.5.x86_64
libaio-devel-0.3.107-10.el6.x86_64
libstdc++-4.4.7-3.el6.x86_64
ksh-20100621-19.el6_4.4.x86_64
libX11-1.5.0-4.el6.i686
libaio-0.3.107-10.el6.x86_64
glibc-devel-2.12-1.107.el6_4.5.x86_64
compat-libstdc++-296-2.96-144.el6.i686
gcc-gnat-4.4.7-3.el6.x86_64
gcc-c++-4.4.7-3.el6.x86_64
compat-libcap1-1.10-1.x86_64
glibc-headers-2.12-1.107.el6_4.5.x86_64
libstdc++-devel-4.4.7-3.el6.x86_64
gcc-gfortran-4.4.7-3.el6.x86_64
glibc-static-2.12-1.107.el6_4.5.x86_64
libstdc++-docs-4.4.7-3.el6.x86_64
glibc-utils-2.12-1.107.el6_4.5.x86_64
kernel-headers-2.6.32-358.23.2.el6.x86_64
libX11-1.5.0-4.el6.x86_64
sysstat-9.0.4-20.el6.x86_64
gcc-java-4.4.7-3.el6.x86_64
[root@oracledb1 ~]#

Once all the rpm's are installed you can query and get Conformed

[root@oracledb1 ~]# rpm -q binutils  compat-libcap compat-libstdc++  compat-libstdc++  gcc  gcc-c++  glibc  glibc-devel  ksh  libgcc   libstdc++  libstdc++-devel   libaio   libaio-devel  libXext  libXtst   libX11   libXau  libxcb  libXi-1.3  make sysstat unixODBC cvuqdisk  cloog-ppl  cpp.x86_64   glibc-headers  kernel-headers  mpfr.x86_64   ppl.x86_64

Step 4 

Creating the user,groups for the 12 c database

[i] If you are using the pre-installation rpm then the  from the public yum then it will create the user named oracle and the group as oinstall
we can provide the same user group to all the group's during the installation but that is not the recommended method so we need to create the below groups and assign it to the oracle user

[root@oracledb1 app]# id oracle
uid=54321(oracle) gid=502(oinstall) groups=502(oinstall),503(dba)
 In 12c the new groups are introduced for the different purpose 

 [ii.a] BACKUPDBA GROUP 
This new group is needed when we need to configure the separate access for the operating system user's only for backup and restoration it is typically know as [sysbackup] 
Create the group  as backupdba
[root@oracledb1 app]# groupadd -g 505 backupdba

[ii.b]DGDBA
This particular group is assigned to the data guard user's [ it is typically can be use to assign the o/s user's who will monitor the data guard operation's]
Create the group as dgdba
[root@oracledb1 app]# groupadd -g 506 dgdb

[ii.c]KMDBA
This particular group can be assigned to the o/s users who will manage the encryption key [like db wallet]
[root@oracledb1 app]# groupadd -g 507 kmdba

As the preinstall rpm had created the oracle user id  we need to modify the oracle user with the necessary groups

[root@oracledb1 app]# usermod -g oinstall -G oinstall,dba,oper,backupdba,dgdba,kmdba oracle

[root@oracledb1 app]# id oracle
uid=54321(oracle) gid=502(oinstall)groups=502(oinstall),503(dba),504(oper),505(backupdba),506(dgdba),507(kmdba)


Step 5 

Creating the Oracle Base Directory

[root@oracledb1 /]# mkdir /u01/app/oracle -p
[root@oracledb1 /]# chown -R oracle:oinstall /u01/app/oracle
[root@oracledb1 /]# chmod -R g+w /u01/app/oracle

Step 6

Required Kernel settings for the 12c database

[root@oracledb1 ~]# sysctl -p
net.ipv4.ip_forward = 0
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.default.accept_source_route = 0
kernel.sysrq = 0
kernel.core_uses_pid = 1
net.ipv4.tcp_syncookies = 1
kernel.msgmnb = 65536
kernel.msgmax = 65536
kernel.core_pattern = /root/core
fs.file-max = 6815744
kernel.sem = 250 32000 100 128
kernel.shmmni = 4096
kernel.shmall = 1073741824
kernel.shmmax = 4398046511104
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
fs.aio-max-nr = 1048576

net.ipv4.ip_local_port_range = 9000 65500

Step 7

Required parameters in the limites.conf for 12c database

check the values in the /etc/security/limits.conf this values will be added by the 12c preinstall rpm if you are not using the pre install rpm add the values in the file

oracle   soft   nofile    1024
oracle   hard   nofile    65536
oracle   soft   nproc    2047
oracle   hard   nproc    16384
oracle   soft   stack    10240
oracle   hard   stack    32768

Download the 12c database software
For installing the database we need to download the database software from the www.edelivery.oracle.com or through the otn
once you download the zip files unzip the files to create the staging directory to start the run installer
[oracle@oracledb1 Downloads]$ ls
  V38500-01_1of2.zip  V38500-01_2of2.zip

INSTALLATION OF 12c DATABASE

Navigate to the database software staging directory and from there start the runInstaller to start the installation
Step 1



Step 2


Step 3
If we need to only install the software and create the database later using the dbca you can use this method or you can use the create and configure the database

Step 4

we can choose the different methods of installation of database
[1] single database installation -- only the database installation[with out grid]
[2] RAC Database installation --- installation of the rac database[prior we need to install the grid and asm]
[3]RAC one node database --- with the HAS services for the single node [prior we need to install grid ]


Step 5



Step 6



Step 7


Step 8



Step 9



Step 10


Step 11


Step 12


Step 13


No comments:

Post a Comment