How to Install & Configure Oracle Database 12c Enterprise Edition in Ubuntu 14.04 - Cloud Network

Networking | Support | Tricks | Troubleshoot | Tips

Buymecoffe

Buy Me A Coffee

Thursday, February 12, 2015

How to Install & Configure Oracle Database 12c Enterprise Edition in Ubuntu 14.04



Hello Everyone,

In this tutorial,

Step by Step Process
Let us Install Oracle Database 12c R1 Enterprise Edition on Ubuntu 14.10 – 64Bit

YOU CAN ALSO INSTALL  IN UBUNTU 15.04, DEBIAN - 64Bit


Note :- Completed Installation time take around 1hr or 2hr above. Depends upon Hardware configuration of your System.


AUCTION
Ubuntu-like Systems are Not in the List of Oracle 12c Database Supported. So you should Be Careful and Use It At Most for Development and Not As Production Database Server!

Download Oracle 12c R1 Database from Oracle Website for Linux :-
http://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html?ssSourceSiteId=ocomen

Hardware Requirements
1. For large-scale installation we need to use multicore processors with High availability.
2. Recommended minimum RAM needed for Oracle 12c is 2GB or more.
3. Swap must be enabled double the size of RAM.
4. Disk space must be more than 10GB, its depends on edition which are we going to choose for installing.
5. /tmp directory must have free space more than 1GB for error free installation.
6. Supported Linux operating systems are Linux Mint, Kubuntu, Debian.
7. Both x86_64 and i686 packages are required for installation.
8. Screen resolution must be more than 1024×768 resolution

Logging into ubuntu and Open Terminal
step1:- sudo apt-get update
step2:- sudo apt-get dist-upgrade
Restart the System (sudo reboot or sudo init 6)

step3:- sudo nano /etc/hosts  --- (To Edit Hosts File)
Eg :- <IP-address>  <fully-qualified-machine-name>  <machine-name>
        192.168.1.104   cloudnetwork.localdomain cloudnetwork

$uname –n  -- > to check machine name
$dnsdomainname -- > to check the localdomain
$arch -- > to check 32bit or 64bit of OS

Installation Dependencies
step4:-  sudo apt-get -y install alien binutils build-essential cpp-4.4
debhelper g++-4.4 gawk gcc-4.4 gcc-4.4-base gettext html2text lib32z1
lib32ncurses5 lib32bz2-1.0 intltool-debian ksh lib32bz2-dev lib32z1-dev
libaio-dev libaio1 libbeecrypt7 libc6 libc6-dev libc6-dev-i386
libelf-dev libelf1 libltdl-dev libltdl7 libmotif4 libodbcinstq4-1
libodbcinstq4-1:i386 libqt4-core libqt4-gui libsqlite3-0 libstdc++5
libstdc++6 libstdc++6-4.4-dev lsb lsb-core lsb-cxx lsb-desktop
lsb-graphics lsb-qt4 make odbcinst pax po-debconf rpm rpm-common sysstat
unixodbc unixodbc-dev unzip

Create New User and Groups
step5:- sudo addgroup oinstall
step6:- sudo addgroup dba
step7:- sudo addgroup nobody
step8:- sudo usermod -g nobody nobody
step9:- sudo useradd  -g oinstall -G dba -p password -d /home/oracle -s /bin/bash oracle
step10:- sudo mkdir /home/oracle
step11:- sudo chown -R oracle:dba /home/oracle

Create and Prepare location to install the oracle binaries
step12:- sudo mkdir -p /u01/app/oracle
step13:- sudo mkdir -p /u01/binaries
step14:- sudo chown -R oracle:dba /u01
step15:- sudo passwd oracle

some softlinks to start the Installation
step16 :-  echo 'Red Hat Linux release 6' | sudo tee -a  /etc/redhat-release
sudo mkdir /usr/lib64
sudo ln -s /etc /etc/rc.d
sudo ln -s /lib/x86_64-linux-gnu/libgcc_s.so.1 /lib64/
sudo ln -s /usr/bin/awk /bin/awk
sudo ln -s /usr/bin/basename /bin/basename
sudo ln -s /usr/bin/rpm /bin/rpm
sudo ln -s /usr/lib/x86_64-linux-gnu/libc_nonshared.a /usr/lib64/
sudo ln -s /usr/lib/x86_64-linux-gnu/libpthread_nonshared.a /usr/lib64/
sudo ln -s /usr/lib/x86_64-linux-gnu/libstdc++.so.6 /lib64/
sudo ln -s /usr/lib/x86_64-linux-gnu/libstdc++.so.6 /usr/lib64/

Run following command to shell configuration for oracle user
step17 :- sudo cp /etc/security/limits.conf /etc/security/limits.conf.original
echo "#Oracle 12C shell limits:" | sudo tee -a /etc/security/limits.conf
echo "oracle soft nproc 2048" | sudo tee -a /etc/security/limits.conf
echo "oracle hard nproc 16384"| sudo tee -a /etc/security/limits.conf
echo "oracle soft nofile 1024" | sudo tee -a /etc/security/limits.conf
echo "oracle hard nofile 65536" | sudo tee -a /etc/security/limits.conf

