How to Install Oracle Database 12C on AWS EC2 Instance?

Avatar admin | October 6, 2020 2 Views 0 Likes 0 Ratings

2 Views 0 Ratings Rate it

In this tutorial, we’ll show you how to avoid all those struggles by using a free Oracle instance on
Amazon Aws in a few minutes.

Our team was in charge to create a new Oracle database in our Linux machine to make some tests in our application.

The problem was, we had lots of priorities and never had time to create our new database.

So we found out that, there was a to create an Oracle DB on AWS in a few minutes with Amazon RDS. With a few clicks, we can have our database available in some minutes.

You can see in this tutorial how is it like.

Click the below link for all the commands and steps…

Step 1 – Edit Host Files – /etc/hosts localhost.localdomain localhost oracle_12C.localdomain oracle_12C

Step 2 – Edit Kernel Parameters /etc/sysctl.conf

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

sysctl -p – apply changes

Step 3 – Edit Limits file – etc/security/limits.conf

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

Step 4 – Install dependencies

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

Step 5 – Add Groups and Users

groupadd -g 54321 oinstall
groupadd -g 54322 dba
groupadd -g 54323 oper

useradd -u 54321 -g oinstall -G dba,oper oracle
passwd oracle

Step 6 – /etc/security/limits.d/90-nproc.conf

# Change this
* soft nproc 1024

# To this
* – nproc 16384

Step 7 – Set SELINUX


run the command after edit setenforce Permissive

Step 8 – Stop Firewall

# service iptables stop
# chkconfig iptables off

Step 9 – Create directories for oracle Installation

mkdir -p /oracle/product/12.1.0/db_1
chown -R oracle:oinstall /oracle
chmod -R 775 /oracle

Step 10 – xhost +

Step 11 – Edit bash profile for oracle user /home/oracle/.bash_profile

# Oracle Settings
export TMP=/tmp
export TMPDIR=$TMP

export ORACLE_HOSTNAME=oracle_12C.localdomain
export ORACLE_BASE=/oracle
export ORACLE_HOME=$ORACLE_BASE/product/12.1.0/db_1
export ORACLE_SID=db1

export PATH=/usr/sbin:$PATH

export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib

Step – 12 Extract Installation Files


Step – 13 Start the Oracle Universal Installer


Post Installation

dit the “/etc/oratab” file setting the restart flag for each instance to ‘Y’



2 Views 0 Ratings Rate it

Written by admin