Monday, 5 December 2016

Oracle Database 12c Release 1 (12.1) On Oracle Linux 6 installation steps

Hi DBA-Mates,
As we all know the new database 12c has released, Below I have given important steps to install the 12c Database. If any points are not clear, please let us know. There are different ways also to install it. So, no be worried if any where you have any issue, just let us know we will be try to resolve it.

Step 1: Download the Software from below details:
Download the Oracle software from OTN or MOS depending on your support status.

OTN: Oracle Database 12c Release 1 (12.1.0.2) Software (64-bit).
                                  or
edelivery: Oracle Database 12c Release 1 (12.1.0.2) Software (64-bit)


Step 2: Unzip the files in same directory and give permissions to file and directory as 755 or 777
#unzip linuxamd64_12102_database_1of2.zip
#unzip linuxamd64_12102_database_2of2.zip


Step 3: Hosts File Settings:
The "/etc/hosts" file must contain a fully qualified name for the server. Edit hosts file as root user.
#vi /etc/hosts
192.168.1.19 ora-data.blogspot.com ora-data


Step 4: Prerequisites to Oracle Installation 
You can do either the Automatic Setup or the Manual Setup to complete the basics oracle prerequisites.And the Additional Setup is required for installations.
Automatic Setup:
If you are planning to use the "oracle-rdbms-server-12cR1-preinstall" package to perform all your prerequisite setup, then use below command.
(i) 
# yum install oracle-rdbms-server-12cR1-preinstall -y
You can install the packages using this above command and update also using the below command. Which may take time and for this there are some more extra network settings. So better go for manual steps as per my personal advice.
(ii) 
# yum update
Manual Setup:
(iii) If you are going through Manual steup, Please follow the below steps:
Add or amend the following lines in the "/etc/sysctl.conf" file.
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

Run the following command to effect the current kernel parameters settings.

# /sbin/sysctl -p
(iv) Add the following lines to this "/etc/security/limits.conf" file at the end of line.
oracle   soft   nofile    1024
oracle   hard   nofile    65536
oracle   soft   nproc    16384
oracle   hard   nproc    16384
oracle   soft   stack    10240
oracle   hard   stack    32768
(v) Next, you need to Install the following packages if they are not already present, or if you selected all the packages during Linux installations then no need to follow this point.
# From Public Yum or ULN
yum install binutils -y
yum install compat-libcap1 -y
yum install compat-libstdc++-33 -y
yum install compat-libstdc++-33.i686 -y
yum install gcc -y
yum install gcc-c++ -y
yum install glibc -y
yum install glibc.i686 -y
yum install glibc-devel -y
yum install glibc-devel.i686 -y
yum install ksh -y
yum install libgcc -y
yum install libgcc.i686 -y
yum install libstdc++ -y
yum install libstdc++.i686 -y
yum install libstdc++-devel -y
yum install libstdc++-devel.i686 -y
yum install libaio -y
yum install libaio.i686 -y
yum install libaio-devel -y
yum install libaio-devel.i686 -y
yum install libXext -y
yum install libXext.i686 -y
yum install libXtst -y
yum install libXtst.i686 -y
yum install libX11 -y
yum install libX11.i686 -y
yum install libXau -y
yum install libXau.i686 -y
yum install libxcb -y
yum install libxcb.i686 -y
yum install libXi -y
yum install libXi.i686 -y
yum install make -y
yum install sysstat -y
yum install unixODBC -y
yum install unixODBC-devel -y
(vi) Now, Create the new groups and add to users.
#groupadd dba
#useradd -g dba oracle

Set oracle user password:

(vii) Set the password for the "oracle" user from below command.
#passwd oracle

(viii) Change the nproc values in "/etc/security/limits.d/90-nproc.conf" file as described below.

# Change this
*        soft   nproc         1024
# To this
*        -        nproc         16384

(ix) Edit the "/etc/selinux/config" file, and mak sure the SELINUX flag is set as below.

SELINUX=permissive
Once the changes are completed, restart the server or run the following command.
# setenforce Permissive
(x) Disable the Linux firewall if it is enabled from following command.
# service iptables stop
# chkconfig iptables off
(xi) Now, create the directories in which the Oracle software will be installed and change owners and permissions as shown below.
mkdir -p /opt/oracle/product/12.1.0.2/db_1
chown -R oracle:dba /opt
chmod -R 775 /opt
(xii) if you are using putty session, Please check xclock is working or not.
Give command as:
$xclock
If not working then you need to set Display, I will post to set xclock in my next post with example and details. Till try this it may help you.
$DISPLAY=192.168.1.19:0.0; export DISPLAY

Step 5: Now Installation
launch the Oracle Universal Installer (OUI) by the following command in the database directory.
$./runInstaller
Proceed with the installation of your choice.
You can see the type of installation I performed by clicking on the links below:
Please read the steps as per choose as per your choice.
Configure Security Updates
My Oracle Support Credentials
Select Installation Type
System Class
Grid Installation Options
Select Install Type
Typical Install Configuration
Create Inventory
Perform Prerequisite Checks
Summary
Install Product
Execute Configuration Scripts
Oracle Database Configuration
Database Configuration Assistant
Database Configuration Assistant Complete
Finish
Database Express 12c Login

Note. The "Database Configuration Assistant Complete" screen will display Database Express 12c URL, which will be like "https://ora-data.blogspot.com:5500/em".

Step 6: Post Installation
(i) Now edit  ".bash_profile" file and add below lines at the end of the.
$vi .bash_profile
# Oracle Settings
export TMP=/tmp
export TMPDIR=$TMP

export ORACLE_HOSTNAME=192.168.1.19

export ORACLE_UNQNAME=ora-data
export ORACLE_BASE=/opt/oracle
export ORACLE_HOME=/opt/oracle/product/12.1.0.2/db_1
export ORACLE_SID=ora-data

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

(ii) Edit the "/etc/oratab" file as shown below:

Change this
orcl:/opt/oracle/product/12.1.0/dbhome_1:N
To this
orcl:/opt/oracle/product/12.1.0/dbhome_1:Y
Step 7: We can Startup the Database
$ echo $ORACLE_SID
$ echo $ORACLE_HOME
$ echo $PATH
$ sqlplus / as sysdba
SQL> startup
ORACLE instance started.
Total System Global Area 3340451840 bytes
Fixed Size                  2293880 bytes
Variable Size            1929383816 bytes
Database Buffers         1392508928 bytes
Redo Buffers               16265216 bytes
Database mounted.
Database opened.
SQL> select name,open_mode from v$database;
NAME            OPEN_MODE
---------           --------------------
ORA-DATA      READ WRITE


It’s a high level of steps, Please try this and let us know for any concerns.
Lets us know your comments below.
Some more useful link:
DATAGUARD Concepts and Setup

Regards,
ora-data Team

1 comment:

  1. Simply wish to say your article is as astonishing. The clarity in your post is simply great, and I could assume you are an expert on this subject. Same as your blog i found another one apex oracle .Actually I was looking for the same information on internet for Oracle APEX and came across your blog. I am impressed by the information that you have on this blog. Thanks a million and please keep up the gratifying work.

    ReplyDelete

Thank you for your comments and suggestions. It's good to talk you.