Run following command to change the kernel parameters
step18 :- echo "#" | sudo tee -a /etc/sysctl.conf
echo "# Oracle 12C entries" | sudo tee -a /etc/sysctl.conf
echo "fs.aio-max-nr=1048576" | sudo tee -a /etc/sysctl.conf
echo "fs.file-max=6815744" | sudo tee -a /etc/sysctl.conf
echo "kernel.shmall=2097152" | sudo tee -a /etc/sysctl.conf
echo "kernel.shmmni=4096" | sudo tee -a /etc/sysctl.conf
echo "kernel.sem=250 32000 100 128" | sudo tee -a /etc/sysctl.conf
echo "net.ipv4.ip_local_port_range=9000 65500" | sudo tee -a /etc/sysctl.conf
echo "net.core.rmem_default=262144" | sudo tee -a /etc/sysctl.conf
echo "net.core.rmem_max=4194304" | sudo tee -a /etc/sysctl.conf
echo "net.core.wmem_default=262144" | sudo tee -a /etc/sysctl.conf
echo "net.core.wmem_max=1048586" | sudo tee -a /etc/sysctl.conf
echo "kernel.shmmax=1073741824" | sudo tee -a /etc/sysctl.conf

Load new kernel parameters
Step19:- sudo sysctl -p

We need to do changes in start-up script -- Root
step20:-  mkdir /etc/rc.d
for i in 0 1 2 3 4 5 6 S
do sudo ln -s /etc/rc$i.d /etc/rc.d/rc$i.d
done

I have downloaded both the zip file and move to /u01/binaries. let check
step21:- cd /u01/binaries/
step22:- ls

Extract both the zip to start the installation. To unzip run,
step23:- unzip linuxamd64_12c_database_1of2.zip
step24:- unzip linuxamd64_12c_database_2of2.zip

You will see database folder after extracting the binaries
step25:- ls

Before doing the installation we need to give proper permission to the extracted file, to do the same run following command
step26:- chown -Rf oracle:dba /u01/binaries
or
chown -Rf oracle:oinstall /opt/oracle


Start installation using following command
step27:-   /u01/binaries/database
step28:-  ./runInstaller -ignoreSysPrereqs


How to Resolve Oracle database 12c Error During Post Installation Start

Remove this folder:
sudo rm -rf /u01/app/oracle/product/12.1.0/dbhome_1/lib/stubs

We will correct a lot of lib linking. Let’s create the necessary symlinks:
sudo su
sudo ln -s /u01/app/oracle/product/12.1.0/dbhome_1/lib/libclntshcore.so.12.1 /usr/lib/
sudo ln -s /u01/app/oracle/product/12.1.0/dbhome_1/lib/libclntsh.so.12.1 /usr/lib/
sudo ln -s /u01/app/oracle/product/12.1.0/dbhome_1/lib/libocrutl12.so /usr/lib
sudo ldconfig
exit

Now, we have to edit some shell scripts. Let’s begin with env_rdbms.mk located in
sudo gedit /u01/app/oracle/product/12.1.0/dbhome_1/rdbms/lib/env_rdbms.mk.

# Note the -lons added to the last line of block:
RMAN_LINKLINE=$(LINK) $(OPT) $(S0MAIN) $(SSKRMED) $(SKRMPT) \
$(LLIBDBTOOLS) $(LLIBCLIENT) $(LLIBSQL) $(LLIBPLSQL) \
$(LLIBSNLSRTL) $(LLIBUNLSRTL) $(LLIBNLSRTL) \
$(LLIBSLAX) $(LLIBPLSQL) $(LIBPLCN) $(LINKTTLIBS) -lons

# Note the -Wl,--no-as-needed added after each $(OPT):
EXTPROC_LINKLINE=$(LINK) $(OPT) -Wl,--no-as-needed $(EXTPMAI) $(PROD_EXTPROC_OPT) \
$(HSALIB_SUBSET1) $(HSALIB_SUBSET2)

HSDEPXA_LINKLINE=$(LINK) $(OPT) -Wl,--no-as-needed $(HSDEPMAI) $(HSALIB_SUBSET1)
$(HS_DEP_DRIVER) $(RDBMSLIB)$(XAD_OFF) \
$(HSALIB_SUBSET2)

HSOTS_LINKLINE=$(LINK) $(OPT) -Wl,--no-as-needed $(HSOTSMAI) $(HSALIB_SUBSET1) \
$(HS_OTS_DRIVER) $(HS_XASWITCH_ORA) $(RDBMSLIB)$(XAD_OFF) \
$(HSALIB_SUBSET2)

