Hello Reader :), Welcome back to my Blog . In this post, we will learn how to install Oracle 12c on Redhat Linux Server. We will learn how to Install oracle 12c Release 2 on redhat linux in 3 different ways which will come handy to you when you are installing it at client site. We have explained the process in detail and Tried to be as descriptive as possible on how you will do Oracle 12c Release 2 installation on redhat linux at client side as well
Table of Contents
Introduction
When you are installing Oracle on Linux machine, you usually have 3 different ways to install it. I will add one bonus too ( But it goes well only with Oracle Home ). Here is the list of oracle 12c installation on Linux OS. I will tell you ->
1) How to Install Oracle 12c on Linux Using GUI
2) How to Install Oracle 12c on Linux using Response File ( Silent mode ) ( Command Line )
3) How to Install Oracle 12c on Linux using Command line ( Silent mode ) ( Command Line )
It’s always easy to install Oracle when you have GUI and you can see what’s happening straight through Graphically. But you will be at client location where you will not get GUI option. And you will be forced to go for option 2 or 3. Hence this tutorial.
Hint – For GUI, I have used mobaxterm and honestly it’s really easy to use.
Prerequisite
Lets start with prerequisite part, where you will require
First of all, you have to download the oracle software https://www.oracle.com/database/technologies/oracle12c-linux-12201-downloads.html
1) System Requirement – Server with Redhat Linux installed on it.
2) Software Requirement
3) Kernel Parameters, Soft and Hard Limit Parameters
4) User Creation
5) Disable Firewall and SElinux
6) Setting Profile for a user with Oracle Environmental Variables.
Lets get into details for all above listed points –
1) System Requirement – Server with Redhat Linux Installed –
Whenever you are at client side, we have a different team installing linux for you and releasing the server to a Oracle DBA to Install Oracle 12c Release 2. But when you are creating a test machine at home, You have to do it with Virtual Machine. If you are looking for how to install Linux on VMWARE or How to install Linux on Oracle Virtual Box. We tried to cover all the steps in details. It will be really easy for you as we have all steps followed by a Image.
If you are at client side, you might need to tell System Administrator about –
- OS version
Let me share Oracle Documents with you. These Documents will come handy for you when you are checking the certification Information about database. In simple language, Specific version of Oracle can be installed on a Specific version of OS. For Example Oracle 19c can be installed on AIX 7.1 or later, you can’t install on AIX 6.1 or so!
IBM AIX Certification Information for Oracle Database on IBM AIX on Power systems (Doc ID 1307544.1)
Linux Certification Information for Oracle Database on Linux x86 (Doc ID 1307056.1)
Sun Solaris Certification Information for Oracle Database on Oracle Solaris x86-64 (Doc ID 1307389.1) - Mount Point Details
A) 30 GB to 50 GB separate mount point. to install Oracle Software , Separate mount point for database files and archive log files)
B) /tmp should have enough space at least 1GB
Oracle Allows you to install Oracle 12c Release 2 on RHEL 6.4 or later
2) Software Requirement
Oracle requires specific packages to be installed on the system before you can go ahead with the Installation Part. Let me list all the packages for you.
binutils-2.20.51.0.2-5.11.el6 (x86_64)
compat-libcap1-1.10-1 (x86_64)
compat-libstdc++-33-3.2.3-69.el6 (x86_64)
compat-libstdc++-33-3.2.3-69.el6 (i686)
gcc-4.4.4-13.el6 (x86_64)
gcc-c++-4.4.4-13.el6 (x86_64)
glibc-2.12-1.7.el6 (i686)
glibc-2.12-1.7.el6 (x86_64)
glibc-devel-2.12-1.7.el6 (x86_64)
glibc-devel-2.12-1.7.el6 (i686)
ksh
libgcc-4.4.4-13.el6 (i686)
libgcc-4.4.4-13.el6 (x86_64)
libstdc++-4.4.4-13.el6 (x86_64)
libstdc++-4.4.4-13.el6 (i686)
libstdc++-devel-4.4.4-13.el6 (x86_64)
libstdc++-devel-4.4.4-13.el6 (i686)
libaio-0.3.107-10.el6 (x86_64)
libaio-0.3.107-10.el6 (i686)
libaio-devel-0.3.107-10.el6 (x86_64)
libaio-devel-0.3.107-10.el6 (i686)
libXext-1.1 (x86_64)
libXext-1.1 (i686)
libXtst-1.0.99.2 (x86_64)
libXtst-1.0.99.2 (i686)
libX11-1.3 (x86_64)
libX11-1.3 (i686)
libXau-1.0.5 (x86_64)
libXau-1.0.5 (i686)
libxcb-1.5 (x86_64)
libxcb-1.5 (i686)
libXi-1.3 (x86_64)
libXi-1.3 (i686)
make-3.81-19.el6
sysstat-9.0.4-11.el6 (x86_64)
Let me tell you how to configure and install using YUM
yum install -y binutils.x86_64 compat-libcap1.x86_64 gcc.x86_64 gcc-c++.x86_64 glibc.i686 glibc.x86_64 glibc-devel.i686 glibc-devel.x86_64 ksh compat-libstdc++-33 libaio.i686 libaio.x86_64 libaio-devel.i686 libaio-devel.x86_64 libgcc.i686 libgcc.x86_64 libstdc++.i686 libstdc++.x86_64 libstdc++-devel.i686 libstdc++-devel.x86_64 libXi.i686 libXi.x86_64 libXtst.i686 libXtst.x86_64 make.x86_64 sysstat.x86_64 zip unzip
OR
yum install -y oracle-database-server-12cR2-preinstall
Note -Use the
-y
option if you wantyum
to skip the package confirmation
3) Kernel Parameters, Soft and Hard Limit Parameters
Add following lines in the /etc/sysctl.conf file. ( You need to have root access to edit these files )
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
Once you added above lines and save the file. Fire following command from Root –>
sysctl -p
sysctl -a
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
4) User Creation
Usually you will ask to create a separate user for oracle binaries Because to keep your files safe from other users which are using this server. Following action will require root access –
groupadd -g 501 oinstall
groupadd -g 502 dba
groupadd -g 503 oper
groupadd -g 504 backupdba
groupadd -g 505 dgdba
groupadd -g 506 kmdba
groupadd -g 507 asmdba
groupadd -g 508 asmoper
groupadd -g 509 asmadmin
useradd -u 501 -g oinstall -G dba,oper,asmadmin,asmdba oracle
5) Disable Firewall and SElinux
SELinux -i.e Secure Linux can be modified through editing the /etc/selinux/config set “SELINUX=” as
SELINUX=permissive
How to disable Firewall -( Fire following commands using root )
service iptables stop
chkconfig iptables off
6) Setting Profile for a user with Oracle Environmental Variables.
Fire cd on your prompt and edit .bash_profile and add following –
cd
vi .bash_profile
export TMP=/tmp
export TMPDIR=$TMP
export ORACLE_BASE=<Base location>
export ORACLE_HOME=<oracle home location>
export ORACLE_SID=<oracle instance name>
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
Save the file and now with new session start the installation
How to Install Oracle 12c Release 2 on Redhat Linux Using GUI
We have completed all the pre-requisite part. We will start with what we were waiting for “How to Install Oracle 12c Release 2 on Redhat Linux”
Here We have downloaded the linux 64 bit 12.2.0.1 database binaries and transferred it to Server ( using WINSCP). Keep it in our mount point and unzip the same.
Once unzipped, go to database directory
And run ./runInstaller
It usually takes time to show up, if you are using mobaxterm/x11 remotely at your client site, the Oracle 12c logo and give us Step 1 GUI interface depending upon the network, your system configuration. But if you are using VMWARE/Virtual Machine at home, it should be instant.
Don’t chose anything and press next
Press Yes
Now you have 3 install options available on the screen
1.Create and configure a database – This includes Binaries installation and creation of a database.
2.Install database software only – This will only install the binaries. We usually chose this option as most of time requirement is of installing the binaries and later they will ask us to restore the database.
3.Upgrade an existing database – So if you want to upgrade the database which is running on lower version you can opt this option. We will learn it in details in database upgrade.
Since this is my test system, and I wanted to have a database also, I chose “create and configure a database” And press next.
Again you will have two option given –> Desktop class and Server Class
You can read the description and decide which to go for. However, we always select Server Class as we install it Server
Here we have option to chose what type of installation we want to perform –
Here we are creating single instance on file-system Hence we chose “Single instance database installation“.
We usually chose “Advanced install” since it gives good control on what we want.
We are going with Enterprise Edition. You need to check with client which edition they have license for.
It’s time to give oracle base and oracle home location.
Provide Oracle Inventory Location and group name for same.
Since I chose “Create and configure a database” it is asking type of database we want to create. Its for practice so I am going with “General Purpose.”
It’s time to fill database name and ORACLE SID
Here You have option to Enable Automatic Memory Management And control the memory which will be allocated to the database.
This is another option you should be careful about while creating the database. Make sure you chose character sets which application team asked for.
Sample Schemas – We usually don’t go for it because it’s security issue when you have it in your database, later client will ask you to expire and lock the user. So better not to install it.
Now it will ask for Oracle database datafile location. Since it’s a test machine I installed it on same mount point. But here is the catch, you should have a different mount point for Oracle database binaries, oracle datafiles and archive log files. This way you will have a better control over the growth of the database. Therefore, you know what location to check in type of error!
Here you had two option First File system another one is Oracle ASM. So if you have installed Oracle ASM standalone you could have chose to create database using that option. Because we don’t have Oracle ASM, we are going for file system.
If you want to configure Enterprise Manager, then you can provide the details of OMS here.
After that, we will have option to configure Recovery Area, which can be done later as well.
Here you have two option available You can set two different password for sys and system and that is how it should be. However since it is test machine I went for same password for all acccounts
We have given a simple password and it didn’t fulfill the recommendation standard given by oracle because of that we got an pop up. We ignore this for instance. however it’s recommended to have a hard password. ( Password which includes lower case – upper case letters ,Special characters and numbers )
Here you have option to segregate type of work one group of user should handle. Because of this only we created so many group so it will be easier for us for segregate things.
Here oracle will perform pre-requisite checks to make sure all are covered. In addition to this, software will give you chance to correct it if you missed out any of the prerequisite after starting the installation. However those prerequisite shouldn’t require restart of system to reflect the changes. In this case, you need to start all the steps again.
To show what happens if you miss prerequisite You can see it in below snapshot. We started the installation before doing any prerequisite.
Hard limit, Soft limit and OS Kernel Parameter are fixable. So here you can click on Fix and check again option. When you click on it, you will have additional script which needs to be executed with ROOT user.
Here how we executed the script.
We Fired Check Again. In addition to this, we did install all the packages which were missing earlier. And pressed next. You will end up on Summary page where you will have all the details you selected earlier. And click Install
Installation will take time, so you can take short break and come back.
Once it is done, you will have a new popup which will have scripts to be executed from ROOT.
Take root session, and execute the script one by one-
Second script –
Once you execute both the scripts, press OK. Wait for Installation to complete.
Finally Installation is completed.
How to Install Oracle 12c on Linux using Response File ( Silent mode ) ( Command Line )
Normal Command –
./runInstaller -silent -responseFile /oracledbworld/12cR2.rsp
When you want to Ignore Prerequisites.
./runInstaller -ignoreSysPrereqs -ignorePrereq -waitforcompletion -showProgress -silent -responseFile /oracledbworld/12cR2.rsp
Important Switches and their Explanation
-silent : Run in silent mode.
-responsefile : Informs runInstaller to use response file to start the Oracle 12c Release 2 installation
-ignoreSysPrereqs : Ignores the results of the system prerequisite checks..
-ignorePrereq : Ignore the general prerequisite.
-waitforcompletion : It waits for Oracle Installer to Complete.
-invPtrLoc : Used to specify the location of the oraInst.loc file, which in turn specifies the inventory details.
-force : Installation continues when a non-empty directory is used for the ORACLE_HOME.
How to Install Oracle 12c on Linux using Command line ( Silent mode ) ( Command Line ) ( Variation )
It’s same as silent installation using response file, however we pass additional values on $ prompt itself. which overwrites the value in response file.
./runInstaller -ignoreSysPrereqs -ignorePrereq -waitforcompletion -showProgress -silent \
-responseFile /oracle/database/response/db_install.rsp \
oracle.install.option=INSTALL_DB_SWONLY \
ORACLE_HOSTNAME=<HOSTNAME> \
UNIX_GROUP_NAME=oinstall \
INVENTORY_LOCATION=<ORA_INVENTORY> \
SELECTED_LANGUAGES=en \
ORACLE_HOME=<ORACLE_HOME> \
ORACLE_BASE=<ORACLE_BASE> \
oracle.install.db.InstallEdition=EE \
oracle.install.db.OSDBA_GROUP=oracledbworld\
oracle.install.db.OSBACKUPDBA_GROUP=oracledbworld \
oracle.install.db.OSDGDBA_GROUP=oracledbworld\
oracle.install.db.OSKMDBA_GROUP=oracledbworld\
oracle.install.db.OSRACDBA_GROUP=oracledbworld\
SECURITY_UPDATES_VIA_MYORACLESUPPORT=false \
DECLINE_SECURITY_UPDATES=true
This way we finished the Installation part of Oracle 12c Release 2 on Redhat Linux. Let us know if you are looking for any specific tutorial. Keep reading Happy Learning 🙂