Sunday, June 30, 2013

Oracle Database 12C Release 1 Installation on Linux


Oracle 12c (Oracle 12.1.0.1) has been released and is available for download . Oracle 12C Installation steps are almost  same as  that  of   Oracle 10g and 11g Installations  . Oracle  12c  is  available  for  64 bit . Here , we will see step-by-step Installation of Oracle 12C database .  

Step  1 :  Oracle S/W Installation
We can download Oracle 12c  s/w from e-delivery or from OTN .  Below are Link

http://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html
https://edelivery.oracle.com/EPD/Download/get_form?egroup_aru_number=16496132


Step 2 :  Hardware Requirements 
Oracle Recommand the following requirement for installation .
RAM     =  2GB of RAM or more
Swap    = 1.5 times of RAM if RAM less than 2 GB , equal to size of RAM is RAm size is more than 2GB
Disk Space      = More than 6.4 GB for Enetrprise Edition .
Tmp directory  =  Minimum 1GB of  free space


Step 3 :  Hardware Verifications 
[root@server1 ~]# grep  MemTotal   /proc/meminfo
MemTotal:      3017140 kB

[root@server1 ~]# grep  SwapTotal   /proc/meminfo
SwapTotal:     4105420 kB

[root@server1 ~]# df  -h  /tmp
Filesystem            Size    Used     Avail     Use%     Mounted on
/dev/sda1              46G   19G      25G       44%          /

[root@server1 ~]# df  -h 
Filesystem            Size       Used     Avail      Use%      Mounted on
/dev/sda1              46G      19G       25G       44%          /
tmpfs                    1.5G       0          1.5G       0%           /dev/shm
/dev/hdc              3.4G       3.4G        0        100%         /media/RHEL_5.3 x86_64 DVD

[root@server1 ~]#  free
                  total           used           free           shared    buffers     cached
Mem:       3017140     715376    2301764          0       109776     384096
-/+ buffers/cache:        221504    2795636
Swap:      4105420          0         4105420

[root@server1 ~]# uname  -m 
x86_64

[root@server1 ~]# uname  -a 
Linux   server1.example.com      2.6.18-128.el5 #1    SMP    Wed    Dec 17 11:41:38 EST   2008    x86                                                                                        
_64 x86_64 x86_64      GNU/Linux


Step 4 :  Packages Verifications 
The  following  packages  are  required  for  the  Oracle  Installation , so  make  sure  all  the  packages are installed .

make-3.81
binutils-2.17.50
gcc-4.1.2                       (x86_64)
gcc-c++-4.1.2               (x86_64)
compat-libcap1              (x86_64)
compat-libstdc++-33     (x86_64)
glibc-2.5-58                   (x86_64)
glibc-devel-2.5               (x86_64)
libgcc-4.1.2                    (x86_64) 
libstdc++-4.1.2               (x86_64)  
libstdc++-devel-4            (x86_64)  
libaio-0.3.106                  (x86_64)
libaio-devel-0.3               (x86_64) 
ksh 
sysstat  
unixODBC  
unixODBC-devel

Execute  the  below command  as  root  to  make  sure  that  we  have  all  this  rpms  installed. If  not installed,  then  download  them   from  appropriate  linux  site or  we will  find  the  package from  the Red Hat Enterprise Linux 5 DVD . For example , 
# rpm  -qa  | grep  glib* 


The  above  command  will  display  all  the  installed  packages,  name  starting  with   glib,  similarly  we  can  check  for  all  others  packages . If  any of  the  above  packages  are  not  installed, run  the  following command:
# rpm  -ivh  </path/to/><version>.i386.rpm


Steps 5  :  Kernel Parameters
Add the below kernel Parameters in the  /etc/sysctl.conf  file

fs.file-max = 6815744
kernel.sem = 250 32000 100 128
kernel.shmmni = 4096
kernel.shmall = 1073741824
kernel.shmmax = 2147483648
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

After  adding these  lines  to  /etc/sysctl.conf , run  the  below command  as  root  to  make  them  enabled.
 #  sysctl   -p 


