installation of oracle 12c database on oracle … · web viewinstallation of oracle 12c database on...
TRANSCRIPT
Author – A.Kishore http://www.appsdba.info
ContentsInstallation of Oracle 12c database on Oracle Enterprise Linux – 6.7....................................................2
Oracle 12c Database Software.......................................................................................................2
Other Software’s required..............................................................................................................3
Oracle VirtualBox Software............................................................................................................4
Oracle Enterprise Linux 6.7 software..............................................................................................4
Oracle VirtualBox Installation.........................................................................................................6
Virtual Machine Setup..................................................................................................................10
Guest Operating System Installation............................................................................................17
Prepare Steps......................................................................................................................................34
Edit the “hosts” file of Linux1 ......................................................................................................35
Disable Firewall............................................................................................................................36
Install oracle-rdbms-server-11gR2-preinstall using yum..............................................................37
Create directories and grant permissions.....................................................................................40
Manual Setup...............................................................................................................................41
Additional Setup...........................................................................................................................44
Backup using VM..........................................................................................................................45
Oracle Installation...............................................................................................................................46
Windows sharing to Linux................................................................................................................46
Install Database............................................................................................................................50
Verify the installation...................................................................................................................59
Install Database – Non-Container-database (Advance)................................................................59
Install Database – Container Database(including Pluggable Database)........................................72
Author – A.Kishore http://www.appsdba.info
Installation of Oracle 12c database on Oracle Enterprise Linux – 6.7
Here is my setup, I have 32 GB Server with Windows 8 installed and with 2 TB HDD on which the installation was done. I have created 1 VMs using Oracle Virtual Machine.
Oracle 12c Database SoftwareOracle Database 12c Release 1 from OTN
http://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html
Windows 8 Server
32 GB RAM / 2 TB HDDLinux 6.7
4/8 GB RAM/200 GB
Author – A.Kishore http://www.appsdba.info
Oracle 12c client on Windows Desktop
Other Software’s requiredvnc viewer free version on windows
http://www.realvnc.com/cgi-bin/download.cgi?product=free4/vncviewer/win
Instructions -
http://www.appsdba.info/docs/oracle_apps/redhat/VNC_Doc.pdf
Winscp (free software) Copy files from windows to linux and vice versahttp://winscp.net/eng/download.php (this software we will use for ftp between windows and linux)Instructions - http://www.appsdba.info/docs/oracle_apps/redhat/WinSCP.pdf
Download putty.exe only Putty is used to maintenance of you Oracle databasehttp://www.chiark.greenend.org.uk/~sgtatham/putty/download.htmlInstructions - http://www.appsdba.info/docs/oracle_apps/redhat/PuTTY.pdf
Author – A.Kishore http://www.appsdba.info
Oracle VirtualBox Softwarehttp://download.virtualbox.org/virtualbox
Windows Users
http://download.virtualbox.org/virtualbox/5.0.0_RC3/VirtualBox-5.0.0_RC3-101436-Win.exe
Linux Users
http://download.virtualbox.org/virtualbox/5.0.10/VirtualBox-5.0-5.0.10_104061_el5-1.x86_64.rpm
Oracle Enterprise Linux 6.7 software
Download OEL 6.7 using below link
http://edelivery.oracle.com/linux
Select Oracle Linux Release 6 Update 7 Media Pack for x86 (64 bit), Click Continue.
Author – A.Kishore http://www.appsdba.info
V77197-01.iso
Note:, if you want to Install Linux on a new Server, you need to burn them using the image option available with your cd-writer software, if you are using Oracle VM u may not needRefer: http://www.petri.co.il/how_to_write_iso_files_to_cd.htm
Author – A.Kishore http://www.appsdba.info
Oracle VirtualBox Installation
Install the VirtualBox-5.0.6-103037-Win.exe version on the Windows host machine
or
rpm -Uvh VirtualBox-5.0-5.0.2_102096_el5-1.x86_64.rpm on Linux box
Author – A.Kishore http://www.appsdba.info
Author – A.Kishore http://www.appsdba.info
Author – A.Kishore http://www.appsdba.info
Author – A.Kishore http://www.appsdba.info
Virtual Machine Setup
Start - Oracle VM VirtualBox (on windows)
Go to System Tools – Oracle VM VirtualBox (On linux)
Start VirtualBox and click the "New" button on the toolbar. Click the "Next" button on the first page of the Virtual Machine Wizard.
Author – A.Kishore http://www.appsdba.info
Author – A.Kishore http://www.appsdba.info Enter the name "linux1", OS "Linux" and Version "Oracle (64 bit)", then click the "Next" button.
Author – A.Kishore http://www.appsdba.info
Author – A.Kishore http://www.appsdba.info
Author – A.Kishore http://www.appsdba.info
The "linux1" VM will appear on the left hand pane. Scroll down the "Details" tab on the right and click on the "Network" link.
Make sure "Adapter 1" is enabled, set to "Bridged Adapter" and "eth0",
Author – A.Kishore http://www.appsdba.info
Author – A.Kishore http://www.appsdba.info The virtual machine is now configured so we can start the guest operating system installation.
Guest Operating System Installation
Click on General->Advanced and change shared clipboard to Bidirectional and Change Drag ‘n’ Drop to Bidirectional and click Ok
In the storage section, select the OEL6.7 iso file
Author – A.Kishore http://www.appsdba.info
Start the virtual machine by clicking the "Start" button on the toolbar. The resulting console window will contain the Oracle Linux boot screen.
Author – A.Kishore http://www.appsdba.info
Author – A.Kishore http://www.appsdba.info
Author – A.Kishore http://www.appsdba.info
Scroll Down and click NEXT
Select basic Storage and click Next
Select Discard any Data
Author – A.Kishore http://www.appsdba.info
Author – A.Kishore http://www.appsdba.info
Author – A.Kishore http://www.appsdba.info
Give password for root
Select Replace Existing Linux
Author – A.Kishore http://www.appsdba.info
Select Write Changes to disk
Select Database Server option and select Customize now and Click Next
Author – A.Kishore http://www.appsdba.info
Author – A.Kishore http://www.appsdba.info
Author – A.Kishore http://www.appsdba.info Select Tiger VNC
Select options as below for Desktop and Click Next
Author – A.Kishore http://www.appsdba.info
Click Yes
Reboot the Guest Machine
Author – A.Kishore http://www.appsdba.info
Author – A.Kishore http://www.appsdba.info
Author – A.Kishore http://www.appsdba.info
Prepare Steps
First of all check whether we can connect to the internet or not
ping www.google.com
PING www.google.com (74.125.130.103) 56(84) bytes of data.
64 bytes from sb-in-f103.1e100.net (74.125.130.103): icmp_seq=1 ttl=46 time=63.4 ms
64 bytes from sb-in-f103.1e100.net (74.125.130.103): icmp_seq=2 ttl=46 time=63.5 ms
64 bytes from sb-in-f103.1e100.net (74.125.130.103): icmp_seq=3 ttl=46 time=62.2 ms
Author – A.Kishore http://www.appsdba.info
Edit the “hosts” file of Linux1 .Follow the below steps on linux1
vi /etc/hosts
# Do not remove the following line, or various programs# that require network functionality will fail.127.0.0.1 localhost.localdomain localhost192.168.1.18 linux1.appsdba.info linux1
Verify
ping linux1
PING linux1.appsdba.info (192.168.1.18) 56(84) bytes of data.
64 bytes from linux1.appsdba.info (192.168.1.18): icmp_seq=1 ttl=64 time=0.044 ms
64 bytes from linux1.appsdba.info (192.168.1.18): icmp_seq=2 ttl=64 time=0.047 ms
64 bytes from linux1.appsdba.info (192.168.1.18): icmp_seq=3 ttl=64 time=0.022 ms
Author – A.Kishore http://www.appsdba.info
Disable FirewallNow we need to disable the firewall: Linux Main menu | System | Administration | Firewall. Click on “Disable” icon, then on “Apply”.
Click on "Disable" icon, then on "Apply".
Author – A.Kishore http://www.appsdba.info
Install oracle-rdbms-server-11gR2-preinstall using yum
yum install oracle-rdbms-server-12cR1-preinstall -y
Identify the IP address and make it static
Author – A.Kishore http://www.appsdba.info
Author – A.Kishore http://www.appsdba.info You need to start the network using below command
Service network restart
Create directories and grant permissions
mkdir -p /u01/app/oraclechown -R oracle:oinstall /u01/app/chmod -R 775 /u01/app/oraclechown oracle:oinstall /u01/app/oracle
Create an environment file
su - oracle
cat > oracle.env
ORACLE_UNQNAME=cdb1; export ORACLE_UNQNAMEORACLE_BASE=/u01/app/oracle; export ORACLE_BASEORACLE_HOME=$ORACLE_BASE/product/12.1.0/db_1; export ORACLE_HOMEORACLE_SID=cdb1; export ORACLE_SIDPATH=/usr/sbin:$PATH; export PATHPATH=$ORACLE_HOME/bin:$PATH; export PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATHCLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH
Author – A.Kishore http://www.appsdba.info
Manual Setup
If you have not used the "oracle-rdbms-server-12cR1-preinstall" package to perform all prerequisites, you will need to manually perform the following setup tasks.
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 change the current kernel parameters.
/sbin/sysctl -p
Add the following lines to the "/etc/security/limits.conf" file.
oracle soft nofile 1024
oracle hard nofile 65536
oracle soft nproc 16384
oracle hard nproc 16384
oracle soft stack 10240
oracle hard stack 32768
Author – A.Kishore http://www.appsdba.info
Install the following packages if they are not already present.
# 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
Author – A.Kishore http://www.appsdba.info
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
Create the new groups and users.
groupadd -g 54321 oinstall
groupadd -g 54322 dba
groupadd -g 54323 oper
#groupadd -g 54324 backupdba
#groupadd -g 54325 dgdba
#groupadd -g 54326 kmdba
#groupadd -g 54327 asmdba
#groupadd -g 54328 asmoper
#groupadd -g 54329 asmadmin
useradd -u 54321 -g oinstall -G dba,oper oracle
Author – A.Kishore http://www.appsdba.info
Additional Setup
The following steps must be performed, whether you did the manual or automatic setup.
Set the password for the "oracle" user.
passwd oracle
Amend the "/etc/security/limits.d/90-nproc.conf" file as described below. See MOS Note [ID 1487773.1]
# Change this
* soft nproc 1024
# To this
* - nproc 16384
Set secure Linux to permissive by editing the "/etc/selinux/config" file, making sure the SELINUX flag is set as follows.
SELINUX=permissive
Once the change is complete, restart the server or run the following command.
# setenforce Permissive
Author – A.Kishore http://www.appsdba.info Backup using VM
Author – A.Kishore http://www.appsdba.info
Oracle Installation
Windows sharing to Linux
In this topic we shall see how to share a windows folder and access it in Linux
1> Share a folder in Windows
Author – A.Kishore http://www.appsdba.info
Author – A.Kishore http://www.appsdba.info
Windows IP address 192.168.1.9 and USER is the user in the windows 7/8
Now login to Linux and access all the shared folder on Windows
smbclient -L 192.168.1.9 -U USER
Create a directory in linux and mount it
mkdir -p /software
mount -o username=USER //192.168.1.9/database /software
Author – A.Kishore http://www.appsdba.info run vncserver on the Guest machine
From windows machine using vncviewer
Author – A.Kishore http://www.appsdba.info
Install Database
Let’s install the Oracle Database
Run the environment file – oracle.env
Author – A.Kishore http://www.appsdba.info
Author – A.Kishore http://www.appsdba.info
Author – A.Kishore http://www.appsdba.info
Author – A.Kishore http://www.appsdba.info
Author – A.Kishore http://www.appsdba.info
Author – A.Kishore http://www.appsdba.info
Author – A.Kishore http://www.appsdba.info
Author – A.Kishore http://www.appsdba.info
Author – A.Kishore http://www.appsdba.info
https://linux1.appsdba.info:5500/em
Verify the installation
[oracle@linux1 ~]$ . ./oracle.env[oracle@linux1 ~]$ sqlplus "/as sysdba"
SQL*Plus: Release 12.1.0.2.0 Production on Mon Jan 29 16:45:42 2018
Copyright (c) 1982, 2014, Oracle. All rights reserved.
Author – A.Kishore http://www.appsdba.info
Connected to:Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit ProductionWith the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
SQL> select name from v$database;
NAME---------CDB1
Install Database – Container Database(including Pluggable Database)
In Oracle Database 12c Release 1 the concept of multitenant environment has been introduced. The multitenant architecture enables an Oracle database to function as a multitenant container database (CDB) that includes zero, one, or many customer-created pluggable databases (PDBs). A PDB is a portable collection of schemas, schema objects, and nonschema objects that appears to an Oracle Net client as a non-CDB. All Oracle databases before Oracle Database 12 were non-CDBs.
A CDB includes the following components:
Root
The root, named CDB$ROOT, stores Oracle-supplied metadata and common users. An example of metadata is the source code for Oracle-supplied PL/SQL packages. A common user is a database user known in every container. A CDB has exactly one root.
Seed
The seed, named PDB$SEED, is a template that you can use to create new PDBs. You cannot add objects to or modify objects in the seed. A CDB has exactly one seed.
PDBs
A PDB appears to users and applications as if it were a non-CDB. For example, a PDB can contain the data and code required to support a specific application. A PDB is fully backward compatible with Oracle Database releases before Oracle Database 12c.
Author – A.Kishore http://www.appsdba.info Each of these components is called a container. Therefore, the root is a container, the seed is a container, and each PDB is a container. Each container has a unique container ID and name within a CDB.
References:http://www.oracle-dba-online.com/
http://www.oraclealchemist.com/news/install-oracle-12c-12-1/
http://db.geeksinsight.com/dbahelper/oracle-12c-interview-question-answers/
https://oracle-base.com/articles/12c/oracle-db-12cr1-installation-on-oracle-linux-6#Installation