Configuration Details:
Database: Oracle DB 12.1.0.2 EE 64 Bit
Operating System: Oracle Enterprise Linux 6.3 64 Bit
Single Instance/RAC: Single Instance
Pluggable(PDB/CDB): No
Points to be checked before starting installation prerequisites:
1) Am I downloading Oracle DB software of correct version?
2) Is my database certified on current Operating System ?
3) Is database software architecture 32 bit or 64 bit ?
4) Is Operating System architecture 32 bit or 64 bit ?
5) Are Database and Operating System from same architecture ?
6) Is Operating System Kernel Version compatible with Oracle Database version to be installed ?
Minimum Configuration Required for installation(You can add more resources later as per requirement):
- RAM - 2 GB
- CPU - 1
- /oracle - 20 GB
- /tmp - 1 GB
Installation Type
|
Disk Space for Software Files
|
Enterprise Edition
|
6.4 GB
|
Standard Edition
|
6.1 GB
|
Standard Edition One
|
6.1 GB
|
Standard Edition 2
|
6.1 GB
|
RAM
|
Swap Space
|
Between 1 GB and 2 GB
|
1.5 times the size of RAM
|
Between 2 GB and 16 GB
|
Equal to the size of RAM
|
More than 16 GB
|
16 GB
|
Step 1: Perform below prerequisites before installing Oracle Software.
- Server should be started in runlevel 3 or runlevel 5.
[oracle@rac1 ~]$ who -r
run-level 5 2021-07-14 09:40
- Ensure minimum 2 GB RAM is free on server.
[oracle@rac1 ~]$ cat /proc/meminfo | grep Mem
MemTotal: 3924412 kB
MemFree: 3369544 kB
- Ensure minimum 10 GB Hard Disk space is free on server for software installation (Disk space for Oracle Software is based on the Oracle Database edition).
Filesystem Type Size Used Avail Use% Mounted on
/dev/mapper/vg_rac1-lv_root
ext4 50G 21G 26G 45% /
- Ensure kernel and limits parameters set correctly on server.
[oracle@rac1 ~]$ tail -10f /etc/sysctl.conf
kernel.shmmax = 2009298944
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
[oracle@rac1 ~]$ tail -10f /etc/security/limits.conf
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
oracle soft stack 10240
oracle hard stack 32768
- Ensure Firewall is disabled.
#service iptables status
#service iptables stop
#service iptables disable
- Ensure SELINUX is disabled.
[oracle@rac1 ~]$ cat /etc/selinux/config
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
#SELINUX=enforcing
SELINUX=disabled
# SELINUXTYPE= can take one of these two values:
# targeted - Targeted processes are protected,
# mls - Multi Level Security protection.
SELINUXTYPE=targeted
- Create user (e.g. oracle) and primary group (i.e. oinstall) on server.
You can create user and assign primary & secondary group in one command OR you can use two different commands to create user and assign primary & secondary group.
e.g.
Group Creation:
#groupadd oinstall
#groupadd dba
User creation and Group assignment:
#useradd -g oinstall -G dba oracle
#passwd oracle
OR
#useradd oracle
#usermod -g oinstall -G dba oracle
#passwd oracle
- Create Oracle Home directory structure on server and change ownership to oracle:oinstall and give permission.
#mkdir -p /u01/app/oracle
#chown -R oracle:oinstall /u01/app/oracle OR chown -R #oracle.oinstall /u01/app/oracle
#chmod -R 755 /u01/app/oracle
Note: No need to create full Oracle Home path since Installer will automatically create that.
Create inventory location and owner of the inventory should be primary group i.e. oinstall. Oracle will automatically assign oinstall and read-write permissions to this directory post installation by root.sh script.
- Download Oracle Database 12.1.0.2 Software setup for Linux 86_64 bit from Oracle Edelivery Site https://edelivery.oracle.com/ and upload on target server. (Refer next steps to know how to download software from Edelivery site.
- Unzip the setup and start runInstaller using oracle user.
- The following packages (or later versions) must be installed before installation:
- 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)
Step 2: Download Virtual Box Software and configure virtual environment.
Go to google and type "Download virtual box for windows 64 bit".
Click on VirtualBox.exe file and complete installation steps.
You will get below pop-up box while installing VritualBox, click on "Install" to continue.
VirtualBox screen will look like below screen. Now its time to create an configure Linux environment. You have two options, one you have existing Linux VDI and second, you don't have. I have ready VDI of installed Linux which i will use here. If you want to install and configure new Linux OS then refer my existing blog https://rupeshanantghubade.blogspot.com/2018/06/how-to-install-and-configure-oracle_7.html where, i have mentioned steps to install and configure Linux Setup.
Follow below steps to attach existing Linux VDI.
Go to machine=>new or add =>Locate Linux OS VDI file.
Name: It can be anything
Machine Folder: Keep as it is
Type: Linux
Version: Oracle(64 Bit)
I have added 4096 RAM for better performance.
If you don't have installed VDI then you can create second option "Create a virtual hard disk now" and if you have installed VDI setup like me then use 3rd option "Use and existing virtual hard disk file".
I have below Linux OS installed VDIs. Select 6.3 VDI.
See below screen, your VDI is ready. I have already completed OS related tasks in installed VDI.- User and Group creation
- Directory creation and permissions
- RPM Installation
- Kernel and limits parameter configuration
- IP and Network configuration
See below screenshot and make necessary changes.
Start VDI machine and login as oracle user.
Make below changes to copy/paste from your desktop machine to VDI machine and vice-versa i.e. bi-directional.
Right click and open terminal.
Make changes in network settings.
Click on red highlighted box.
Make necessary changes in below configuration files:
- /home/oracle/.bash_profile (Run . .bash_profile or source .bash_profile command after adding environment variables).
- /etc/selinux/config
- Stop firewall
- /etc/security/limits.conf files
- /etc/sysctl.conf (Use sysctl -p command after adding parameters)
Step 3: Download Oracle Database Software from Edelivery site.
Now its time to upload downloaded software to target DB server. Go to the location where you downloaded the setup. In Virtual Box, you can make this download folder as shared folder. Please follow below steps to create shared folder. Stop the virtual machine and create shared folder.
Start the Virtual Machine and see, shared folder "sf_Oracle_SharedFolderName" is visible on desktop.
Step 4: Go to the directory where setup files are located. Copy these setup files to the different location on server which is owned by oracle user, unzip the same, and start the installation.
Go to setup_loc/database and start runInstaller. We will choose "select software only" option for now and will create database later.
Un-check security updates and click YES to continue.
Select "Install database software only" option since we will create DB later.
select "Single Instance Database Installation" option to continue.
Select "Enterprise Edition" to continue. You can select edition option based on your requirement.
Now see, you have already created ORACLE_BASE location as "/u01/app/oracle" and Installer will automatically create ORACLE_HOME location as "/u01/app/oracle/product/12.1.0.2/db_1 inside ORACLE_BASE. You can still create your own ORACLE_HOME location, but ORACLE_HOME should be under ORACLE_BASE.
Below location is Oracle Inventory location and it should be under ORACLE_BASE. This is also called as Central or Global Inventory. See the inventory group is oinstall which is primary group and owner of the inventory is oracle who should have write permissions on this directory.
Now, assign group membership as per operating system groups. Oracle 12c introduced these extra groups as a role separation. I have created only two group oinstall and dba. Please find description for all groups.
OSDBA: Members of this group are granted SYSDBA system privileges for all Oracle Databases installed on the server.
OSOPER: Members of this group are granted SYSOPER system privileges for all Oracle Databases installed on the server. This group does not have any members after installation, but you can manually add users to this group after the installation completes.
OSBACKUPDBA: Members of this group have privileges necessary for performing database backup and recovery tasks on all database instances that run from the specified Oracle Home directory.
OSDGDBA: Members of this group have privileges necessary for performing Data Guard administrative tasks on all database instances that run from the specified Oracle Home directory.
OSKMDBA: Members of this group have privileges necessary for performing encryption key management tasks on all database instances that run from the specified Oracle Home directory.
I have selected oinstall group for all below OS groups. It is recommended to select separate OS group for mentioned group.
Now, prerequisites screen shill appear and it will let us know in case of any issue. See missing kernel and limits parameters appeared on below screen which i missed. Correct the same,save the respective files and click on "Check again" tab.
Now, everything is fine and next summary screen appeared. Verify all these settings before proceeding. Click on Install to continue.
You will get below pop-up box for executing orainstRoot.sh and root.sh script. For this, you have to open new terminal by root user and execute orainstRoot.sh script first and then root.sh script.
orainstRoot.sh: This is located in /u01/app/oraInventory/orainstRoot.sh
This will change permissions of Oracle Inventory location, add read,write permissions for inventry group i.e. oinstall, and remove read,write, execute permissions for world.
root.sh: /u01/app/oracle/product/12.1.0.2/db_1/root.sh
This script will copy oraenv and coraenv
This script will perform below tasks:
- Sets environment variables ORACLE_OWNER and ORACLE_HOME.
- Copies dbhome,oraenv,coraenv files to /usr/local/bin directory.
- Creates /etc/oratab file and entries will get added when you will create database using DBCA method only. Note that if you create database manually then DB entry will not be added into this file, instead you have to manually add it.
The oraenv and coraenv scripts are created during installation. These scripts set environment variables based on the contents of the oratab file.
You may find yourself frequently adding and removing databases from the development system or your users may be switching between several different Oracle Databases installed on the same system. You can use the oraenv or coraenv script to ensure that user accounts are updated and to switch between databases.
The oraenv or coraenv script is usually called from the user's shell startup file (for example, .profile or.login). It sets the ORACLE_SID and ORACLE_HOME environment variables and includes the $ORACLE_HOME/bin directory in the PATH environment variable setting. When switching between databases, users can run the oraenv or coraenv script to set these environment variables.
Once above root scripts are executed then click OK to continue.
You have successfully installed Oracle Database Software. Click on Close to finish.
You can verify Oracle Binaries, Inventory, processes now.
Step 5: Now create database by dbca command. Set environment variables manually or source .bash_profile file otherwise you have to go to ORACLE_HOME location and execute ./dbca command to start Database Configuration Assistant Wizard.
Create database directories to store data files ,redo log files,control file, etc otherwise installer will automatically create these files in default location "ORACLE_BASE/oradata".
You can use typical method or advanced method to create DB. I have used advanced method. Click on Advanced Mode to continue.Click on "General Purpose For Transaction Processing" option to continue. Please refer screenshot for more details about General Purpose Transaction Processing.
This is non-container database. Just type Global Database Name and SID only.
Un-tick below both options and click next to continue.
You can use common password for both SYS and SYSTEM users or use separate password.
You can create listener by this GUI method if you want. I am not selecting this since i will create this later manually.
Select below option to proceed as per your requirement and click next to continue. I have used below directories for database files:- Data Files: /u01/db/data
- Redo Log Files: /u01/db/redo
- Control Files: /u01/db/control
Select "Sample Schemas" option if you want. If you want to use Oracle Label Security and Database Vault options then tick the same. I have not used both these options here.
Now adjust memory parameters,character sets, connection mode as per you requirement. Refer screenshots for more details about character sets.
Click on "All Initialization Parameters" option to check and edit all parameters. Click next to continue.
Select create database option and click next to continue.
Review DB creation summary and click FINISH to continue. You can monitor activity.log and alert.log during db creation.
You can still edit password management.
Click OK and Close to finish the DB creation task.
You have successfully create database using DBCA method. Now you can verify data files, redo log files, control files, memory parameters, etc.
You have successfully installed and configure Oracle Database on Linux 6.3 64 Bit.
Please comment if you like this post.
-----------
Thanks and regards,
Rupesh
Thank you for your comment !