# Note the -Wl,--no-as-needed added after each $(S0MAIN):
KFOD_LINKLINE=$(LINK) $(S0MAIN)  -Wl,--no-as-needed $(SSKFODED) $(SKFODPT) $(KFODOBJ) \
$(LIBGENERIC) $(LLIBDBTOOLS) \
$(LIBGENERIC) $(LLIBSAGE) $(LLIBSKGXP) $(LIBCORE) \
$(CSSCLNTLIBS_SERVER) $(LLIBASMCLNT) $(LINKTTLIBS)

AMDU_LINKLINE=$(LINK) $(S0MAIN) -Wl,--no-as-needed $(SSKFMUED) $(SKFMUPT) \
$(LLIBDBTOOLS) $(LLIBCORE) $(LLIBGENERIC) $(LLIBUNLSRTL) \
$(LLIBNLSRTL) $(LLIBCORE) $(LLIBSAGE) $(LLIBSKGXP) \
$(LLIBNLSRTL) $(CSSCLNTLIBS_SERVER) $(LLIBASMCLNT) $(LINKTTLIBS)

KFED_LINKLINE=$(LINK) $(S0MAIN) -Wl,--no-as-needed $(SSKFEDED) $(SKFEDPT) \
$(LLIBDBTOOLS) $(LLIBSAGE) \
$(LLIBSKGXP) $(CSSCLNTLIBS_SERVER) $(LLIBASMCLNT) $(LINKTTLIBS)

# Note the -Wl,--no-as-needed added after $(ORACLE_LINKER):
ORACLE_LINKLINE=$(ORACLE_LINKER) -Wl,--no-as-needed $(PL_FLAGS) $(ORAMAI) $(SSORED) $(TTCSOI) \
$(ORACLE_KERNEL_LIBS) $(LINKLDLIBS)

It’s time to edit ins_rdbms.mk located in
sudo gedit /u01/app/oracle/product/12.1.0/dbhome_1/rdbms/lib/ins_rdbms.mk

# Note the additional linking at the end of each block (-lnnz12, -lagtsh, -lons):
$(ORAPWD) : $(ALWAYS) $(ORAPWD_DEPS)
$(SILENT)$(ECHO)
$(SILENT)$(ECHO) &quot; - Linking password utility (orapwd)&quot;
$(RMF) $@
$(ORAPWD_LINKLINE) -lnnz12

$(TG4PWD) : $(ALWAYS) $(TG4PWD_DEPS)
$(SILENT)$(ECHO)
$(SILENT)$(ECHO) &quot; - Linking $(TG4DG4)pwd utility&quot;
$(RMF) $@
$(TG4PWD_LINKLINE) -lnnz12

$(HSOTS) : $(ALWAYS) $(HSOTS_DEPS)
$(SILENT)$(ECHO)
$(SILENT)$(ECHO) &quot; - Linking HS OTS agent&quot;
$(RMF) $@
$(HSOTS_LINKLINE) -lagtsh

$(EXTPROC): $(ALWAYS) $(EXTPROC_DEPS)
$(SILENT)$(ECHO)
$(SILENT)$(ECHO) &quot;Linking external procedure agent ($@)&quot;
$(RMF) $@

$(EXTPROC_LINKLINE) -lagtsh
$(PLSHPROF) : $(ALWAYS) $(PLSHPROF_DEPS)
$(SILENT)$(ECHO)
$(SILENT)$(ECHO) &quot; - Linking hierarchical profiler utility (plshprof)&quot;
$(RMF) $@
$(PLSHPROF_LINKLINE) -lons

At last, edit ins_net_server.mk located in
sudo gedit /u01/app/oracle/product/12.1.0/dbhome_1/network/lib/ins_net_server.mk
# Note the additional linking at the end of the block (-lnnz12, -lons):
tnslsnr: $(S0NSGL) $(SNSGLP) $(NSGLPNP)
$(SILENT)$(ECHO) &quot; - Linking $(TNSLSNR)&quot;
$(RMF) $@
$(TNSLSNR_LINKLINE) -lnnz12, -lons

After all additions, Press the Retry Button.........................



For DISPLAY  Problem.....
Could not execute auto check for display colors using command /usr/X11R6/bin/xdpyinfo

Cause: Either the DISPLAY variable is not set, or the user running the
installation is not authorized to open an X window. This can occur if
you run the installation from a remote terminal, or if you use an su
command to change from a user that is authorized to open an X window to a
user account that is not authorized to open an X window on the display,
such as a lower-privileged user opening windows on the root user's
console display.

Action: Run the command echo $DISPLAY to ensure
that the variable is set to the correct visual or to the correct host.
If the display variable is set correctly then either ensure that you are
logged in as the user authorized to open an X window, or run the
command xhost + to allow any user to open an X window.

If you are logged in locally on the server console as root, and used the su -
command to change to the Oracle Grid Infrastructure installation owner,
then log out of the server, and log back in as the grid installation
owner.


Thanking You
Hope U Like it........