Step 6 :  Edit the /etc/security/limits.conf file
To  improve the  performance  of   the  software  on  Linux  systems, we  must  increase  the  following  shell limits   for  the  oracle  user . Add  the  following  lines  to the  /etc/security/limits.conf  file :

oracle    soft  nproc  2047
oracle    hard  nproc  16384
oracle    soft  nofile  1024
oracle    hard  nofile  65536
Where  "nproc"  is  the maximum  number  of  processes  available to  the  user  and  "nofiles"  is  the  number  of  open  file  descriptors.


Step 7  :  Create User and Groups 
Starting  with  Oracle  Database  12c , we  can  create  new  administrative  privileges  that  are  more  task-specific  and  less  privileged  than  the  OSDBA/SYSDBA  system privileges  to support specific administrative  privileges  tasks  required  for  everyday  database  operation. Users  granted  these  system privileges  are  also  authenticated  through operating system group membership .

We  do  not  have to  create  these  specific  group  names, but  during  installation we  are  prompted  to provide  operating  system  groups  whose  members  are  granted  access  to  these  system  privileges.  we  can  assign  the same  group  to  provide  authentication  for  these  privileges, but  Oracle  recommends  that we  should  provide  a  unique  group  to  designate each  privileges.

i .) The OSDBA group (typically, dba)  :  This group identifies operating system user accounts that have database administrative privileges (the SYSDBA privilege).
#groupadd  -g  501  dba  

ii .) The Oracle Inventory Group (oinstall) :  This group owns the Oracle inventory that is a catalog of all Oracle software installed on the system. A single Oracle  Inventory group is required for all installations of Oracle software on the system.
# groupadd  -g  502  oinstall  
iii .) The OSOPER group for Oracle Database (typically, oper)  :  This  is an optional  group. We  create  this  group  if  we  want  a separate  group of  operating  system  users  to  have a  limited  set  of database  administrative  privileges  for  starting  up  and shutting  down the  database  (the SYSOPER privilege). 
# groupadd  -g  503  oper  

iv .) The OSBACKUPDBA group for Oracle Database (typically, backupdba)  :   Create this group if we  want a  separate  group of  operating  system  users  to  have a  limited  set  of database backup and recovery related administrative privileges (the SYSBACKUP privilege).
# groupadd   -g   504   backupdba 

v .) The OSDGDBA group for Oracle Data Guard (typically, dgdba)  :   Create  this  group  if  we want  a  separate  group of  operating  sytsem  users to  have a  limited  set of   privileges  to  administer  and monitor  Oracle Data Guard  (the SYSDG privilege).
# groupadd   -g   505   dgdba 

vi .) The OSKMDBA group for encyption key management (typically, kmdba)   :  Create  this  group if  we  want  a  separate group  of  operating  sytem  users  to have a  limited  set  of  privileges  for encryption  key  management  such  as Oracle  Wallet  Manager  management  (the SYSKM privilege).
#  groupadd   -g   506   kmdba  

vii .) The OSDBA group for Oracle ASM (typically, asmdba) :   The  OSDBA  group  for  Oracle ASM can  be  the  same group u sed as  the OSDBA  group  for  the database, or we  can  create a separate OSDBA group for Oracle ASM to provide administrative access to Oracle ASM instances .
# groupadd  -g  507   asmdba 

viii .) The OSASM group for Oracle ASM Administration (typically, asmadmin)  :  Create  this  group as  a  separate group if  we  want  to  have  separate  administration  privileges  groups  for  Oracle  ASM and Oracle  Database  administrators. Members  of  this  group  are  granted  the  SYSASM  system privileges  to  administer  Oracle ASM  .
#  groupadd  -g   508   asmoper

ix .)  The OSOPER group for Oracle ASM (typically, asmoper)  :   This is an optional group. Create this group  if  we  want  a separate  group of  operating  system  users  to  have  a limited  set  of  Oracle instance  administrative  privileges  (the SYSOPER for ASM privilege),  including starting up and stopping the  Oracle  ASM  instance . By default ,  members of  the OSASM group  also  have all privileges granted by the SYSOPER for ASM  privilege.
# groupadd   -g   509  asmadmin 

