After the EC2 is built, run the below commands as root. Depending on the network security, you may have to either set or unset proxy variables.
/usr/bin/yum install -y binutils.x86_64 compat-libcap1.x86_64 compat-libstdc++-33.i686 \ compat-libstdc++-33.x86_64 gcc.x86_64 gcc-c++.x86_64 glibc-devel.i686 glibc-devel.x86_64 glibc.i686 \ glibc.x86_64 libXtst.x86_64 libXtst.i686 ksh.x86_64 libaio.x86_64 libaio.i686 libaio-devel.i686 \ libaio-devel.x86_64 libgcc.i686 libgcc.x86_64 libstdc++.x86_64 libstdc++.i686 libstdc++-devel.i686 \ libstdc++-devel.x86_64 libXi.i686 libXi.x86_64 make.x86_64 sysstat.x86_6
The above command will install all of the prerequisites required for the Oracle Client 12c .
Create the install group
/usr/sbin/groupadd oinstall
Create the dba group
/usr/sbin/groupadd dba
Create the oracle user and add to the groups
/usr/sbin/useradd -g oinstall -G dba oracle
Set the oracle password
passwd oracle
Respond to the above prompt with the oracle password that you want to use.
Make a directory for the software
mkdir /apps/opt/oracle
Change ownership of the directory to the oracle user and the oinstall group
chown oracle:oinstall /apps/opt/oracle
Change to oracle user
su - oracle
Copy the software into the above directory via ftp, sftp, scp etc. The directory will contain file
linuxamd64_12102_client.zip
Unzip the foftware
unzip linuxamd64_12102_client.zip
Change directory to the client directory that was unzipped.
cd /apps/opt/oracle/client
Run the installer in silent mode
./runInstaller -silent \ -responseFile /apps/opt/oracle/client/response/client_install.rsp \ oracle.install.client.installType=Runtime \ UNIX_GROUP_NAME=dba \ INVENTORY_LOCATION=/apps/opt/oracle/oraInventory \ SELECTED_LANGUAGES=en \ ORACLE_HOME=/apps/opt/oracle/base/rtclient64 \ ORACLE_BASE=/apps/opt/oracle/base \ waitForCompletion=true
At the end of the installation, you should see the message
The installation of Oracle Client 12c was successful. Please check '/apps/opt/oracle/oraInventory/logs/silentInstall2017-08-30_06-00-25PM.log' for more details
Exit from oracl back to root
exit
As a root user, execute the following script
/apps/opt/oracle/oraInventory/orainstRoot.sh
The above script will display messages similar to
Changing permissions of /apps/opt/oracle/oraInventory. Adding read,write permissions for group. Removing read,write,execute permissions for world. Changing groupname of /apps/opt/oracle/oraInventory to dba. The execution of the script is complete.
Set up environment variables for the oracle user. Go to the oracle user’s home
su - oracle cd
Edit the oracle users
vi .bash_profile
Setup the below variable to make it easier for the users to access sqlplus etc.
# Oracle client variables export ORACLE_HOME=/apps/opt/oracle/base/rtclient64 export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH PATH=$ORACLE_HOME/bin:$PATH which sqlplus
Test sqlplus
sqlplus user_id SQL*Plus: Release 12.1.0.2.0 Production on Wed Aug 30 18:23:27 2017 Copyright (c) 1982, 2014, Oracle. All rights reserved. Enter password: Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production With the Partitioning, Real Application Clusters, Automatic Storage Management, Oracle Label Security, OLAP, Data Mining and Real Application Testing options