ORACLE 12C DATABASE INSTALLATION
---------------------------------------------------------
Prerequisites
-------------- ---
Oracle linux installed
Configure /etc/hosts file
Adding host entry with ip.
#vi /etc/hosts
127.0.0.1 localhost.localdomain localhost
192.169.2.3 host1.chaitanya.com host1
Save it
esc :wq!
Network Configuration
----------------------------
#neat
Double Click - eth0
hardware Device - Probe(click)
Deactivate - and activate - file - save.
--------------------------------------------
#df -h
#cd /mnt/hgfs
#ls
#cd 12csoft
#ls
# cp linuxamd64_12c_database_* /softwares/
Will unzip the files
#cd /softwares
#ls
#unzip linuxamd64_12c_database_1of2.zip
#unzip linuxamd64_12c_database_2of2.zip
Note: also can use winscp/filezilla
--------------------------------------------------
Creating groups and user - OS level
--------------------------------------------
To manage Oracle Installed binaries, will create OS groups and user.
Oracle recommends three groups.
dba - Full Administrative privileges
oinstall - Will have privileges on inventory files.
oper - optional - operational - limited privileges
#groupadd dba
groupadd oper
groupadd oinstall
Now create user oracle
#useradd -g oinstall -G dba,oper oracle
#passwd oracle
: oracle123
Note: -g -? Primary Group
-G -? Secondary Group
------------------------------------------------------------------
Changing Ownership and permissions to oracle on Files
------------------------------------------------------------------
using chown will change from root to oracle
#chown -R oracle:oinstall /u01
chown -R oracle:oinstall /orabackup
chown -R oracle:oinstall /archives
chown -R oracle:oinstall /softwares
chown -R oracle:oinstall /oradata
Now ...provide read/write/execute on files/folders to oracle user.
using chmod
#chmod -R 775 /u01
chmod -R 775 /orabackup
chmod -R 775 /archives
chmod -R 775 /softwares
chmod -R 775 /oradata
read / write / execute
owner group public
rwx rwx r-x
7 7 5
Verify now..
cd /softwares
ls -ltr
will see..
oracle oinstall on every folder/file.
---------------------------------------------------------------
hosts file
neat - network configuration
shared folder -enable - copy files /softwares
unzip
groups - add
user - add - oracle
chown -
chmod
------------------------
software Copy
Groups / user creation - oracle,dba,oper,oinstall
ownership
Permissions
Display - resolution
#xhost +
Switch the user from root to oracle
#su - oracle
$cd /softwares
$ls
$cd database
$ls
$./runInstaller
note: . to execute
/ from current folder
----------------------------------------
Uncheck - I wish to receive security updates
Skip Software updates->
server Class - >Create and Configure Database
-> Single Instance Database.
Base : /u01/app/oracle
Software location : dbhome_1
Database File System : /oradata
Edition: Enterprise Edition
Global Database Name : prod.chaitanya.com
AdminPaswd : sys123
confirm : sys123
OSDBA -: DBA
unchk : create as container database(ignore)
directory : /u01/app/oraInventory
groupName: oinstall
Click - run and fix up - button
open a terminal
log in as root
run the following script. to fix recommended prerequisit changes.
# /tmp/CVU_12.1.0.1.0_oracle/runfixup.sh
-------------------------------------------------
Recommended RPM Packages
Redhat package Manager - tool will install rpms
Will find these rpms in ISO file/use yum install.
VM -> settings - > CDROM - Connect - > Choose ISO file.
In Terminal .
#df -h
# cd /media/OL5.8\ x86_64\ dvd\ 20120229/Server
#ls -ltr
will find rpms
Now install two pending packages
# rpm -ivh libaio-devel-0.3.106-5.*.rpm
# rpm -ivh sysstat-7.0.2-11.el5.x86_64.rpm
now click
Check again - to verify
then
Click on
Install...proceed further.
--------------------------------------------------------
Final Step - running two root scripts
from root user in another terminal.
#/u01/app/oraInventory/orainstRoot.sh
#/u01/app/oracle/product/12.1.0/dbhome_1/root.sh
root.sh will create /etc/oratab file , will make an entry
the database name and home which installed.
using oratab file, can find number of databases on ur server.
-----------------------------------------
Configure - environment Variable using .bash_profile
for every OS user , default one bash_profile exists
For oracle user
we have /home/oracle
is a hidden file prefixed with dot.
List the hidden files
$ls -ltra
$vi .bash_profile
#Append few parameters following
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR
ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/12.1.0/dbhome_1; export ORACLE_HOME
ORACLE_SID=prod; export ORACLE_SID
PATH=/usr/sbin:$PATH; export PATH
PATH=$ORACLE_HOME/bin:$PATH; export PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH
Now ... save the file
esc :wq!
NOw execute the bash_profile
$. .bash_profile
now verify
using echo
$echo $ORACLE_SID
$echo $ORACLE_BASE
How to connect Database?
sqlplus '/as sysdba'
sql>select name,open_mode,database_role from v$database;
sql>connect /as sysdba
or
sql>connect sys/sys123 as sysdba
or
sql>connect sys as sysdba
sql>passwd: sys123
Note : / represents sys user with sysdba role
Verify currently which SID is configured in terminal
$echo $ORACLE_SID
To connect to differnt database
then export
eg: for dev db
$export ORACLE_SID=dev
sqlplus '/as sysdba'
or
. oraenv
SID:dev
sqlplus
Note: info on oracle database 12c installation it may be differ from your environment like production,testing,development, and ip address and host names
and directories
THANK YOU FOR VIEWING MY BLOG FOR MORE UPDATES FOLLOW ME