In this blog I will discuss how to install Oracle database 12c on the Oracle Linux environment.
a. Pre-requisite check of your system step by step before beginning installation:
- Server Requirement minimum for production environment: > 8 Cores and > 64 GB RAM
Useful linux command:
uname –a [check os kernel]
uame –m [check processor]
uname –r [check version]
Cat /proc/version — linux version check
grep MemTotal /proc/meminfo
grap SwapTotal /proc/meminfo or cat /proc/meminfo | grep SwapTotal
[ 1 GB and 2 GB = 1.5 times of the RAM, 2 GB and 16 GB = equal to RAM size, >16GB = 16 GB]
df –h /dev/shm [share memory info]
df –h /tmp [disk space available check ]
du -sh usr [specific user disk space check]
- Storage Capacity : Recommendation dedicated Storage system : SAN /NAS/ASM, Avoid Local Disk File system
- Host Name Resolved such as DNS name or local host name
#hostname
Location to check /etc/hosts by the following comment: cat /etc/hosts
Edit host file using the following command: vi /etc/hosts [insert new line- press i, save: w, quit :q]
<IP-address> <fully-qualified-machine-name> <machine-name>
Example: 192.168.1.14 graphit.com oracle-linux
- Operating system configuration
Install the oracle pre-requisite RPM
#yum install oracle–rdbms–server–12cR1–preinstall –y [this command will take care all RPM dependency if you install 12c on Oracle Linux, otherwise you need to install all pre-requisite RPM for other Linux Version ]
list of RPM packages for other Linux Server:
yum install binutils -y
yum install compat-libcap1 -y
yum install compat-libstdc++-33 -y
yum install compat-libstdc++-33.i686 -y
yum install gcc -y
yum install gcc-c++ -y
yum install glibc -y
yum install glibc.i686 -y
yum install glibc-devel -y
yum install glibc-devel.i686 -y
yum install ksh -y
yum install libgcc -y
yum install libgcc.i686 -y
yum install libstdc++ -y
yum install libstdc++.i686 -y
yum install libstdc++-devel -y
yum install libstdc++-devel.i686 -y
yum install libaio -y
yum install libaio.i686 -y
yum install libaio-devel -y
yum install libaio-devel.i686 -y
yum install libXext -y
yum install libXext.i686 -y
yum install libXtst -y
yum install libXtst.i686 -y
yum install libX11 -y
yum install libX11.i686 -y
yum install libXau -y
yum install libXau.i686 -y
yum install libxcb -y
yum install libxcb.i686 -y
yum install libXi -y
yum install libXi.i686 -y
yum install make -y
yum install sysstat -y
yum install unixODBC -y
yum install unixODBC-devel -y
now, i installed all packages
rpm -q package name [ checking package install or not!]
rpm –qa /grep -i package name
ls -l /grep package name
rpm –ivh package name [for installation ]
- Create oracle user name and group in the OS level before installation of Database system which is given the user OS level authentication and privilege to perform installation
Su – [ login to root user]
#groupadd –g oinstall [primary group]
#groupadd –g dba [or groupadd –G dba for secondary group]
$ egrep -i “oracle” /etc/group [ display user group]
#/usr/sbin/usermod -g oinstall -G dba oracle [change group for user]
useradd –g oinstall –G dba oracle [ oinstall is the primary group and dba is the secondary group for the user oracle]
#passwd oracle
id oracle [ check user and group list]
- Create directories for oracle base and oracle software
/u01/app/oracle —— Oracle base folder where all oracle software will be install
[root@graphit ~]# mkdir -p /u01/app/oracle [ -p means directory is created with sub-directory]
[root@graphit ~]# chown –R oracle:oinstall /u01/app/orale
[root@graphit ~]# chmod –R 775 /u01/app/oracle
[root@graphit ~]# mkdir -p /u01/app/oraInventory
[root@graphit ~]# chown -R oracle:oinstall /u01/app/oraInventory
[root@graphit ~]# chmod -R 755 /u01/app/oraInventory
Create directory for the data files on the disk
/mnt/san-storage/oradata
mkdir – p /mnt/san-storage/oradata
chown –R oracle:dba /mnt/san-storage/oradata
chmod –R 755 /mnt/san-storage/oradata
- Add Environment variable for the OS oracle user
#su – oracle
$ cd ~
$ vi .bash_profile
add the following lines
# Oracle Settings
export TMP=/tmp
export TMPDIR=$TMP
export ORACLE_HOSTNAME=grapit.com
export ORACLE_UNQNAME=orcl [name of databasse]
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/12.1/db_1
export ORACLE_SID=orcl [name of instance]
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
su – oracle [ switch to oracle user], edit the path : #vi /home/oracle.bash_profile
export path [ by copying upper export files and paste it the documents] ESP:W:Q
- Disable SELinux /etc/selinux/config make it SELINUX =permissive followed by SETEN force
Su – root
Vi /etc/selinux/config
SELINUX =permissive [set it permissive and delete force]
ESP + W+Q [save and quit editor]
#setenforce permissive [it help oracle user to operate normally]
- Disable the Linux firewall or tell you network setup firewall and allowing port for oracle database system
# service iptables stop #service iptables save #chkconfig iptables off
- Download oracle 12c software / If you have already downloaded it or brought licensed version for your production. Be continue installation after download part
su – root
create a folder for download files /orasoft
mkdir /orasoft
chown –R oracle:oinstall /orasoft/
chmod -R 755 /orasoft
passwd oracle
login as oracle user
cd /home/oracle/Downloads [default download location]
ls
move the file to the orasoft directory
mv filesname /orasoft [location of destination]
ls
cd /orasoft
unzip filename [oracle software zip file name]
cd database/
ls
b. Install database software:
Login as Oracle user
su –oracle
cd /orasoft/
cd database/
./runInstaller [you can see the famous oracle Universal installer screen ]
You installation will start with the oracle universal installer 12c
- Configuration Security Update: If you are not Oracle register customer, skip this option
Click “Yes” if you get the following warning.
2. Installation Option: You can see 3 options such as you can create and configure a database that means software Instance + Database / only install the database software / upgrade an existing database, for example 11g to 12c version.
In this installation, I am going to select option 2: Install database software only. I will create database later
3. Database Installation Options: Select Single instance database installation because the pre-requisite configuration only for single instance.
4. Database Edition: Enterprise Edition because it is mostly used solution for mission-critical application system
5. Specify the path for the Oracle_base and Software location. Oracle_base is the root folder for the oracle product. All subsequent software and files will be install or reside under the oracle_base folder.
Software location is the sub-folder under oracle-base.
6. Create Inventory : This folder contains all meta data of the installation sets up or install log files. The owner of this directory is the oinstall group memebers
7. Declaration of the Operating system groups: set it up based on your organization policy.
8. Pre-requisites Checks: It will take sometime and check all pre-requisites before installing the software. You will get errors if you don’t meet the pre-requisites. Then you need to fix error for next procedure.
9. Summary of the Global settings and Inventory information
10. Install Product: Process will take time. You need to wait patiently until it complete
11. After complete installation, you need to run the following two scripts as a root user.
12. Connect your Linux server machine using PuTTY and login as a root user , and execute the first script /u01/app/oraInventory/root.sh
This script change the permission of the inventory directory, and add read/write/execution permission for the group, and revoke all other groups except Oinstall.
now you need to execute 2nd script /u01/app/oracle/product/12.1/db_1/root.sh
This scripts set the environment variable and insert the full path name into the bin directory, and entities of the configuration utilities are added to the /etc/oratab directory location such as dbca, netca , and create trace file for monitoring database operation.
Now you can login Sqlpus as sysdba but database is not available because we didn’t create database yet.
The next blog I will discuss how to create Oracle listener and configure database.
Thank you 🙂
You must be logged in to post a comment.