Showing posts with label Database Installation. Show all posts
Showing posts with label Database Installation. Show all posts

Monday, August 17, 2020

Oracle Database 19c Installation on OEL 8.1

Oracle Database 19c Installation on OEL7.5/8.1 

vmware 15 installed on host machine

Login as root user 

root123


Wired Connect - Internet


Prerequisites - Installation using yum install.


# cd /etc/yum.repos.d/

wget http://yum.oracle.com/public-yum-ol7.repo

yum install oracle-database-preinstall-19c


Install Winscp - download


Finding ipaddress using ifconfig


eg: 192.168.21.100


From source to target , copy the db file LINUX.X64_193000_db_home.zip (drag and drop)


Where default we have root user,Need to provide ownership to user oracle on

Oracle binaries


 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

After Installing Pre-requisites, These user and groups are created by it self.


Verify using ID

#id oracle

If not exists, Need to create Manually.


Create Directories:


mkdir -p /u01/app/oraInventory

mkdir -p /u01/app/oracle/product/19.3.0/dbhome_1


Permissions on File systems 



#chown -R oracle:oinstall /u01

#chown -R oracle:oinstall /softwares

#chown -R oracle:oinstall /oradata

#chown -R oracle:oinstall /orabackup

#chown -R oracle:oinstall /archives


Note: -R ? includes all subfiles and folders

Will Provide read,write,execute permissions on file systems


chmod -R 775 /u01

chmod -R 775 /softwares

chmod -R 775 /oradata

chmod -R 775 /orabackup

chmod -R 775 /archives


----------------------------


Configure hostname


vi /etc/hosts

#add entry

127.0.0.1  localhost.localdomain  localhost

192.168.21.100  host1.chaitanyaoracledba.com  host1

:wq!


vi /etc/hostname

#delete existing entry

host1.chaitanyaoracledba.com


:wq!

--------------------------------

set the oracle password

#passwd oracle


Enter the passwd : oracle123

confirm : oracle123


Login to Oracle user

#su - oracle

------------------------------------------------------------

Configuing .bash_profile - Environment Variables

-------------------------------------------------------------

is a hidden file for every user default profile

Will declare variables to locate the oracle binaries

So 




$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/19.3.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

ORACLE_HOSTNAME=host1.chaitanyaoracledba.com; export ORACLE_HOSTNAME

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!


then execute

$. .bash_profile






# Silent mode.

$cd /u01/app/oracle/product/19.3.0/dbhome_1

$ cp LINUX.X64_193000_db_home.zip /u01/app/oracle/product/19.3.0/dbhome_1/

$cd /u01/app/oracle/product/19.3.0/dbhome_1/

$unzip LINUX.X64_193000_db_home.zip

$ls

Will see runInstaller file to install the db software


$export ORACLE_HOSTNAME=host1.chaitanyaoracledba.com

$./runInstaller -ignorePrereq -waitforcompletion -silent -printtime -printmemory  

    -responseFile ${ORACLE_HOME}/install/response/db_install.rsp          

    oracle.install.option=INSTALL_DB_SWONLY                                   

    ORACLE_HOSTNAME=host1.chaitanyaoracledba.com                                    

    UNIX_GROUP_NAME=oinstall                                                  

    INVENTORY_LOCATION=/u01/app/oraInventory                                   

    SELECTED_LANGUAGES=en,en_GB                                               

    ORACLE_HOME=${ORACLE_HOME}                                               

    ORACLE_BASE=${ORACLE_BASE}                                                

    oracle.install.db.InstallEdition=EE                                       

    oracle.install.db.OSDBA_GROUP=dba                                         

    oracle.install.db.OSBACKUPDBA_GROUP=dba                                  

    oracle.install.db.OSDGDBA_GROUP=dba                                       

    oracle.install.db.OSKMDBA_GROUP=dba                                       

    oracle.install.db.OSRACDBA_GROUP=dba                                     

    SECURITY_UPDATES_VIA_MYORACLESUPPORT=false                                

    DECLINE_SECURITY_UPDATES=true


Run the root scripts when prompted.


As a root user, execute the following script(s):

        1. /u01/app/oraInventory/orainstRoot.sh

        2. /u01/app/oracle/product/19.3.0/dbhome_1/root.sh






# Silent mode - Create Database using database configuration assistant - silent mode

dbca -silent -createDatabase                                                  

     -templateName General_Purpose.dbc                                       

     -gdbname prod -sid  prod -responseFile NO_VALUE        

     -characterSet AL32UTF8                                                    

     -sysPassword sys123                                                 

     -systemPassword sys123                                            

     -createAsContainerDatabase false                                         

     -numberOfPDBs 0                                                         

     -pdbName pdbhr                                                     

     -pdbAdminPassword PdbPassword1                                            

     -databaseType MULTIPURPOSE                                                

     -automaticMemoryManagement false                                        

     -totalMemory 870                                                        

     -storageType FS                                                         

     -datafileDestination "/oradata"                                         

     -redoLogFileSize 50                                                     

     -emConfiguration NONE                                                    

     -ignorePreReqs



Note : Info on oracle db19c installation it may be differ from your environment production,testing,development,and naming conventions,directories etc


THANKS FOR VIEWING MY BLOG FOR MORE UPDATES FOLLOW ME OR SUBSCRIBE ME 

Monday, July 27, 2020

ORACLE 12C DATABASE INSTALLATION



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
































































ITIL Process

ITIL Process Introduction In this Blog i am going to explain  ITIL Process, ITIL stands for Information Technology Infrastructure Library ...