This article explains how to install Oracle database 12cR1 on a linux machine running OEL 6 or RHEL 6 and also demonstrates database creation using database configuration assistant (DBCA).
(i) Operating system requirements:
$ cat /etc/redhat-release
(ii) Hardware requirements:
a) CPU with 64-bit architecture. Command to display the processor type is,
$ uname -m
Verify that the processor architecture matches the Oracle software release to install. If you do not see the expected output then you cannot install the software on this system.
b) At least 1.0 GB of physical RAM Oracle recommends 2GB for better performance. The Command to check to check amount of RAM installed on the machine is,
$ free -m (or) $ grep MemTotal /proc/meminfo
c) Swap size should be proportional to RAM size as follows,
|1-2||1.5 times RAM size|
|2-16||Equal to RAM size|
|More than 16||16 GB|
d) 1.0 GB of minimum free space in /tmp directory and maximum of 2TB free space. To check the amount of frees pace in /tmp,
df -Th /tmp
(iii) Software requirements:
a) The servers must be running kernel versions Oracle Linux 6 with the Unbreakable Enterprise kernel: 2.6.39- 200.24.1.el6uek.x86_64 or later, Red Hat Enterprise Linux 6: 2.6.32-71.el6.x86_64 or later. To check the version of the kernel, execute
$ uname -r (or) $cat /proc/version (or) $ uname -a
b) Check for following 64 bit RPMs. To check if any RPM is installed, use the following command
$ rpm –aq | grep <RPMname> (or) $ rpm -q <RPMname>
c) Install other required RPMs listed below. To install an RPM,
$ rpm -ivh <RPMname>
ksh <== any version of ksh is acceptable
d) If you want to install the 12.1 32-bit Client software, you should also install these packages
compat-libstdc++-33-3.2.3-69.el6 (i686)glibc-2.12-1.7.el6 (i686)glibc-devel-2.12-1.7.el6 (i686)libgcc-4.4.4-13.el6 (i686)
a) Modify your kernel settings in “/etc/syscconf” as follows. If the current value for any parameter is higher than the value listed in this table, do not change the value of that parameter.
kernel.shmall = physical RAM size
kernel.shmmax=1/2 of physical RAM.
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 6815744
fs.aio-max-nr = 1048576
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 = 1048576
As root user, execute “sysctl -p” to activate these new parameters.
b) Add the following settings to “/etc/security/limit.conf” where oracle is the username. This will limit the shell for the user performing RDBMS installation.
oracle soft nproc 2047
oracle hard nproc16384
oracle soft nofile 1024
oracle hard nofile 65536
oracle soft stack 10240
oracle hard stack 10240
(i) Download Oracle 12c R1 RDBMS 64-bit software for linux from www.oracle.com
(ii) Unzip the downloaded files
(iii) The “/etc/hosts” file must contain a fully qualified name for the server. Add the ip address and full hostname to /etc/hosts file in the following format
<IP-address> <fully-qualified-machine-name> <machine-name>
(iv) Create the new groups and users using following commands as root user.
# groupadd oinstall
# groupadd dba
# useradd -g oinstall -G dba,oper,asmadminoracle
# passwd oracle
To check whether the group is created, use the following command and check the entry after “inst_group”
$ grep dba /etc/group (or) $ more /etc/oraInst.loc
To determine whether the oracle user exists and belongs to the correct groups, enter the following command. If the oracle user exists, then this command displays information about the groups to which the user belongs.
$ id oracle
If the oracle user exists, but its primary group is not oinstall or it is not a member of the dba group then enter the following command
# usermod -g oinstall -G dba oracle
(v) Create required directories and change permissions using the following commands
# mkdir -p /u01/app/oracle/product/18.104.22.168
# chown -R oracle:dba /u01
# chmod -R 775 /u01
(vi) Now login as oracle user and start the Oracle universal installer (OUI) by using the following command in the database directory.
Proceed with the installation and the installation steps you encounter during installation are listed below.
- Configure Security Updates. Provide your oracle support email and password to receive updates on security threats.
- Choose “Install database software only” to install the RDBMS software and click next.
- Choose whether you want to install single instance database software or multiple instance (RAC) database software.
- Select the languages in which you want the RDBMS software to run and click next.
- Select the database edition you want to install and click next
- Give path for oracle base and software installation location and click next.
- Specify a directory for the location of installation metafiles called “inventory directory” and click next.
- Select the database administrator and database operator groups and click next
- OUI performs pre-installation check before installation. If any packages required by the installer install those packages before proceeding with the installation. The following screen will be displayed if there are no additional package or services requirement. Click on “Finish” at the bottom to proceed with the installation.
- Now, the installation process will start and progress is represented on the bar as shown
- At the end of the installation process you will be provided with scripts. Run the script as root user and click ok to proceed.
- Installation process is now complete. Click on “close” at the bottom of the screen to exit the OUI.
Creating a database using DBCA:
- Select create database option from menu. As the picture below displays, DBCA can also be used to configure database options, delete a database, or to manage templates.
- From this menu, select advanced mode and click next.
- Select the database template from the menu depending on your requirement and click on next to continue.
- You will be presented with a screen as be Enter the global database name and SID on their respective fields and click next.
- Check the box against “Configure Enterprise Manager (EM) Database Express” if you want to configure enterprise manager and create a listener first using NETCA before proceeding with enterprise manager configuration.
- Setup “SYS” and “SYSTEM” accounts by giving same or different passwords and click next. For security reasons, specifying different administrative passwords is advised.
- In the Listener section, if you want to create a listener you can you do that by checking the box before “Create New Listener” and giving required details. Otherwise, leave the box unchecked and click next to continue.
- Specify a storage type as “File System”, or “ASM” if you want to use automatic storage management. And choose a common storage location for saving datafiles or you can also use “Oracle Managed Files” (OMF) for saving your datafiles, controlfiles and onlinelogs. In this section, you can also enable fast recovery area by specifying fast recovery area location and the size. Or you can enable archiving by checking the box against “Enable Archiving”. After having chosen your preferred options, click next.
- You can configure database vault here or to skip to next step, click next.
- In the memory tab, give the value for “MemorySize” as per your requirement. You can choose either typical or custom for allocating memory sizes.
- In the “Character Sets” tab, choose database character set of your choice from the drop down menu.
- Switch to “Connection Mode” tab and select either dedicated server mode or shared server mode for your database and click next
- A confirmation dialog is shown as be Make sure the check box against create database is ticked and click “Next”.
- A summary page is shown listing all the parameters specified, database name, SID, names and locations of controlfiles, datafiles and redo log files and any custom scripts you specified to run after database creation. If you wish to make any changes, click cancel. Otherwise click “Finish” to start the database creation process.
- Database creation starts now and progress will be shown on the status bar as shown below on the status bar.
- After successful creation of database a dialog will be shown as below. Click exit to close DBCA.
- To connect to the instance, set the environment variable ORACLE_SID with SID name, as shown be Then connect to sqlplus to connect to the instance.
$ export ORACLE_SID=db2
Then connect to SQL*PLUS to connect to the instance.