How to install Oracle 12C in a Linux environment
Hello i’m Kavindu Dulanjana and this blog contains all the necessary steps that should be followed in order to successfully install Oracle 12C in a Linux environment in a computer. For this process CentOs7 will be the Linux operating system that will be used and VMware Workstation will be used to run Linux Virtually. The first few steps include downloading of the requires sofwares so if you already have these softwares installed skip to STEP 3.
Download CentOS7 which is a free Linux operating system (make sure it supports GUI) and the Oracle 12C software for Linux operating systems (zipped). We can use this ISO to install it in a virtual machine.
Download and Open VMware Workstation and create a new virtual machine. We will be installing the CentOS7 operating system that we have downloaded earlier, to this virtual machine.
Once you start creating a new virtual machine, You will get the following messege. Run the Typical Installation method
Select the CentOs7 disk image that you have downloaded from the relevant location.
Provide a name for the virtual machine and a location for it to be installed. Next s et the disk space to 80Gb, RAM as 2GB and store it in a single location. Once its done press FINISH and power on the virtual machineand the installation will begin.
When the centOs7 installation window appears make the following changes.
1. Set the proper date and time
2. keyboard to English US
3. Software selection should be the server with GUI
4. The disk must be portioned as
a. Data /home 40GB
b. System /boot 4072MB
c. System/ 30GB
d. System Swap 4072MB
5. Enable network
Then click on Begin Installation
Once the installation is done, right click in the CentOs desktop and enter the Terminal and enter the following commands.
1. First switch to root by entering the command
su root and enter the root access password.
2. Then we must update the packages to the latest level. use the command
yum update -y
Then install the relevant packages and zipped and unzipped files by entering the
following command.
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
Once the process is complete create a new user account called Oracle by entering the following commands.
groupadd oinstall
groupadd dba
useradd -g oinstall -G dba oracle
Then use the command passwd oracle to set a password for the user account.
Insert the following kernel parameters into the sysctl.conf file.
First enter the following command vim /etc/sysctl.conf to enter the sysctl.conf file. Then enter the following parameters. Then press :x to save and exit fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 8329226240
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048586
Then apply the following Kernel parameters by entering the following comands.
Step 6:
Set the limits for Oracle in the limits.conf file. First enter the limits.conf file by entering the command vim /etc/security/limits.conf andthen enter the following values.
oracle soft nproc 2047 oracle hard nproc 16384 oracle soft nofile 1024 oracle hard nofile 65536
Step 7:
Copy the oracle file that you downloaded to CentOs. In my case I saved it in the Downloads folder.
Step 9:
Before proceeding to the installation the following directories must also be made. Use the following commands.
mkdir /u01 mkdir /u02
chown -R oracle:oinstall/u01
chmod g+s /u02
Step 10:
Now run the Oracle 12C installer by enter the following command ./runInstaller by right clicking on the database and entering the terminal.
Step 11:
After the required checkup the setup program will start. Here uncheck the ‘ I wish to receive security updated via my oracle support ‘ checkbox and continue.
Next in the installation options select ‘ create and configure database ‘ option.
In the typical installation window select the following locations, group, and database name and provide other relevant details accordingly, for installation.
Then after the filling the proper details the program will run the prerequisite checks and if compatible it will output the summary of details as follows.
Next you can click Install to start installation.
Once the installation reaches about 79% the setup will prompt you to enter certain scripts in the root user terminal therefore copy and paste the following scripts to execute them. Then go back to the installation window and press ‘OK’.
rpm -ivh http://linuxdownload.adobe.com/adobe-release/adobe-release-x86_64-1.0-1.noarch.rpm rpm — import /etc/pki/rpm-gpg/RPM-GPG-KEY-adobe-linux yum update
firewall-cmd — zone=public — add-port=1521/tcp — add-port=5500/tcp — add-port=5520/tcp — add-port=3938/tcp -permanent firewall-cmd -reload
TMPDIR=$TMP; export TMPDIR
Step 15:
export ORACLE_SID=DSAIT1936087
export PATH=$ORACLE_HOME/bin:$PATH
sqlplus / as sysdba
sqlplus / as sysdba startup exit Step 21: continue
startup
shutdown immediate
Now you installation is complete and if you have any questions feel free to contact me.
Originally published at https://kavindudulanjana.blogspot.com on February 5, 2021.