x . ) Create Oracle user  :
# useradd -u 54321 -g oinstall -G dba,asmdba,backupdba,dgdba,kmdba  oracle
#passwd oracle
<<ORACLE PASSWORD >>

The  -u  option  specifies  the  user  ID. Using  this  command  flag  is optional  because the system can provide  with  an  automatically  generated  user  ID  number. However,  Oracle  recommends  that  we should specify a number. We must note the user ID number because we need it during preinstallation.


Step 8 :  Creating oracle directories 
As  per  OFA, oracle base directory has  the  path  :  /mount_point/app/oracle_sw_owner  where mount_point   is  the mount  point directory  for  the  file system  that  will  contain  the  Oracle software . I have  used  /u01  for  the mount point  directory. However, we  could  choose  another  mount point directory,  such  as  /oracle or /opt/soft.
# mkdir -p /u01/oracle/product/12.1.0/db_1
# chown -R oracle:oinstall /u01
# chmod -R 777 /u01


Step 9 :  Setting Oracle Enviroment 
Edit  the  /home/oracle/.bash_profile  file and  add  following  lines:
# su - oracle
$ vi  .bash_profile
export TMP=/tmp
export TMPDIR=$TMP
export ORACLE_BASE=/u01/oracle
export ORACLE_HOME=$ORACLE_BASE/product/12.1.0/db_1
export PATH=/usr/sbin:$PATH
export PATH=$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib


Step 10  :   Check firewall and Selinux  
Make sure Selinux be either disable or permissive . Check "/etc/selinux/config" file and make following changes .
SELINUX=permissive
Once ,Selinux value is set than restart the server or or run the below command
# setenforce Permissive

If  Firewall is enabled ,we need to disable it . we can disable by using below command
# service iptables stop
# chkconfig iptables off


Step 11 :  Finally run the runInstaller for Installation of  Oracle 12c release 1

















Once ,  runInstaller get initaited , OUI get invoked and rest are interative graphical console .


Click next and proceed forward .



Click  on "Yes"  button and proceed .


Select "Skip Software Updates" option and click on next button .


Select  "Create and configure a database" option and click on next button


Here , I selected the "Desktop Class" option . Click on next button


Enter the Administrative Password and click next


Click on "Yes" option and proceed forward


Click on next button


Make sure all the prerequisite must be successfull and passed  .
 

Summary page displays all the locations and database information . Click next


Oracle Database Installation in process


Execute the configurations scripts from root


Run the scripts from root .


Oracle Database in process


Database creation in process .


Database creation in process .




Database Creation complted .


Installation of Oracle database was successfull .


Finally connected  with Oracle 12c database .


Enjoy   :-)  :-)  :-) 


Thursday, June 27, 2013

Oracle Database 12c Available for Download

Finally, Oracle has released the most awaited oracle Database i.e, 12c (Oracle 12.1.0.1) . It  is available for download from the Oracle Software Cloud (formerly know as eDelivery) and  OTN (Oracle Tech Network) for 64bit linux and solaris  . Oracle 12c is not available for 32 bit .  Oracle has yet not released the AIX and Window database 12c s/w, hopefully will release soon . Here are links for download Oracle s/w. 

eDelivery          : Click here  to download from eDelivery .
OTN                  : Click here  to download from OTN .
Documentation : Click here  to download  document of 12c

There are some very exiting features in Oracle 12c Database .One of them is "Pluggable Database " which allows a  single Oracle database  instance to  hold  many other databases, allowing  for  more efficient  use of  system resources and easier management. I will be soon download and post about this features .

An official Oracle price list, which was updated Tuesday, showed a "multitenant" database option priced at $17,500 per processor. A processor license for the main  Enterprise  Edition  remained  priced at $47,500 per processor.


Enjoy    :-)