Oraset 12c
Oraset 12c
Oraset 12c
=======================================
Here are the steps for preconfiguring a system for Oracle Database installation
using oracle-validated:
As an authorized user (for example, root), retrieve the file that configures
repository locations:
# cd /etc/yum.repos.d
# wget http://public-yum.oracle.com/public-yum-ol6.repo
Next, install the oracle-validated RPM using the yum install command.
The output in Listing 2 shows how the installation checks dependencies and then
downloads and installs the required packages.
===================================================================================
===
/etc/init.d/NetworkManager stop
chkconfig NetworkManager off
/etc/init.d/NetworkManager start
chkconfig NetworkManager on
Hosts File
The "/etc/hosts" file must contain a fully qualified name for the server.
For example.
====================================
# Change this
* soft nproc 1024
# To this
* - nproc 16384
=====================================================
Add the following lines to the "/etc/pam.d/login" file, if it does not already
exist.
======================================================
============================
Create the new groups and users.
======================================
SELINUX=permissive
Alternatively, this alteration can be done using the GUI tool (Applications >
System Settings > Security Level).
Click on the SELinux tab and disable the feature. If SELinux is disabled after
installation,
the server will need a reboot for the change to take effect.
=====================================
confirm everything
cat /etc/hosts
cat /etc/sysctl.conf
cat /etc/security/limits.conf
cat /etc/pam.d/login
cat /etc/security/limits.d/90-nproc.conf
cat /etc/selinux/config
=========================================
mkdir -p /d01/app/oracle/product/12.1.0.2
chown -R oracle:oinstall /d01
chmod -R 775 /d01
=============================================================
Login as the oracle user and add the following lines at the end of the
".bash_profile" file, remembering to adjust them for your specific installation.
# Oracle Settings
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR
Installation
Log into the oracle user. If you are using X emulation then set the DISPLAY
environmental variable.
export JAVA_HOME=/usr/java/jdk1.8.0_05/bin/java
export PATH=$PATH:/usr/java/jdk1.8.0_05/bin
Start the Oracle Universal Installer (OUI) by issuing the following command in the
database directory.
./runInstaller
Post Installation
Edit the "/etc/oratab" file setting the restart flag for each instance to 'Y'.
DB11G:/u01/app/oracle/product/11.2.0/db_1:Y
===================================================================================
=====================
For a dummy database, just place an entry in /etc/oratab and then create a .env
file from it.
++++++++++++ Create a env file for the database. This file calls oraenv and sets
the environment.
#!/usr/bin/ksh
################################################################
# Environment-File <db_name>.env
# usage:
# . <db_name>.env [<ORACLE_SID>}
# <ORACLE_SID> only required for an idle instance on a Linux-RAC
#################################################################
DB_NAME=hvqsqop0; export DB_NAME
#--simplification: RAC only on Linux
ORAENV_ASK=NO; export ORAENV_ASK
TERM=xterm; export TERM
for pth in /usr/local/bin /home/oracle/script
do
if [ `echo ${PATH} | grep ${pth} | wc -l` -eq 0 ]
then
PATH=${PATH}:${pth}; export PATH
fi
done
#---
if [ "`uname -a | cut -d' ' -f1`" = "Linux" ]
then
#-- instance (ORACLE_SID) running on this node ?
if [ `ps -ef | grep -i "ora_pmon_$DB_NAME" | grep -v grep | wc -l` -gt 0 ]
then
ORACLE_SID=`ps -ef | grep -i "ora_pmon_$DB_NAME" | grep -v grep | sed '2,$d' |
awk '{print $NF}' | cut -d"_" -f3- `
export ORACLE_SID
. oraenv
else
echo "Instance for database $DB_NAME not running on this host (`hostname`)"
#-- instance (ORACLE_SID) ASM running on this node ?
if [ `ps -ef | grep -i "asm_pmon_$DB_NAME" | grep -v grep | wc -l` -gt 0 ]
then
ORACLE_SID=`ps -ef | grep -i "asm_pmon_$DB_NAME" | grep -v grep | sed '2,$d' |
awk '{print $NF}' | cut -d"_" -f3- `
export ORACLE_SID
. oraenv
else
echo "Instance for database $DB_NAME not running on this host (`hostname`)"
if [ $# -eq 1 ] # may be an idle instance, check optional parameter for
ORACLE_SID
then
ORACLE_SID=$1
export ORACLE_SID
echo "ORACLE_SID=${ORACLE_SID} given by optional call-parameter"
. oraenv
else
echo "Please go to one of this node(s) ..."
GH=`cat /etc/oratab | grep ^+ASM | awk -F':' '{print $2}'`
${GH}/bin/srvctl status database -d $DB_NAME
echo "... or call script <db_name>.env with parameter <ORACLE_SID>"
export ORACLE_SID=NotSet
fi
fi
fi
else # No RAC
ORACLE_SID=`echo ${DB_NAME} | tr '[:lower:]' '[:upper:]'` ; export ORACLE_SID
. oraenv
fi
echo "Setting Environment for instance ${ORACLE_SID}"
# ORACLE_HOME will be set via oratab!
LD_LIBRARY_PATH=/usr/openv/netbackup/bin:/usr/X11R6/lib:${ORACLE_HOME}/lib:/usr/
lib:${ORACLE_HOME}/ctx/lib:/usr/ucblib; export LD_LIBRARY_PATH
OB=$ORACLE_BASE ; export OB
TNS_ADMIN=$ORACLE_HOME/network/admin ; export TNS_ADMIN
#NLS_LANG=american_america.WE8ISO8859P15 ; export NLS_LANG
OH=$ORACLE_HOME ; export OH
SQLPATH=/home/oracle/script:$ORACLE_HOME/rdbms/admin ; export
SQLPATH
ADR_HOME=$OB/diag/rdbms/${DB_NAME}/${ORACLE_SID} ; export ADR_HOME
AH=${ADR_HOME} ; export AH
export PS1=\h:\u@[$ORACLE_SID]: ${PWD}>
export PATH=$PATH:$ORACLE_HOME/OPatch
echo "Oracle Home $ORACLE_HOME "
echo "Oracle Base $ORACLE_BASE"
echo "Oracle Network files $TNS_ADMIN"
echo "Oracle ADR $ADR_HOME"
#aliases
alias home='cd $ORACLE_HOME'
alias tns='cd $ORACLE_HOME/network/admin'
alias al='cd $AH'
#list only directories
alias lsd="ls -l | grep '^d'"
# show top cpu consuming processes
alias topc="ps -e -o pcpu,pid,user,tty,args | sort -n -k 1 -r | head"
# show top memory consuming processes
alias topm="ps -e -o pmem,pid,user,tty,args | sort -n -k 1 -r | head"
# find largest files below this point
alias flf="find . -ls | sort -nrk7 | head -10"
# find largest directories consuming space below this point
alias fld="du . -h --max-depth=1 | sort -n -r"
#find all files greater than this size
alias fls='find . -size +90M'
#list files according to sizes
alias lfs='ls -alSh'
alias pl='sqlplus / as sysdba'
export LD_BIND_NOW=1
# Database name Alias
alias $DB_NAME=". /home/oracle/env/$DB_NAME.env"
====================================Creating a Password
File=============================
$ cd $ORACLE_HOME/dbs
orapwd file=orapw<ORACLE_SID> password=<sys password>
for swing bench. install jdk and then set the following paths
export JAVA_HOME=/usr/java/jdk1.8.0_05
export PATH=$JAVA_HOME/bin:$PATH
export CLASSPATH=$CLASSPATH:$JAVA_HOME/lib