(Doc ID 1054902.1)
Monday, October 31, 2016
Sunday, October 30, 2016
configure ssh in solaris for rac 12c
/TapeBackup/GRID_SOFTWARE/GRID_12.1.0.2/grid/sshsetup/sshUserSetup.sh -user grid -hosts "mof-pcidmdb01 mof-pcidmdb02" -noPromptPassphrase
Run the above script to configure ssh for Solaris server before running the below 2 scripts :-)
/TapeBackup/GRID_SOFTWARE/GRID_12.1.0.2/grid/runcluvfy.sh stage -pre crsinst -n mof-pidmdb01,mof-pidmdb02 -verbose
/TapeBackup/GRID_SOFTWARE/GRID_12.1.0.2/grid/runcluvfy.sh stage -pre crsinst -n mof-pobidb01,mof-pobidb02 -verbose
/TapeBackup/GRID_SOFTWARE/GRID_12.1.0.2/grid/sshsetup/sshUserSetup.sh -user grid -hosts "mof-pcidmdb01 mof-pcidmdb02" -noPromptPassphrase
the content of the script given below
-bash-4.1$ cat /TapeBackup/GRID_SOFTWARE/GRID_12.1.0.2/grid/sshsetup/sshUserSetup.sh
#!/bin/sh
# Nitin Jerath - Aug 2005
#Usage sshUserSetup.sh -user [ -hosts \"\" | -hostfile ] [ -advanced ] [ -verify] [ -exverify ] [ -logfile ] [-confirm] [-shared] [-help] [-usePassphrase] [-noPromptPassphrase]
#eg. sshUserSetup.sh -hosts "host1 host2" -user njerath -advanced
#This script is used to setup SSH connectivity from the host on which it is
# run to the specified remote hosts. After this script is run, the user can use # SSH to run commands on the remote hosts or copy files between the local host
# and the remote hosts without being prompted for passwords or confirmations.
# The list of remote hosts and the user name on the remote host is specified as
# a command line parameter to the script. Note that in case the user on the
# remote host has its home directory NFS mounted or shared across the remote
# hosts, this script should be used with -shared option.
#Specifying the -advanced option on the command line would result in SSH
# connectivity being setup among the remote hosts which means that SSH can be
# used to run commands on one remote host from the other remote host or copy
# files between the remote hosts without being prompted for passwords or
# confirmations.
#Please note that the script would remove write permissions on the remote hosts
#for the user home directory and ~/.ssh directory for "group" and "others". This
# is an SSH requirement. The user would be explicitly informed about this by teh script and prompted to continue. In case the user presses no, the script would exit. In case the user does not want to be prompted, he can use -confirm option.
# As a part of the setup, the script would use SSH to create files within ~/.ssh
# directory of the remote node and to setup the requisite permissions. The
#script also uses SCP to copy the local host public key to the remote hosts so
# that the remote hosts trust the local host for SSH. At the time, the script
#performs these steps, SSH connectivity has not been completely setup hence
# the script would prompt the user for the remote host password.
#For each remote host, for remote users with non-shared homes this would be
# done once for SSH and once for SCP. If the number of remote hosts are x, the
# user would be prompted 2x times for passwords. For remote users with shared
# homes, the user would be prompted only twice, once each for SCP and SSH.
#For security reasons, the script does not save passwords and reuse it. Also,
# for security reasons, the script does not accept passwords redirected from a
#file. The user has to key in the confirmations and passwords at the prompts.
#The -verify option means that the user just wants to verify whether SSH has
#been set up. In this case, the script would not setup SSH but would only check
# whether SSH connectivity has been setup from the local host to the remote
# hosts. The script would run the date command on each remote host using SSH. In
# case the user is prompted for a password or sees a warning message for a
#particular host, it means SSH connectivity has not been setup correctly for
# that host.
#In case the -verify option is not specified, the script would setup SSH and
#then do the verification as well.
#In case the user speciies the -exverify option, an exhaustive verification would be done. In that case, the following would be checked:
# 1. SSH connectivity from local host to all remote hosts.
# 2. SSH connectivity from each remote host to itself and other remote hosts.
#echo Parsing command line arguments
numargs=$#
ADVANCED=false
HOSTNAME=`hostname`
CONFIRM=no
SHARED=false
i=1
USR=$USER
if test -z "$TEMP"
then
TEMP=/tmp
fi
IDENTITY=id_rsa
LOGFILE=$TEMP/sshUserSetup_`date +%F-%H-%M-%S`.log
VERIFY=false
EXHAUSTIVE_VERIFY=false
HELP=false
PASSPHRASE=no
RERUN_SSHKEYGEN=no
NO_PROMPT_PASSPHRASE=no
while [ $i -le $numargs ]
do
j=$1
if [ $j = "-hosts" ]
then
HOSTS=$2
shift 1
i=`expr $i + 1`
fi
if [ $j = "-user" ]
then
USR=$2
shift 1
i=`expr $i + 1`
fi
if [ $j = "-logfile" ]
then
LOGFILE=$2
shift 1
i=`expr $i + 1`
fi
if [ $j = "-confirm" ]
then
CONFIRM=yes
fi
if [ $j = "-hostfile" ]
then
CLUSTER_CONFIGURATION_FILE=$2
shift 1
i=`expr $i + 1`
fi
if [ $j = "-usePassphrase" ]
then
PASSPHRASE=yes
fi
if [ $j = "-noPromptPassphrase" ]
then
NO_PROMPT_PASSPHRASE=yes
fi
if [ $j = "-shared" ]
then
SHARED=true
fi
if [ $j = "-exverify" ]
then
EXHAUSTIVE_VERIFY=true
fi
if [ $j = "-verify" ]
then
VERIFY=true
fi
if [ $j = "-advanced" ]
then
ADVANCED=true
fi
if [ $j = "-help" ]
then
HELP=true
fi
i=`expr $i + 1`
shift 1
done
if [ $HELP = "true" ]
then
echo "Usage $0 -user [ -hosts \"\" | -hostfile ] [ -advanced ] [ -verify] [ -exverify ] [ -logfile ] [-confirm] [-shared] [-help] [-usePassphrase] [-noPromptPassphrase]"
echo "This script is used to setup SSH connectivity from the host on which it is run to the specified remote hosts. After this script is run, the user can use SSH to run commands on the remote hosts or copy files between the local host and the remote hosts without being prompted for passwords or confirmations. The list of remote hosts and the user name on the remote host is specified as a command line parameter to the script. "
echo "-user : User on remote hosts. "
echo "-hosts : Space separated remote hosts list. "
echo "-hostfile : The user can specify the host names either through the -hosts option or by specifying the absolute path of a cluster configuration file. A sample host file contents are below: "
echo
echo " stacg30 stacg30int 10.1.0.0 stacg30v -"
echo " stacg34 stacg34int 10.1.0.1 stacg34v -"
echo
echo " The first column in each row of the host file will be used as the host name."
echo
echo "-usePassphrase : The user wants to set up passphrase to encrypt the private key on the local host. "
echo "-noPromptPassphrase : The user does not want to be prompted for passphrase related questions. This is for users who want the default behavior to be followed."
echo "-shared : In case the user on the remote host has its home directory NFS mounted or shared across the remote hosts, this script should be used with -shared option. "
echo " It is possible for the user to determine whether a user's home directory is shared or non-shared. Let us say we want to determine that user user1's home directory is shared across hosts A, B and C."
echo " Follow the following steps:"
echo " 1. On host A, touch ~user1/checkSharedHome.tmp"
echo " 2. On hosts B and C, ls -al ~user1/checkSharedHome.tmp"
echo " 3. If the file is present on hosts B and C in ~user1 directory and"
echo " is identical on all hosts A, B, C, it means that the user's home "
echo " directory is shared."
echo " 4. On host A, rm -f ~user1/checkSharedHome.tmp"
echo " In case the user accidentally passes -shared option for non-shared homes or viceversa,SSH connectivity would only be set up for a subset of the hosts. The user would have to re-run the setyp script with the correct option to rectify this problem."
echo "-advanced : Specifying the -advanced option on the command line would result in SSH connectivity being setup among the remote hosts which means that SSH can be used to run commands on one remote host from the other remote host or copy files between the remote hosts without being prompted for passwords or confirmations."
echo "-confirm: The script would remove write permissions on the remote hosts for the user home directory and ~/.ssh directory for "group" and "others". This is an SSH requirement. The user would be explicitly informed about this by the script and prompted to continue. In case the user presses no, the script would exit. In case the user does not want to be prompted, he can use -confirm option."
echo "As a part of the setup, the script would use SSH to create files within ~/.ssh directory of the remote node and to setup the requisite permissions. The script also uses SCP to copy the local host public key to the remote hosts so that the remote hosts trust the local host for SSH. At the time, the script performs these steps, SSH connectivity has not been completely setup hence the script would prompt the user for the remote host password. "
echo "For each remote host, for remote users with non-shared homes this would be done once for SSH and once for SCP. If the number of remote hosts are x, the user would be prompted 2x times for passwords. For remote users with shared homes, the user would be prompted only twice, once each for SCP and SSH. For security reasons, the script does not save passwords and reuse it. Also, for security reasons, the script does not accept passwords redirected from a file. The user has to key in the confirmations and passwords at the prompts. "
echo "-verify : -verify option means that the user just wants to verify whether SSH has been set up. In this case, the script would not setup SSH but would only check whether SSH connectivity has been setup from the local host to the remote hosts. The script would run the date command on each remote host using SSH. In case the user is prompted for a password or sees a warning message for a particular host, it means SSH connectivity has not been setup correctly for that host. In case the -verify option is not specified, the script would setup SSH and then do the verification as well. "
echo "-exverify : In case the user speciies the -exverify option, an exhaustive verification for all hosts would be done. In that case, the following would be checked: "
echo " 1. SSH connectivity from local host to all remote hosts. "
echo " 2. SSH connectivity from each remote host to itself and other remote hosts. "
echo The -exverify option can be used in conjunction with the -verify option as well to do an exhaustive verification once the setup has been done.
echo "Taking some examples: Let us say local host is Z, remote hosts are A,B and C. Local user is njerath. Remote users are racqa(non-shared), aime(shared)."
echo "$0 -user racqa -hosts \"A B C\" -advanced -exverify -confirm"
echo "Script would set up connectivity from Z -> A, Z -> B, Z -> C, A -> A, A -> B, A -> C, B -> A, B -> B, B -> C, C -> A, C -> B, C -> C."
echo "Since user has given -exverify option, all these scenario would be verified too."
echo
echo "Now the user runs : $0 -user racqa -hosts \"A B C\" -verify"
echo "Since -verify option is given, no SSH setup would be done, only verification of existing setup. Also, since -exverify or -advanced options are not given, script would only verify connectivity from Z -> A, Z -> B, Z -> C"
echo "Now the user runs : $0 -user racqa -hosts \"A B C\" -verify -advanced"
echo "Since -verify option is given, no SSH setup would be done, only verification of existing setup. Also, since -advanced options is given, script would verify connectivity from Z -> A, Z -> B, Z -> C, A-> A, A->B, A->C, A->D"
echo "Now the user runs:"
echo "$0 -user aime -hosts \"A B C\" -confirm -shared"
echo "Script would set up connectivity between Z->A, Z->B, Z->C only since advanced option is not given."
echo "All these scenarios would be verified too."
exit
fi
if test -z "$HOSTS"
then
if test -n "$CLUSTER_CONFIGURATION_FILE" && test -f "$CLUSTER_CONFIGURATION_FILE"
then
HOSTS=`awk '$1 !~ /^#/ { str = str " " $1 } END { print str }' $CLUSTER_CONFIGURATION_FILE`
elif ! test -f "$CLUSTER_CONFIGURATION_FILE"
then
echo "Please specify a valid and existing cluster configuration file."
fi
fi
if test -z "$HOSTS" || test -z $USR
then
echo "Either user name or host information is missing"
echo "Usage $0 -user [ -hosts \"\" | -hostfile ] [ -advanced ] [ -verify] [ -exverify ] [ -logfile ] [-confirm] [-shared] [-help] [-usePassphrase] [-noPromptPassphrase]"
exit 1
fi
if [ -d $LOGFILE ]; then
echo $LOGFILE is a directory, setting logfile to $LOGFILE/ssh.log
LOGFILE=$LOGFILE/ssh.log
fi
echo The output of this script is also logged into $LOGFILE | tee -a $LOGFILE
if [ `echo $?` != 0 ]; then
echo Error writing to the logfile $LOGFILE, Exiting
exit 1
fi
echo Hosts are $HOSTS | tee -a $LOGFILE
echo user is $USR | tee -a $LOGFILE
SSH="/usr/bin/ssh"
SCP="/usr/bin/scp"
SSH_KEYGEN="/usr/bin/ssh-keygen"
calculateOS()
{
platform=`uname -s`
case "$platform"
in
"SunOS") os=solaris;;
"Linux") os=linux;;
"HP-UX") os=hpunix;;
"AIX") os=aix;;
*) echo "Sorry, $platform is not currently supported." | tee -a $LOGFILE
exit 1;;
esac
echo "Platform:- $platform " | tee -a $LOGFILE
}
calculateOS
BITS=1024
ENCR="rsa"
deadhosts=""
alivehosts=""
if [ $platform = "Linux" ]
then
PING="/bin/ping"
else
PING="/usr/sbin/ping"
fi
#bug 9044791
if [ -n "$SSH_PATH" ]; then
SSH=$SSH_PATH
fi
if [ -n "$SCP_PATH" ]; then
SCP=$SCP_PATH
fi
if [ -n "$SSH_KEYGEN_PATH" ]; then
SSH_KEYGEN=$SSH_KEYGEN_PATH
fi
if [ -n "$PING_PATH" ]; then
PING=$PING_PATH
fi
PATH_ERROR=0
if test ! -x $SSH ; then
echo "ssh not found at $SSH. Please set the variable SSH_PATH to the correct location of ssh and retry."
PATH_ERROR=1
fi
if test ! -x $SCP ; then
echo "scp not found at $SCP. Please set the variable SCP_PATH to the correct location of scp and retry."
PATH_ERROR=1
fi
if test ! -x $SSH_KEYGEN ; then
echo "ssh-keygen not found at $SSH_KEYGEN. Please set the variable SSH_KEYGEN_PATH to the correct location of ssh-keygen and retry."
PATH_ERROR=1
fi
if test ! -x $PING ; then
echo "ping not found at $PING. Please set the variable PING_PATH to the correct location of ping and retry."
PATH_ERROR=1
fi
if [ $PATH_ERROR = 1 ]; then
echo "ERROR: one or more of the required binaries not found, exiting"
exit 1
fi
#9044791 end
echo Checking if the remote hosts are reachable | tee -a $LOGFILE
for host in $HOSTS
do
if [ $platform = "SunOS" ]; then
$PING -s $host 5 5
elif [ $platform = "HP-UX" ]; then
$PING $host -n 5 -m 5
else
$PING -c 5 -w 5 $host
fi
exitcode=`echo $?`
if [ $exitcode = 0 ]
then
alivehosts="$alivehosts $host"
else
deadhosts="$deadhosts $host"
fi
done
if test -z "$deadhosts"
then
echo Remote host reachability check succeeded. | tee -a $LOGFILE
echo The following hosts are reachable: $alivehosts. | tee -a $LOGFILE
echo The following hosts are not reachable: $deadhosts. | tee -a $LOGFILE
echo All hosts are reachable. Proceeding further... | tee -a $LOGFILE
else
echo Remote host reachability check failed. | tee -a $LOGFILE
echo The following hosts are reachable: $alivehosts. | tee -a $LOGFILE
echo The following hosts are not reachable: $deadhosts. | tee -a $LOGFILE
echo Please ensure that all the hosts are up and re-run the script. | tee -a $LOGFILE
echo Exiting now... | tee -a $LOGFILE
exit 1
fi
firsthost=`echo $HOSTS | awk '{print $1}; END { }'`
echo firsthost $firsthost
numhosts=`echo $HOSTS | awk '{ }; END {print NF}'`
echo numhosts $numhosts
if [ $VERIFY = "true" ]
then
echo Since user has specified -verify option, SSH setup would not be done. Only, existing SSH setup would be verified. | tee -a $LOGFILE
continue
else
echo The script will setup SSH connectivity from the host ''`hostname`'' to all | tee -a $LOGFILE
echo the remote hosts. After the script is executed, the user can use SSH to run | tee -a $LOGFILE
echo commands on the remote hosts or copy files between this host ''`hostname`'' | tee -a $LOGFILE
echo and the remote hosts without being prompted for passwords or confirmations. | tee -a $LOGFILE
echo | tee -a $LOGFILE
echo NOTE 1: | tee -a $LOGFILE
echo As part of the setup procedure, this script will use 'ssh' and 'scp' to copy | tee -a $LOGFILE
echo files between the local host and the remote hosts. Since the script does not | tee -a $LOGFILE
echo store passwords, you may be prompted for the passwords during the execution of | tee -a $LOGFILE
echo the script whenever 'ssh' or 'scp' is invoked. | tee -a $LOGFILE
echo | tee -a $LOGFILE
echo NOTE 2: | tee -a $LOGFILE
echo "AS PER SSH REQUIREMENTS, THIS SCRIPT WILL SECURE THE USER HOME DIRECTORY" | tee -a $LOGFILE
echo AND THE .ssh DIRECTORY BY REVOKING GROUP AND WORLD WRITE PRIVILEDGES TO THESE | tee -a $LOGFILE
echo "directories." | tee -a $LOGFILE
echo | tee -a $LOGFILE
echo "Do you want to continue and let the script make the above mentioned changes (yes/no)?" | tee -a $LOGFILE
if [ "$CONFIRM" = "no" ]
then
read CONFIRM
else
echo "Confirmation provided on the command line" | tee -a $LOGFILE
fi
echo | tee -a $LOGFILE
echo The user chose ''$CONFIRM'' | tee -a $LOGFILE
if [ "$CONFIRM" = "no" ]
then
echo "SSH setup is not done." | tee -a $LOGFILE
exit 1
else
if [ $NO_PROMPT_PASSPHRASE = "yes" ]
then
echo "User chose to skip passphrase related questions." | tee -a $LOGFILE
else
typeset -i PASSPHRASE_PROMPT
if [ $SHARED = "true" ]
then
PASSPHRASE_PROMPT=2*${numhosts}+1
else
PASSPHRASE_PROMPT=2*${numhosts}
fi
echo "Please specify if you want to specify a passphrase for the private key this script will create for the local host. Passphrase is used to encrypt the private key and makes SSH much more secure. Type 'yes' or 'no' and then press enter. In case you press 'yes', you would need to enter the passphrase whenever the script executes ssh or scp. " | tee -a $LOGFILE
echo "The estimated number of times the user would be prompted for a passphrase is $PASSPHRASE_PROMPT. In addition, if the private-public files are also newly created, the user would have to specify the passphrase on one additional occasion. " | tee -a $LOGFILE
echo "Enter 'yes' or 'no'." | tee -a $LOGFILE
if [ $PASSPHRASE = "no" ]
then
read PASSPHRASE
else
echo "Confirmation provided on the command line" | tee -a $LOGFILE
fi
echo | tee -a $LOGFILE
echo The user chose ''$PASSPHRASE'' | tee -a $LOGFILE
if [ "$PASSPHRASE" = "yes" ]
then
RERUN_SSHKEYGEN="yes"
#Checking for existence of ${IDENTITY} file
if test -f $HOME/.ssh/${IDENTITY}.pub && test -f $HOME/.ssh/${IDENTITY}
then
echo "The files containing the client public and private keys already exist on the local host. The current private key may or may not have a passphrase associated with it. In case you remember the passphrase and do not want to re-run ssh-keygen, press 'no' and enter. If you press 'no', the script will not attempt to create any new public/private key pairs. If you press 'yes', the script will remove the old private/public key files existing and create new ones prompting the user to enter the passphrase. If you enter 'yes', any previous SSH user setups would be reset. If you press 'change', the script will associate a new passphrase with the old keys." | tee -a $LOGFILE
echo "Press 'yes', 'no' or 'change'" | tee -a $LOGFILE
read RERUN_SSHKEYGEN
echo The user chose ''$RERUN_SSHKEYGEN'' | tee -a $LOGFILE
fi
else
if test -f $HOME/.ssh/${IDENTITY}.pub && test -f $HOME/.ssh/${IDENTITY}
then
echo "The files containing the client public and private keys already exist on the local host. The current private key may have a passphrase associated with it. In case you find using passphrase inconvenient(although it is more secure), you can change to it empty through this script. Press 'change' if you want the script to change the passphrase for you. Press 'no' if you want to use your old passphrase, if you had one."
read RERUN_SSHKEYGEN
echo The user chose ''$RERUN_SSHKEYGEN'' | tee -a $LOGFILE
fi
fi
fi
echo Creating .ssh directory on local host, if not present already | tee -a $LOGFILE
mkdir -p $HOME/.ssh | tee -a $LOGFILE
echo Creating authorized_keys file on local host | tee -a $LOGFILE
touch $HOME/.ssh/authorized_keys | tee -a $LOGFILE
echo Changing permissions on authorized_keys to 644 on local host | tee -a $LOGFILE
chmod 644 $HOME/.ssh/authorized_keys | tee -a $LOGFILE
mv -f $HOME/.ssh/authorized_keys $HOME/.ssh/authorized_keys.tmp | tee -a $LOGFILE
echo Creating known_hosts file on local host | tee -a $LOGFILE
touch $HOME/.ssh/known_hosts | tee -a $LOGFILE
echo Changing permissions on known_hosts to 644 on local host | tee -a $LOGFILE
chmod 644 $HOME/.ssh/known_hosts | tee -a $LOGFILE
mv -f $HOME/.ssh/known_hosts $HOME/.ssh/known_hosts.tmp | tee -a $LOGFILE
echo Creating config file on local host | tee -a $LOGFILE
echo If a config file exists already at $HOME/.ssh/config, it would be backed up to $HOME/.ssh/config.backup.
echo "Host *" > $HOME/.ssh/config.tmp | tee -a $LOGFILE
echo "ForwardX11 no" >> $HOME/.ssh/config.tmp | tee -a $LOGFILE
if test -f $HOME/.ssh/config
then
cp -f $HOME/.ssh/config $HOME/.ssh/config.backup
fi
mv -f $HOME/.ssh/config.tmp $HOME/.ssh/config | tee -a $LOGFILE
chmod 644 $HOME/.ssh/config
if [ $RERUN_SSHKEYGEN = "yes" ]
then
echo Removing old private/public keys on local host | tee -a $LOGFILE
rm -f $HOME/.ssh/${IDENTITY} | tee -a $LOGFILE
rm -f $HOME/.ssh/${IDENTITY}.pub | tee -a $LOGFILE
echo Running SSH keygen on local host | tee -a $LOGFILE
$SSH_KEYGEN -t $ENCR -b $BITS -f $HOME/.ssh/${IDENTITY} | tee -a $LOGFILE
elif [ $RERUN_SSHKEYGEN = "change" ]
then
echo Running SSH Keygen on local host to change the passphrase associated with the existing private key | tee -a $LOGFILE
$SSH_KEYGEN -p -t $ENCR -b $BITS -f $HOME/.ssh/${IDENTITY} | tee -a $LOGFILE
elif test -f $HOME/.ssh/${IDENTITY}.pub && test -f $HOME/.ssh/${IDENTITY}
then
continue
else
echo Removing old private/public keys on local host | tee -a $LOGFILE
rm -f $HOME/.ssh/${IDENTITY} | tee -a $LOGFILE
rm -f $HOME/.ssh/${IDENTITY}.pub | tee -a $LOGFILE
echo Running SSH keygen on local host with empty passphrase | tee -a $LOGFILE
$SSH_KEYGEN -t $ENCR -b $BITS -f $HOME/.ssh/${IDENTITY} -N '' | tee -a $LOGFILE
fi
if [ $SHARED = "true" ]
then
if [ $USER = $USR ]
then
#No remote operations required
echo Remote user is same as local user | tee -a $LOGFILE
REMOTEHOSTS=""
chmod og-w $HOME $HOME/.ssh | tee -a $LOGFILE
else
REMOTEHOSTS="${firsthost}"
fi
else
REMOTEHOSTS="$HOSTS"
fi
for host in $REMOTEHOSTS
do
echo Creating .ssh directory and setting permissions on remote host $host | tee -a $LOGFILE
echo "THE SCRIPT WOULD ALSO BE REVOKING WRITE PERMISSIONS FOR "group" AND "others" ON THE HOME DIRECTORY FOR $USR. THIS IS AN SSH REQUIREMENT." | tee -a $LOGFILE
echo The script would create ~$USR/.ssh/config file on remote host $host. If a config file exists already at ~$USR/.ssh/config, it would be backed up to ~$USR/.ssh/config.backup. | tee -a $LOGFILE
echo The user may be prompted for a password here since the script would be running SSH on host $host. | tee -a $LOGFILE
$SSH -o StrictHostKeyChecking=no -x -l $USR $host "/bin/sh -c \" mkdir -p .ssh ; chmod og-w . .ssh; touch .ssh/authorized_keys .ssh/known_hosts; chmod 644 .ssh/authorized_keys .ssh/known_hosts; cp .ssh/authorized_keys .ssh/authorized_keys.tmp ; cp .ssh/known_hosts .ssh/known_hosts.tmp; echo \\"Host *\\" > .ssh/config.tmp; echo \\"ForwardX11 no\\" >> .ssh/config.tmp; if test -f .ssh/config ; then cp -f .ssh/config .ssh/config.backup; fi ; mv -f .ssh/config.tmp .ssh/config\"" | tee -a $LOGFILE
echo Done with creating .ssh directory and setting permissions on remote host $host. | tee -a $LOGFILE
done
for host in $REMOTEHOSTS
do
echo Copying local host public key to the remote host $host | tee -a $LOGFILE
echo The user may be prompted for a password or passphrase here since the script would be using SCP for host $host. | tee -a $LOGFILE
$SCP $HOME/.ssh/${IDENTITY}.pub $USR@$host:.ssh/authorized_keys | tee -a $LOGFILE
echo Done copying local host public key to the remote host $host | tee -a $LOGFILE
done
cat $HOME/.ssh/${IDENTITY}.pub >> $HOME/.ssh/authorized_keys | tee -a $LOGFILE
for host in $HOSTS
do
if [ $ADVANCED = "true" ]
then
echo Creating keys on remote host $host if they do not exist already. This is required to setup SSH on host $host. | tee -a $LOGFILE
if [ $SHARED = "true" ]
then
IDENTITY_FILE_NAME=${IDENTITY}_$host
COALESCE_IDENTITY_FILES_COMMAND="cat .ssh/${IDENTITY_FILE_NAME}.pub >> .ssh/authorized_keys"
else
IDENTITY_FILE_NAME=${IDENTITY}
fi
$SSH -o StrictHostKeyChecking=no -x -l $USR $host " /bin/sh -c \"if test -f .ssh/${IDENTITY_FILE_NAME}.pub && test -f .ssh/${IDENTITY_FILE_NAME}; then echo; else rm -f .ssh/${IDENTITY_FILE_NAME} ; rm -f .ssh/${IDENTITY_FILE_NAME}.pub ; $SSH_KEYGEN -t $ENCR -b $BITS -f .ssh/${IDENTITY_FILE_NAME} -N '' ; fi; ${COALESCE_IDENTITY_FILES_COMMAND} \"" | tee -a $LOGFILE
else
#At least get the host keys from all hosts for shared case - advanced option not set
if test $SHARED = "true" && test $ADVANCED = "false"
then
if [ $PASSPHRASE = "yes" ]
then
echo "The script will fetch the host keys from all hosts. The user may be prompted for a passphrase here in case the private key has been encrypted with a passphrase." | tee -a $LOGFILE
fi
$SSH -o StrictHostKeyChecking=no -x -l $USR $host "/bin/sh -c true"
fi
fi
done
for host in $REMOTEHOSTS
do
if test $ADVANCED = "true" && test $SHARED = "false"
then
$SCP $USR@$host:.ssh/${IDENTITY}.pub $HOME/.ssh/${IDENTITY}.pub.$host | tee -a $LOGFILE
cat $HOME/.ssh/${IDENTITY}.pub.$host >> $HOME/.ssh/authorized_keys | tee -a $LOGFILE
rm -f $HOME/.ssh/${IDENTITY}.pub.$host | tee -a $LOGFILE
fi
done
for host in $REMOTEHOSTS
do
if [ $ADVANCED = "true" ]
then
if [ $SHARED != "true" ]
then
echo Updating authorized_keys file on remote host $host | tee -a $LOGFILE
$SCP $HOME/.ssh/authorized_keys $USR@$host:.ssh/authorized_keys | tee -a $LOGFILE
fi
echo Updating known_hosts file on remote host $host | tee -a $LOGFILE
$SCP $HOME/.ssh/known_hosts $USR@$host:.ssh/known_hosts | tee -a $LOGFILE
fi
if [ $PASSPHRASE = "yes" ]
then
echo "The script will run SSH on the remote machine $host. The user may be prompted for a passphrase here in case the private key has been encrypted with a passphrase." | tee -a $LOGFILE
fi
$SSH -x -l $USR $host "/bin/sh -c \"cat .ssh/authorized_keys.tmp >> .ssh/authorized_keys; cat .ssh/known_hosts.tmp >> .ssh/known_hosts; rm -f .ssh/known_hosts.tmp .ssh/authorized_keys.tmp\"" | tee -a $LOGFILE
done
cat $HOME/.ssh/known_hosts.tmp >> $HOME/.ssh/known_hosts | tee -a $LOGFILE
cat $HOME/.ssh/authorized_keys.tmp >> $HOME/.ssh/authorized_keys | tee -a $LOGFILE
#Added chmod to fix BUG NO 5238814
chmod 644 $HOME/.ssh/authorized_keys
#Fix for BUG NO 5157782
chmod 644 $HOME/.ssh/config
rm -f $HOME/.ssh/known_hosts.tmp $HOME/.ssh/authorized_keys.tmp | tee -a $LOGFILE
echo SSH setup is complete. | tee -a $LOGFILE
fi
fi
echo | tee -a $LOGFILE
echo ------------------------------------------------------------------------ | tee -a $LOGFILE
echo Verifying SSH setup | tee -a $LOGFILE
echo =================== | tee -a $LOGFILE
echo The script will now run the 'date' command on the remote nodes using ssh | tee -a $LOGFILE
echo to verify if ssh is setup correctly. IF THE SETUP IS CORRECTLY SETUP, | tee -a $LOGFILE
echo THERE SHOULD BE NO OUTPUT OTHER THAN THE DATE AND SSH SHOULD NOT ASK FOR | tee -a $LOGFILE
echo PASSWORDS. If you see any output other than date or are prompted for the | tee -a $LOGFILE
echo password, ssh is not setup correctly and you will need to resolve the | tee -a $LOGFILE
echo issue and set up ssh again. | tee -a $LOGFILE
echo The possible causes for failure could be: | tee -a $LOGFILE
echo 1. The server settings in /etc/ssh/sshd_config file do not allow ssh | tee -a $LOGFILE
echo for user $USR. | tee -a $LOGFILE
echo 2. The server may have disabled public key based authentication.
echo 3. The client public key on the server may be outdated.
echo 4. ~$USR or ~$USR/.ssh on the remote host may not be owned by $USR. | tee -a $LOGFILE
echo 5. User may not have passed -shared option for shared remote users or | tee -a $LOGFILE
echo may be passing the -shared option for non-shared remote users. | tee -a $LOGFILE
echo 6. If there is output in addition to the date, but no password is asked, | tee -a $LOGFILE
echo it may be a security alert shown as part of company policy. Append the | tee -a $LOGFILE
echo "additional text to the /sysman/prov/resources/ignoreMessages.txt file." | tee -a $LOGFILE
echo ------------------------------------------------------------------------ | tee -a $LOGFILE
#read -t 30 dummy
for host in $HOSTS
do
echo --$host:-- | tee -a $LOGFILE
echo Running $SSH -x -l $USR $host date to verify SSH connectivity has been setup from local host to $host. | tee -a $LOGFILE
echo "IF YOU SEE ANY OTHER OUTPUT BESIDES THE OUTPUT OF THE DATE COMMAND OR IF YOU ARE PROMPTED FOR A PASSWORD HERE, IT MEANS SSH SETUP HAS NOT BEEN SUCCESSFUL. Please note that being prompted for a passphrase may be OK but being prompted for a password is ERROR." | tee -a $LOGFILE
if [ $PASSPHRASE = "yes" ]
then
echo "The script will run SSH on the remote machine $host. The user may be prompted for a passphrase here in case the private key has been encrypted with a passphrase." | tee -a $LOGFILE
fi
$SSH -l $USR $host "/bin/sh -c date" | tee -a $LOGFILE
echo ------------------------------------------------------------------------ | tee -a $LOGFILE
done
if [ $EXHAUSTIVE_VERIFY = "true" ]
then
for clienthost in $HOSTS
do
if [ $SHARED = "true" ]
then
REMOTESSH="$SSH -i .ssh/${IDENTITY}_${clienthost}"
else
REMOTESSH=$SSH
fi
for serverhost in $HOSTS
do
echo ------------------------------------------------------------------------ | tee -a $LOGFILE
echo Verifying SSH connectivity has been setup from $clienthost to $serverhost | tee -a $LOGFILE
echo ------------------------------------------------------------------------ | tee -a $LOGFILE
echo "IF YOU SEE ANY OTHER OUTPUT BESIDES THE OUTPUT OF THE DATE COMMAND OR IF YOU ARE PROMPTED FOR A PASSWORD HERE, IT MEANS SSH SETUP HAS NOT BEEN SUCCESSFUL." | tee -a $LOGFILE
$SSH -l $USR $clienthost "$REMOTESSH $serverhost \"/bin/sh -c date\"" | tee -a $LOGFILE
echo ------------------------------------------------------------------------ | tee -a $LOGFILE
done
echo -Verification from $clienthost complete- | tee -a $LOGFILE
done
else
if [ $ADVANCED = "true" ]
then
if [ $SHARED = "true" ]
then
REMOTESSH="$SSH -i .ssh/${IDENTITY}_${firsthost}"
else
REMOTESSH=$SSH
fi
for host in $HOSTS
do
echo ------------------------------------------------------------------------ | tee -a $LOGFILE
echo Verifying SSH connectivity has been setup from $firsthost to $host | tee -a $LOGFILE
echo "IF YOU SEE ANY OTHER OUTPUT BESIDES THE OUTPUT OF THE DATE COMMAND OR IF YOU ARE PROMPTED FOR A PASSWORD HERE, IT MEANS SSH SETUP HAS NOT BEEN SUCCESSFUL." | tee -a $LOGFILE
$SSH -l $USR $firsthost "$REMOTESSH $host \"/bin/sh -c date\"" | tee -a $LOGFILE
echo ------------------------------------------------------------------------ | tee -a $LOGFILE
done
echo -Verification from $clienthost complete- | tee -a $LOGFILE
fi
fi
echo "SSH verification complete." | tee -a $LOGFILE
-bash-4.1$
Thursday, October 27, 2016
Oracle Grid Infrastructure 12cR1 - Parte 5 - Pré-Requisitos do Grid Infrastructure
http://www.oracle.com/technetwork/pt/articles/grid/grid-infrastructure-12cr1-parte-5-2103559-ptb.html
Oracle Grid Infrastructure 12cR1 - Parte 5 - Pré-Requisitos do Grid Infrastructure
Por Victor Armbrust
Postado em Janeiro 2014
Indice
1. Oracle Grid Infrastructure 12cR1 - Parte 1 - Visão Geral e Novos Recursos
2. Oracle Grid Infrastructure 12cR1 - Parte 2 - Configurando o Sistema Operacional
3. Oracle Grid Infrastructure 12cR1 - Parte 3 - Pré-Requisitos do Sistema Operacional
4. Oracle Grid Infrastructure 12cR1 - Parte 4 - Configurando DNS
5. Oracle Grid Infrastructure 12cR1 - Parte 5 - Pré-Requisitos do Grid Infrastructure
6. Oracle Grid Infrastructure 12cR1 - Parte 6 - Instalando o Grid Infrastructure
7. Oracle Grid Infrastructure 12cR1 - Parte 7 - Instalando o Database Software
8. Oracle Grid Infrastructure 12cR1 - Parte 8 - Criando Diskgroups no ASM
9. Oracle Grid Infrastructure 12cR1 - Parte 9 - Criando o Database
10.Oracle Grid Infrastructure 12cR1 - Parte 10 - Validações Finais
Criar o Diretório do Oracle Inventory
Executar os commandos abaixo com user “root”:
mkdir -p /u01/app/oraInventory
chown -R grid:oinstall /u01/app/oraInventory
chmod -R 775 /u01/app/oraInventory
Criar o Diretório do Grid Infrastructure
Executar os commandos abaixo com user “root”:
mkdir -p /u01/app/12.1.0.1/grid
chown -R grid:oinstall /u01/app/12.1.0.1/grid
chmod -R 775 /u01/app/12.1.0.1/
Criar o Diretório do Oracle Base
Executar os commandos abaixo com user “root”:
mkdir -p /u01/app/oracle
mkdir /u01/app/oracle/cfgtoollogs
chown -R oracle:oinstall /u01/app/oracle
chmod -R 775 /u01/app/oracle
Criar o Diretório do Oracle RDBMS
Executar os commandos abaixo com user “root”:
mkdir -p /u01/app/oracle/product/12.1.0.1/dbhome_1
chown -R oracle:oinstall /u01/app/oracle/product/12.1.0.1/dbhome_1
chmod -R 775 /u01/app/oracle/product/12.1.0.1/dbhome_1
Verificar todos os pacotes necessários do SO (64 Bits)
zlib-1.2.3-4.el5.i386.rpm
unixODBC64-2.2.14-3.el5.x86_64.rpm
sysstat-7.0.2-11.el5.x86_64.rpm
pdksh-5.2.14-37.el5.x86_64.rpm
numactl-0.9.8-12.0.1.el5_6.i386.rpm
make-3.81-3.el5.x86_64.rpm
libstdc++44-devel-4.4.6-3.el5.1.i386.rpm
libobjc-4.1.2-52.el5.x86_64.rpm
libgcj-devel-4.1.2-52.el5.i386.rpm
libgcc-4.1.2-52.el5.x86_64.rpm
libao-devel-0.8.6-7.x86_64.rpm
kernel-xen-2.6.18-308.el5.x86_64.rpm
kernel-headers-2.6.18-308.el5.x86_64.rpm
glibc-common-2.5-81.x86_64.rpm
gcc-4.1.2-52.el5.x86_64.rpm
expat-devel-1.95.8-8.3.el5_5.3.x86_64.rpm
elfutils-libs-0.137-3.el5.x86_64.rpm
elfutils-0.137-3.el5.x86_64.rpm
compat-libstdc++-296-2.96-138.i386.rpm
elfutils-libelf-devel-static-0.137-3.el5.i386.rpm
libao-0.8.6-7.i386.rpm
expat-devel-1.95.8-8.3.el5_5.3.i386.rpm
expat-1.95.8-8.3.el5_5.3.i386.rpm
libaio-0.3.106-5.i386.rpm
elfutils-devel-static-0.137-3.el5.i386.rpm
elfutils-libelf-devel-0.137-3.el5.i386.rpm
elfutils-libs-0.137-3.el5.i386.rpm
libao-devel-0.8.6-7.i386.rpm
elfutils-libelf-0.137-3.el5.i386.rpm
libaio-devel-0.3.106-5.i386.rpm
compat-libstdc++-33-3.2.3-61.x86_64.rpm
elfutils-devel-static-0.137-3.el5.x86_64.rpm
libao-0.8.6-7.x86_64.rpm
libaio-0.3.106-5.x86_64.rpm
numactl-devel-0.9.8-12.0.1.el5_6.i386.rpm
libgcc-4.1.2-52.el5.i386.rpm
libstdc++-devel-4.1.2-52.el5.i386.rpm
libstdc++-4.1.2-52.el5.i386.rpm
unixODBC64-libs-2.2.14-3.el5.i386.rpm
unixODBC64-devel-2.2.14-3.el5.i386.rpm
binutils-devel-2.17.50.0.6-20.el5.x86_64.rpm
binutils-2.17.50.0.6-20.el5.x86_64.rpm
gcc-objc++-4.1.2-52.el5.x86_64.rpm
gcc-objc-4.1.2-52.el5.x86_64.rpm
gcc-java-4.1.2-52.el5.x86_64.rpm
gcc-c++-4.1.2-52.el5.x86_64.rpm
libgcj-devel-4.1.2-52.el5.x86_64.rpm
libstdc++-devel-4.1.2-52.el5.x86_64.rpm
libstdc++44-devel-4.4.6-3.el5.1.x86_64.rpm
glibc-devel-2.5-81.i386.rpm
glibc-utils-2.5-81.x86_64.rpm
glibc-headers-2.5-81.x86_64.rpm
kernel-debug-2.6.18-308.el5.x86_64.rpm
kernel-devel-2.6.18-308.el5.x86_64.rpm
kernel-debug-devel-2.6.18-308.el5.x86_64.rpm
kernel-xen-devel-2.6.18-308.el5.x86_64.rpm
Para fazer uma query dos pacotes acima, executar o shell abaixo: (32 ou 64 bits)
# rpm -q --qf '%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n' binutils \
compat-libstdc++-33 \
elfutils-libelf \
elfutils-libelf-devel \
gcc \
gcc-c++ \
glibc \
glibc-common \
glibc-devel \
glibc-headers \
ksh \
libaio \
libaio-devel \
libgcc \
libstdc++ \
libstdc++-devel \
make \
numactl \
pdksh \
sysstat \
unixODBC \
unixODBC-devel \
kernel-debug \
kernel-PAE \
kernel-devel \
kernel-xen \
kernel-xen-devel
Para instalação:
Inserir CD de instalação do OEL 5.8
# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda3 16G 3.5G 12G 24% /
/dev/sdb1 20G 173M 19G 1% /u01
/dev/sda1 487M 42M 420M 9% /boot
tmpfs 2.0G 0 2.0G 0% /dev/shm
/dev/sr0 3.7G 3.7G 0 100% /media/OL5.8 x86_64 dvd 20120229
Criar repositório:
# cd /media
# ln -s OL5.8\ x86_64\ dvd\ 20120229/ CDROM
lrwxrwxrwx 1 root root 26 Jul 12 11:57 CDROM -> OL5.8 x86_64 dvd 20120229/
-rw-r--r-- 1 root root 73 Jul 12 11:56 .hal-mtab
-rw------- 1 root root 0 Jul 12 11:56 .hal-mtab-lock
drwxr-xr-x 8 root root 4096 Feb 29 2012 OL5.8 x86_64 dvd 20120229
cd /etc/yum.repos.d/
# cat repository.repo
[oel5_x86_64_latest]
name=Oracle OL 5 Linux $releasever - $basearch - latest
baseurl=file:///media/CDROM/Server
gpgcheck=0
enabled=0
Executar instalação:
yum --enablerepo=oel5_x86_64_latest install libao expat-devel expat libaio
elfutils-devel-static elfutils-libelf-devel elfutils-libs libao-devel
elfutils-libelf libaio-devel compat-libstdc elfutils-devel-static libao libaio
numactl-devel libgcc libstdc++-devel libstdc++ unixODBC64-libs unixODBC64-devel
binutils-devel binutils gcc-objc++ gcc-objc gcc-java gcc-c++ libgcj-devel
libstdc++-devel libstdc++44-devel glibc-devel glibc-utils glibc-headers
kernel-debug kernel-devel kernel-debug-devel kernel-xen-devel zlib unixODBC64
sysstat pdksh numactl make libstdc++ libobjc libgcj-devel libgcc libao-devel
kernel-xen kernel-headers glibc-common gcc expat-devel elfutils-libs elfutils
compat-libstdc++ elfutils-libelf-devel-static
Criar o arquivo .bash_profile do user oracle e grid
su - oracle
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:$HOME/bin
export PATH
# ORACLE RAC11g e DATABASE 12c
TMP=/tmp
TMPDIR=$TMP
TEMP=$TMP
export ORACLE_SID=oradb1
export ORACLE_BASE=/u01/app/oracle
export GRID_HOME=/u01/app/12.1.0.1/grid
export ORACLE_HOME=$ORACLE_BASE/product/12.1.0.1/dbhome_1
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
export ORACLE_TERM=xterm
export PATH=$PATH:$ORACLE_HOME/bin:$PATH:$GRID_HOME/bin:/usr/bin:/sbin:/
usr/sbin:$ORACLE_HOME/OPatch
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
export PS1="[${LOGNAME}@`hostname -s`:"'${PWD} [${ORACLE_SID}] ]$ '
export PERL_HOME=/usr/local/perl
export PERL5LIB=$PERL_HOME/lib
export SQLPATH=/home/oracle/scripts-ora
su - grid
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:$HOME/bin
export PATH
# ORACLE RAC11g e DATABASE 12c
TMP=/tmp
TMPDIR=$TMP
TEMP=$TMP
export ORACLE_SID=+ASM1
export ORACLE_BASE=/u01/app/oracle
export GRID_HOME=/u01/app/12.1.0.1/grid
export ORACLE_HOME=$ORACLE_BASE/product/12.1.0.1/dbhome_1
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
export ORACLE_TERM=xterm
export
PATH=$PATH:$ORACLE_HOME/bin:$PATH:$GRID_HOME/bin:/usr/bin:/sbin:/usr/
sbin:$ORACLE_HOME/OPatch
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
export PS1="[${LOGNAME}@`hostname -s`:"'${PWD} [${ORACLE_SID}] ]$ '
export PERL_HOME=/usr/local/perl
export PERL5LIB=$PERL_HOME/lib
export SQLPATH=/home/oracle/scripts-ora
Configurar o /etc/hosts
vi /etc/hosts
#bond0 (eth0 + eth1)- PUBLIC
192.168.1.11racnode1.home.localracnode1
192.168.1.12racnode2.home.localracnode2
#VIP
192.168.1.21racnode1-vip.home.localracnode1-vip
192.168.1.22racnode2-vip.home.local racnode2-vip
#eth2 - PRIVATE
10.1.0.1 racnode1-pvt
10.11.0.1racnode2-pvt
#eth2 - PRIVATE
#10.1.0.2 racnode1-pvt
#10.11.0.2 racnode2-pvt
#RAC SCAN
#192.168.1.5rac-scan.home.local rac-scan
#192.168.1.6 rac-scan.home.local rac-scan
#192.168.1.7 rac-scan.home.local rac-scan
#DNS - Gridserver
192.168.1.8 gridserver.home.local gridserver
Configurar o NTPD em todos os NODES
Instalar o NTPD (/etc/init.d/ntpd)
rpm -ivh ntp*
manter o /etc/ntp.conf
editar o /etc/sysconfig/ntpd (acionar o "-x")
cat /etc/sysconfig/ntpd
# Drop root to id 'ntp:ntp' by default.
OPTIONS="-x -u ntp:ntp -p /var/run/ntpd.pid"
# Set to 'yes' to sync hw clock after successful ntpdate
SYNC_HWCLOCK=no
# Additional options for ntpdate
NTPDATE_OPTIONS=""
# service ntpd restart
Configurar o a equivalência de senhas entre usuários
O instalador do GRID / DATABASE possui este recurso, portanto neste momento é opcional.
#cd /home/oracle
#mkdir ~/.ssh
#chmod 700 ~/.ssh
#ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/oracle/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Passphrases do not match. Try again.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/oracle/.ssh/id_rsa.
Your public key has been saved in /home/oracle/.ssh/id_rsa.pub.
The key fingerprint is:
30:f4:8f:b9:51:43:9b:65:0a:b6:36:cd:0e:a4:92:54 oracle@racnode1
#cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
#ssh racnode2 cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
# cat .ssh/authorized_keys | ssh racnode2 "cat >> .ssh/authorized_keys"
Conectar em todos os host via ssh, através das interfaces públicas e privadas para popular o arquivo authorized_keys até que não sejam mais solicitadas confirmações pelo ssh.
Download de Software
Copiar todos os pacotes de instalação para o diretório /u01/install:
Efetuar download dos Binários do GRID + Database do link:
http://www.oracle.com/technetwork/database/enterprise-edition/downloads/database12c-linux-download-1959253.html
Nenhum Patch e Patchset Ainda disponível
Efetuar download do OPATCH 12.0.1.1 do note: 6880880
Efetuar download do htop (http://htop.sourceforge.net)
Efetuar download do YAST (https://oss.oracle.com/projects/yast/files/el5/x86_64/)
Efetuar download do INQ (ftp://ftp.emc.com/pub/elab/inquiry/v7.3.0.1)
ASMLIB
O ASMLIB é uma biblioteca Oracle desenvolvida para identificar discos / luns ou partições para o ASM. Esta biblioteca facilita a administração dos discos para o Oracle Grid Infrastructure.
Local para Download dos drivers do ASMLIB:
http://www.oracle.com/technetwork/server-storage/linux/downloads/rhel5-084877.html
Verificando o Kernel
uname -r
Instação dos Pacotes RPM
** IMPORTANTE **
Devido a utilização do Kernel uek, deve-se apenas instalar o “Library and Tools” pois o driver do ASMLIB já está incluso no kernel.
Intel EM64t (x86_64) Architecture
http://www.oracle.com/technetwork/server-storage/linux/downloads/rhel5-084877.html#oracleasm_rhel5_amd64
Library and Tools
oracleasm-support-2.1.8-1.el5.x86_64.rpm
oracleasmlib-2.0.4-1.el5.x86_64.rpm
Ajustar diretório de Instalação
Copiar todos os arquivos de instalação para o Servidor Node 1
# mkdir –p /u01/install
# chmod 777 /u01/install/
# chown oracle:oinstall /u01/install/
Instalar RPMs
ASMLIBrpms
# mkdir –p /u01/install
# rpm -Uvh oracleasm*
warning: oracleasmlib-2.0.4-1.el5.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159
Preparing... ########################################### [100%]
1:oracleasm-support ########################################### [ 50%]
2:oracleasmlib ########################################### [100%]
Configurando o Driver ASMLIB
Executar como “root”
# /etc/init.d/oracleasm configure
Configuring the Oracle ASM library driver.
This will configure the on-boot properties of the Oracle ASM library driver. The following questions will
determine whether the driver is loaded on boot and what permissions it will have. The current values will be
shown in brackets ('[]'). Hitting without typing an answer will keep that current value. Ctrl-C will abort. Default user to own the driver interface []: grid Default group to own the driver interface []: asmdba Start Oracle ASM library driver on boot (y/n) [n]: y Scan for Oracle ASM disks on boot (y/n) [y]: y Writing Oracle ASM library driver configuration: done Initializing the Oracle ASMLib driver: [ OK ] Scanning the system for Oracle ASMLib disks: [ OK ]
Particionando discos para o ASM
Executar como “root”
**IMPORTANTE**
Neste momento é importante observer que o exemplo abaixo somente mostra como é executada a criação de uma partição. Os tamanhos e devices são definidos conforme cada instalação.
# fdisk /dev/iscsi/openfiler-asm_ocr1/part
Command (m for help): p
Disk /dev/iscsi/openfiler-asm_ocr1/part: 2013 MB, 2013265920 bytes
62 heads, 62 sectors/track, 1022 cylinders
Units = cylinders of 3844 * 512 = 1968128 bytes
Device Boot Start End Blocks Id System
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-1022, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-1022, default 1022):
Using default value 1022
Command (m for help): p
Disk /dev/iscsi/openfiler-asm_ocr1/part: 2013 MB, 2013265920 bytes
62 heads, 62 sectors/track, 1022 cylinders
Units = cylinders of 3844 * 512 = 1968128 bytes
Device Boot Start End Blocks Id System
/dev/iscsi/openfiler-asm_ocr1/part1 1 1022 1964253 83 Linux
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
Criando discos para o ASM
Executar como “root”
#/usr/sbin/oracleasm createdisk disk_name device_partition_name
Exemplos:
#/usr/sbin/oracleasm createdisk ASMDATA01 /dev/iscsi/openfiler-asm_data1/part1
Writing disk header: done
Instantiating disk: done
#/usr/sbin/oracleasm createdisk ASMOCR01 /dev/iscsi/openfiler-asm_ocr1/part1
Writing disk header: done
Instantiating disk: done
Para excluir um disco:
/usr/sbin/oracleasm deletedisk disk_name
Após a Criação, fazer a listagem dos discos:
# /usr/sbin/oracleasm listdisks
ASMDATA01
ASMOCR01
Ir para o Node 2:
#/usr/sbin/oracleasm scandisks
Reloading disk partitions: done
Cleaning any stale ASM disks...
Scanning system for ASM disks...
Instantiating disk "ASMOCR01"
Instantiating disk "ASMDATA01"
# /usr/sbin/oracleasm listdisks
ASMDATA01
ASMOCR01
Descompactar Binários
# cd /u01/install
# mkdir RAC_DB_12c
# mv linuxamd64_12c_* RAC_DB_12c/
# cd RAC_DB_12c/
# chown oracle:oinstall -R RAC_DB_12c/
# unzip linuxamd64_12c_database_1of2.zip
# unzip linuxamd64_12c_database_2of2.zip
# su - grid
# unzip linuxamd64_12c_grid_1of2.zip
# unzip linuxamd64_12c_grid_2of2.zip
ValidaçãoPré-instalação
# su – grid
# cd /u01/install/RAC_DB_12c/grid
# ./runcluvfy.sh stage -pre crsinst -n racnode1,racnode2
# ./runcluvfy.sh stage -pre crsinst -n racnode1,racnode2
Performing pre-checks for cluster services setup
Checking node reachability...
Node reachability check passed from node "racnode1"
Checking user equivalence...
User equivalence check passed for user "grid"
Checking node connectivity...
Checking hosts config file...
Verification of the hosts config file successful
Node connectivity passed for subnet "10.11.0.0" with node(s) racnode1,racnode2
TCP connectivity check passed for subnet "10.11.0.0"
Node connectivity passed for subnet "10.1.0.0" with node(s) racnode1,racnode2
TCP connectivity check passed for subnet "10.1.0.0"
Node connectivity passed for subnet "192.168.1.0" with node(s) racnode1,racnode2
TCP connectivity check passed for subnet "192.168.1.0"
Interfaces found on subnet "192.168.1.0" that are likely candidates for VIP are:
racnode1 bond0:192.168.1.11
racnode2 bond0:192.168.1.12
Interfaces found on subnet "10.11.0.0" that are likely candidates for a private interconnect are:
racnode1 eth2:10.11.0.1
racnode2 eth2:10.11.0.2
Interfaces found on subnet "10.1.0.0" that are likely candidates for a private interconnect are:
racnode1 eth3:10.1.0.1
racnode2 eth3:10.1.0.2
Checking subnet mask consistency...
Subnet mask consistency check passed for subnet "10.11.0.0".
Subnet mask consistency check passed for subnet "10.1.0.0".
Subnet mask consistency check passed for subnet "192.168.1.0".
Subnet mask consistency check passed.
Node connectivity check passed
Checking multicast communication...
Checking subnet "10.11.0.0" for multicast communication with multicast group "224.0.0.251"...
Check of subnet "10.11.0.0" for multicast communication with multicast group "224.0.0.251" passed.
Check of multicast communication passed.
Checking ASMLib configuration.
Check for ASMLib configuration passed.
Total memory check passed
Available memory check passed
Swap space check passed
Free disk space check passed for "racnode2:/usr,racnode2:/var,racnode2:/etc,racnode2:/sbin,racnode2:/tmp"
Free disk space check passed for "racnode1:/usr,racnode1:/var,racnode1:/etc,racnode1:/sbin,racnode1:/tmp"
Check for multiple users with UID value 501 passed
User existence check passed for "grid"
Group existence check passed for "oinstall"
Group existence check passed for "dba"
Membership check for user "grid" in group "oinstall" [as Primary] passed
Membership check for user "grid" in group "dba" passed
Run level check passed
Hard limits check passed for "maximum open file descriptors"
Soft limits check passed for "maximum open file descriptors"
Hard limits check passed for "maximum user processes"
Soft limits check passed for "maximum user processes"
System architecture check passed
Kernel version check passed
Kernel parameter check passed for "semmsl"
Kernel parameter check passed for "semmns"
Kernel parameter check passed for "semopm"
Kernel parameter check passed for "semmni"
Kernel parameter check passed for "shmmax"
Kernel parameter check passed for "shmmni"
Kernel parameter check passed for "shmall"
Kernel parameter check passed for "file-max"
Kernel parameter check passed for "ip_local_port_range"
Kernel parameter check passed for "rmem_default"
Kernel parameter check passed for "rmem_max"
Kernel parameter check passed for "wmem_default"
Kernel parameter check passed for "wmem_max"
Kernel parameter check passed for "aio-max-nr"
Package existence check passed for "make"
Package existence check passed for "binutils"
Package existence check passed for "gcc(x86_64)"
Package existence check passed for "libaio(x86_64)"
Package existence check passed for "glibc(x86_64)"
Package existence check passed for "compat-libstdc++-33(x86_64)"
Package existence check passed for "glibc-devel(x86_64)"
Package existence check passed for "gcc-c++(x86_64)"
Package existence check passed for "libaio-devel(x86_64)"
Package existence check passed for "libgcc(x86_64)"
Package existence check passed for "libstdc++(x86_64)"
Package existence check passed for "libstdc++-devel(x86_64)"
Package existence check passed for "sysstat"
Package existence check passed for "ksh"
Package existence check passed for "nfs-utils"
Checking availability of ports "6200,6100" required for
component "Oracle Notification Service (ONS)"
Port availability check passed for ports "6200,6100"
Check for multiple users with UID value 0 passed
Current group ID check passed
Starting check for consistency of primary group of root user
Check for consistency of root user's primary group passed
Starting Clock synchronization checks using Network Time Protocol(NTP)...
NTP Configuration file check started...
NTP Configuration file check passed
Checking daemon liveness...
Liveness check passed for "ntpd"
Check for NTP daemon or service alive passed on all nodes
NTP common Time Server Check started...
Check of common NTP Time Server passed
Clock time offset check from NTP Time Server started...
Clock time offset check passed
Clock synchronization check using Network Time Protocol(NTP) passed
Core file name pattern consistency check passed.
User "grid" is not part of "root" group. Check passed
Default user file creation mask check passed
Checking integrity of file "/etc/resolv.conf" across nodes
"domain" and "search" entries do not coexist in any "/etc/resolv.conf" file
All nodes have same "search" order defined in file "/etc/resolv.conf"
The DNS response time for an unreachable node is within acceptable limit on all nodes
Check for integrity of file "/etc/resolv.conf" passed
Time zone consistency check passed
Checking integrity of name service switch configuration file "/etc/nsswitch.conf" ...
All nodes have same "hosts" entry defined in file "/etc/nsswitch.conf"
Check for integrity of name service switch configuration file "/etc/nsswitch.conf" passed
Checking daemon "avahi-daemon" is not configured and running
Daemon not configured check passed for process "avahi-daemon"
Daemon not running check passed for process "avahi-daemon"
Starting check for /dev/shm mounted as temporary file system ...
Check for /dev/shm mounted as temporary file system passed
Starting check for /boot mount ...
Check for /boot mount passed
Starting check for zeroconf check ...
Check for zeroconf check passed
Pre-check for cluster services setup was successful on all the nodes.
________________________________________
Victor Armbrust é DBA há 10 anos, especialista em Banco de Dados Oracle e Bacharel em Ciências da Computação. Com sólidos conhecimentos em Banco de Dados e Sistemas operacionais, possui certificações OCP 10g/11g. Eleito Oracle ACE Member em 2013.
Consultor de Banco de
Oracle Time Cluster Synchronization Services
https://startupforce.wordpress.com/2013/08/17/disable-ntpd-and-make-ctssd-active-11gr2-rac/
We have two options to synchronize time on our clusters,
1. Using NTP or
2. Using Oracle Cluster Synchronization Services Deamon (ctssd)
By default, if a time sync software is running like NTP, ctssd will run in observer mode. In this tutorial we will see how to start ctssd in active mode
1. Check if ctssd is active or not
[grid@rac1 ~]$ crsctl check ctss
CRS-4700: The Cluster Time Synchronization Service is in Observer mode.
[grid@rac2 ~]$ crsctl check ctss
CRS-4700: The Cluster Time Synchronization Service is in Observer mode.
We can see that CTSSD is in observer mode
2. De-configure NTP.
#crsctl stop crs
#/sbin/service ntpd stop
#chkconfig ntpd off
#chkconfig --list ntpd
#mv /etc/ntp.conf /etc/ntp.conf.original
#rm /var/run/ntpd.pid
3. Start the cluster on all nodes
#crsctl start cluster
4. Check that ctssd automatically starts in active mode as
CRS-4701: The Cluster Time Synchronization Service is in Active mode.
CRS-4702: Offset (in msec): 0
[root@rac2 etc]# crsctl check ctss
CRS-4701: The Cluster Time Synchronization Service is in Active mode.
CRS-4702: Offset (in msec): 0
Wednesday, October 26, 2016
runcluvfy.sh Prerequisite check for Oracle12c RAC Cluster Installation
/TapeBackup/GRID_SOFTWARE/GRID_12.1.0.2/grid/runcluvfy.sh stage -pre crsinst -n mof-pidmdb01,mof-pidmdb02 -verbose
/TapeBackup/GRID_SOFTWARE/GRID_12.1.0.2/grid/runcluvfy.sh stage -post hwos -n mof-pidmdb01,mof-pidmdb02 -verbose
http://myorastuff.blogspot.qa/2016/03/prerequisite-check-for-oracle12c-rac.html
Prerequisite check for Oracle12c RAC Cluster Installation
I am about to install Oracle12c Cluster on two node RAC. I am checking all the prerequisite before i start the cluster installation. I thought, i might be helpful for others if i post the things to be checked before we start installing the cluster software.
The RAC nodes are already built and ready to install the cluster. My hostnames are ractest4 & racttest5.
Here is my ip info.
Step 1 : Make sure you have either root password or Oracle account with sudo to root privileges to install cluster software. It ask to enter the password in the middle of the installation. I carry root password for my installation.
Step 2 : Make sure you are able to ping public ip and private ip between two nodes.
Public IP
[oracle@RACTEST4 grid]$ ping 192.168.56.212
PING 192.168.56.212 (192.168.56.212) 56(84) bytes of data.
64 bytes from 192.168.56.212: icmp_seq=1 ttl=64 time=1.49 ms
64 bytes from 192.168.56.212: icmp_seq=2 ttl=64 time=0.416 ms
64 bytes from 192.168.56.212: icmp_seq=3 ttl=64 time=0.411 ms
64 bytes from 192.168.56.212: icmp_seq=4 ttl=64 time=0.479 ms
^C
--- 192.168.56.212 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3362ms
rtt min/avg/max/mdev = 0.411/0.699/1.493/0.459 ms
[oracle@RACTEST4 grid]$
[root@RACTEST5 ~]# ping 192.168.56.211
PING 192.168.56.211 (192.168.56.211) 56(84) bytes of data.
64 bytes from 192.168.56.211: icmp_seq=1 ttl=64 time=0.324 ms
64 bytes from 192.168.56.211: icmp_seq=2 ttl=64 time=0.425 ms
64 bytes from 192.168.56.211: icmp_seq=3 ttl=64 time=0.468 ms
64 bytes from 192.168.56.211: icmp_seq=4 ttl=64 time=0.436 ms
^C
--- 192.168.56.211 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3469ms
rtt min/avg/max/mdev = 0.324/0.413/0.468/0.055 ms
[root@RACTEST5 ~]#
Private IP
[oracle@RACTEST4 grid]$ ping 192.168.1.212
PING 192.168.1.212 (192.168.1.212) 56(84) bytes of data.
64 bytes from 192.168.1.212: icmp_seq=1 ttl=64 time=0.387 ms
64 bytes from 192.168.1.212: icmp_seq=2 ttl=64 time=0.403 ms
64 bytes from 192.168.1.212: icmp_seq=3 ttl=64 time=0.384 ms
64 bytes from 192.168.1.212: icmp_seq=4 ttl=64 time=0.410 ms
^C
--- 192.168.1.212 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3245ms
rtt min/avg/max/mdev = 0.384/0.396/0.410/0.010 ms
[oracle@RACTEST4 grid]$
[root@RACTEST5 ~]# ping 192.168.1.211
PING 192.168.1.211 (192.168.1.211) 56(84) bytes of data.
64 bytes from 192.168.1.211: icmp_seq=1 ttl=64 time=1.76 ms
64 bytes from 192.168.1.211: icmp_seq=2 ttl=64 time=0.443 ms
64 bytes from 192.168.1.211: icmp_seq=3 ttl=64 time=0.348 ms
^C
--- 192.168.1.211 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2393ms
rtt min/avg/max/mdev = 0.348/0.853/1.768/0.648 ms
[root@RACTEST5 ~]#
Step 3 : Make sure you see the ASM disk on both the nodes.
[root@RACTEST4 ~]# oracleasm listdisks
DISK1
[root@RACTEST4 ~]#
[root@RACTEST5 ~]# oracleasm listdisks
DISK1
[root@RACTEST5 ~]#
Step 4 : Run the cluster verification utility. The runcluvfy.sh script found in the grid directory, the same directory where you find runinstaller. This utility helps resolve problems before running runInstaller script.
runcluvfy.sh stage -pre crsinst -n ractest4,ractest5
By default the CVU reports in non verbose mode by only reporting the summary of a test, we can obtain detailed output by using the -verbose argument. The -verbose argument produces detailed output of individual checks and where applicable shows results for each node in a tabular layout.
runcluvfy.sh stage -pre crsinst -n ractest4,ractest5 -verbose
[oracle@RACTEST4 grid]$ ls -l runcluvfy.sh
-rwxr-xr-x. 1 root root 5085 Dec 20 2013 runcluvfy.sh
[oracle@RACTEST4 grid]$ ./runcluvfy.sh stage -pre crsinst -n ractest4,ractest5
Performing pre-checks for cluster services setup
Checking node reachability...
Node reachability check passed from node "ractest4"
Checking user equivalence...
PRVG-2019 : Check for equivalence of user "oracle" from node "ractest4" to node "ractest5" failed
PRKC-1044 : Failed to check remote command execution setup for node ractest5 using shells /usr/bin/ssh and /usr/bin/rsh
File "/usr/bin/rsh" does not exist on node "ractest5"
No RSA host key is known for ractest5 and you have requested strict checking.Host key verification failed.
PRVG-2019 : Check for equivalence of user "oracle" from node "ractest4" to node "ractest4" failed
PRKC-1044 : Failed to check remote command execution setup for node ractest4 using shells /usr/bin/ssh and /usr/bin/rsh
File "/usr/bin/rsh" does not exist on node "ractest4"
No RSA host key is known for ractest4 and you have requested strict checking.Host key verification failed.
ERROR:
User equivalence unavailable on all the specified nodes
Verification cannot proceed
Pre-check for cluster services setup was unsuccessful on all the nodes.
[oracle@RACTEST4 grid]$
It seems ssh is not setup between two nodes. Let me setup the ssh.
Step 5 : Setup the ssh between two nodes.
Login to sshsetup directory and run the below commands. My sshsetup location is /backup/software/cluster/grid/sshsetup
./sshUserSetup.sh -user oracle -hosts "ractest4 ractest5" -noPromptPassphrase
[oracle@RACTEST4 sshsetup]$ ./sshUserSetup.sh -user oracle -hosts "ractest4 ractest5" -noPromptPassphrase
The output of this script is also logged into /tmp/sshUserSetup_2016-03-17-09-19-03.log
Hosts are ractest4 ractest5
user is oracle
Platform:- Linux
Checking if the remote hosts are reachable
PING RACTEST4.localdomain (192.168.56.211) 56(84) bytes of data.
64 bytes from RACTEST4.localdomain (192.168.56.211): icmp_seq=1 ttl=64 time=0.012 ms
64 bytes from RACTEST4.localdomain (192.168.56.211): icmp_seq=2 ttl=64 time=0.032 ms
64 bytes from RACTEST4.localdomain (192.168.56.211): icmp_seq=3 ttl=64 time=0.029 ms
64 bytes from RACTEST4.localdomain (192.168.56.211): icmp_seq=4 ttl=64 time=0.030 ms
64 bytes from RACTEST4.localdomain (192.168.56.211): icmp_seq=5 ttl=64 time=0.029 ms
--- RACTEST4.localdomain ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 3999ms
rtt min/avg/max/mdev = 0.012/0.026/0.032/0.008 ms
PING RACTEST5.localdomain (192.168.56.212) 56(84) bytes of data.
64 bytes from RACTEST5.localdomain (192.168.56.212): icmp_seq=1 ttl=64 time=0.382 ms
64 bytes from RACTEST5.localdomain (192.168.56.212): icmp_seq=2 ttl=64 time=0.407 ms
64 bytes from RACTEST5.localdomain (192.168.56.212): icmp_seq=3 ttl=64 time=0.371 ms
64 bytes from RACTEST5.localdomain (192.168.56.212): icmp_seq=4 ttl=64 time=0.418 ms
64 bytes from RACTEST5.localdomain (192.168.56.212): icmp_seq=5 ttl=64 time=0.416 ms
--- RACTEST5.localdomain ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4001ms
rtt min/avg/max/mdev = 0.371/0.398/0.418/0.031 ms
Remote host reachability check succeeded.
The following hosts are reachable: ractest4 ractest5.
The following hosts are not reachable: .
All hosts are reachable. Proceeding further...
firsthost ractest4
numhosts 2
The script will setup SSH connectivity from the host RACTEST4.localdomain to all
the remote hosts. After the script is executed, the user can use SSH to run
commands on the remote hosts or copy files between this host RACTEST4.localdomain
and the remote hosts without being prompted for passwords or confirmations.
NOTE 1:
As part of the setup procedure, this script will use ssh and scp to copy
files between the local host and the remote hosts. Since the script does not
store passwords, you may be prompted for the passwords during the execution of
the script whenever ssh or scp is invoked.
NOTE 2:
AS PER SSH REQUIREMENTS, THIS SCRIPT WILL SECURE THE USER HOME DIRECTORY
AND THE .ssh DIRECTORY BY REVOKING GROUP AND WORLD WRITE PRIVILEDGES TO THESE
directories.
Do you want to continue and let the script make the above mentioned changes (yes/no)?
yes
The user chose yes
User chose to skip passphrase related questions.
Creating .ssh directory on local host, if not present already
Creating authorized_keys file on local host
Changing permissions on authorized_keys to 644 on local host
Creating known_hosts file on local host
Changing permissions on known_hosts to 644 on local host
Creating config file on local host
If a config file exists already at /home/oracle/.ssh/config, it would be backed up to /home/oracle/.ssh/config.backup.
Removing old private/public keys on local host
Running SSH keygen on local host with empty passphrase
Generating public/private rsa key pair.
Your identification has been saved in /home/oracle/.ssh/id_rsa.
Your public key has been saved in /home/oracle/.ssh/id_rsa.pub.
The key fingerprint is:
94:de:17:5e:0e:08:fb:3f:eb:6f:f8:0f:3f:3f:6e:f2 oracle@RACTEST4.localdomain
The key's randomart image is:
+--[ RSA 1024]----+
| . |
| + . |
| + . o . |
| o o . = |
| S o o . |
| o |
| o.. |
| .+.* |
| .o+BEB|
+-----------------+
Creating .ssh directory and setting permissions on remote host ractest4
THE SCRIPT WOULD ALSO BE REVOKING WRITE PERMISSIONS FOR group AND others ON THE HOME DIRECTORY FOR oracle. THIS IS AN SSH REQUIREMENT.
The script would create ~oracle/.ssh/config file on remote host ractest4. If a config file exists already at ~oracle/.ssh/config, it would be backed up to ~oracle/.ssh/config.backup.
The user may be prompted for a password here since the script would be running SSH on host ractest4.
Warning: Permanently added 'ractest4,192.168.56.211' (RSA) to the list of known hosts.
oracle@ractest4's password:
Done with creating .ssh directory and setting permissions on remote host ractest4.
Creating .ssh directory and setting permissions on remote host ractest5
THE SCRIPT WOULD ALSO BE REVOKING WRITE PERMISSIONS FOR group AND others ON THE HOME DIRECTORY FOR oracle. THIS IS AN SSH REQUIREMENT.
The script would create ~oracle/.ssh/config file on remote host ractest5. If a config file exists already at ~oracle/.ssh/config, it would be backed up to ~oracle/.ssh/config.backup.
The user may be prompted for a password here since the script would be running SSH on host ractest5.
Warning: Permanently added 'ractest5,192.168.56.212' (RSA) to the list of known hosts.
oracle@ractest5's password:
Done with creating .ssh directory and setting permissions on remote host ractest5.
Copying local host public key to the remote host ractest4
The user may be prompted for a password or passphrase here since the script would be using SCP for host ractest4.
oracle@ractest4's password:
Done copying local host public key to the remote host ractest4
Copying local host public key to the remote host ractest5
The user may be prompted for a password or passphrase here since the script would be using SCP for host ractest5.
oracle@ractest5's password:
Done copying local host public key to the remote host ractest5
cat: /home/oracle/.ssh/known_hosts.tmp: No such file or directory
cat: /home/oracle/.ssh/authorized_keys.tmp: No such file or directory
SSH setup is complete.
------------------------------------------------------------------------
Verifying SSH setup
===================
The script will now run the date command on the remote nodes using ssh
to verify if ssh is setup correctly. IF THE SETUP IS CORRECTLY SETUP,
THERE SHOULD BE NO OUTPUT OTHER THAN THE DATE AND SSH SHOULD NOT ASK FOR
PASSWORDS. If you see any output other than date or are prompted for the
password, ssh is not setup correctly and you will need to resolve the
issue and set up ssh again.
The possible causes for failure could be:
1. The server settings in /etc/ssh/sshd_config file do not allow ssh
for user oracle.
2. The server may have disabled public key based authentication.
3. The client public key on the server may be outdated.
4. ~oracle or ~oracle/.ssh on the remote host may not be owned by oracle.
5. User may not have passed -shared option for shared remote users or
may be passing the -shared option for non-shared remote users.
6. If there is output in addition to the date, but no password is asked,
it may be a security alert shown as part of company policy. Append the
additional text to the /sysman/prov/resources/ignoreMessages.txt file.
------------------------------------------------------------------------
--ractest4:--
Running /usr/bin/ssh -x -l oracle ractest4 date to verify SSH connectivity has been setup from local host to ractest4.
IF YOU SEE ANY OTHER OUTPUT BESIDES THE OUTPUT OF THE DATE COMMAND OR IF YOU ARE PROMPTED FOR A PASSWORD HERE, IT MEANS SSH SETUP HAS NOT BEEN SUCCESSFUL. Please note that being prompted for a passphrase may be OK but being prompted for a password is ERROR.
Thu Mar 17 09:21:15 EDT 2016
------------------------------------------------------------------------
--ractest5:--
Running /usr/bin/ssh -x -l oracle ractest5 date to verify SSH connectivity has been setup from local host to ractest5.
IF YOU SEE ANY OTHER OUTPUT BESIDES THE OUTPUT OF THE DATE COMMAND OR IF YOU ARE PROMPTED FOR A PASSWORD HERE, IT MEANS SSH SETUP HAS NOT BEEN SUCCESSFUL. Please note that being prompted for a passphrase may be OK but being prompted for a password is ERROR.
Thu Mar 17 09:21:15 EDT 2016
------------------------------------------------------------------------
SSH verification complete.
[oracle@RACTEST4 sshsetup]$
Step 6 : Re run the runcluvfy.sh again and see any issues.
[oracle@RACTEST4 grid]$ ./runcluvfy.sh stage -pre crsinst -n ractest4,ractest5
Performing pre-checks for cluster services setup
Checking node reachability...
Node reachability check passed from node "ractest4"
Checking user equivalence...
User equivalence check passed for user "oracle"
Checking node connectivity...
Checking hosts config file...
Verification of the hosts config file successful
Node connectivity passed for subnet "192.168.56.0" with node(s) ractest5,ractest4
TCP connectivity check passed for subnet "192.168.56.0"
Node connectivity passed for subnet "192.168.1.0" with node(s) ractest5,ractest4
TCP connectivity check passed for subnet "192.168.1.0"
Interfaces found on subnet "192.168.56.0" that are likely candidates for VIP are:
ractest5 eth0:192.168.56.212
ractest4 eth0:192.168.56.211
Interfaces found on subnet "192.168.1.0" that are likely candidates for a private interconnect are:
ractest5 eth3:192.168.1.212
ractest4 eth1:192.168.1.211
WARNING:
Could not find a suitable set of interfaces with the same name for the private interconnect
Checking subnet mask consistency...
Subnet mask consistency check passed for subnet "192.168.56.0".
Subnet mask consistency check passed for subnet "192.168.1.0".
Subnet mask consistency check passed.
Node connectivity check passed
Checking multicast communication...
Checking subnet "192.168.56.0" for multicast communication with multicast group "224.0.0.251"...
Check of subnet "192.168.56.0" for multicast communication with multicast group "224.0.0.251" passed.
Check of multicast communication passed.
Checking ASMLib configuration.
Check for ASMLib configuration passed.
Total memory check failed
Check failed on nodes:
ractest5,ractest4
Available memory check passed
Swap space check passed
Free disk space check passed for "ractest5:/usr,ractest5:/var,ractest5:/etc,ractest5:/sbin,ractest5:/tmp"
Free disk space check passed for "ractest4:/usr,ractest4:/var,ractest4:/etc,ractest4:/sbin,ractest4:/tmp"
Check for multiple users with UID value 60321 passed
User existence check passed for "oracle"
Group existence check passed for "oinstall"
Group existence check passed for "dba"
Membership check for user "oracle" in group "oinstall" [as Primary] passed
Membership check for user "oracle" in group "dba" passed
Run level check passed
Hard limits check passed for "maximum open file descriptors"
Soft limits check passed for "maximum open file descriptors"
Hard limits check passed for "maximum user processes"
Soft limits check passed for "maximum user processes"
System architecture check passed
Kernel version check passed
Kernel parameter check passed for "semmsl"
Kernel parameter check passed for "semmns"
Kernel parameter check passed for "semopm"
Kernel parameter check passed for "semmni"
Kernel parameter check passed for "shmmax"
Kernel parameter check passed for "shmmni"
Kernel parameter check passed for "shmall"
Kernel parameter check passed for "file-max"
Kernel parameter check passed for "ip_local_port_range"
Kernel parameter check passed for "rmem_default"
Kernel parameter check passed for "rmem_max"
Kernel parameter check passed for "wmem_default"
Kernel parameter check passed for "wmem_max"
Kernel parameter check passed for "aio-max-nr"
PRVG-1206 : Check cannot be performed for configured value of kernel parameter "panic_on_oops" on node "ractest5"
PRVG-1206 : Check cannot be performed for configured value of kernel parameter "panic_on_oops" on node "ractest4"
Kernel parameter check passed for "panic_on_oops"
Package existence check passed for "binutils"
Package existence check passed for "compat-libcap1"
Package existence check passed for "compat-libstdc++-33(x86_64)"
Package existence check passed for "libgcc(x86_64)"
Package existence check passed for "libstdc++(x86_64)"
Package existence check passed for "libstdc++-devel(x86_64)"
Package existence check passed for "sysstat"
Package existence check passed for "gcc"
Package existence check passed for "gcc-c++"
Package existence check passed for "ksh"
Package existence check passed for "make"
Package existence check passed for "glibc(x86_64)"
Package existence check passed for "glibc-devel(x86_64)"
Package existence check passed for "libaio(x86_64)"
Package existence check passed for "libaio-devel(x86_64)"
Package existence check passed for "nfs-utils"
Checking availability of ports "6200,6100" required for component "Oracle Notification Service (ONS)"
Port availability check passed for ports "6200,6100"
Checking availability of ports "42424" required for component "Oracle Cluster Synchronization Services (CSSD)"
Port availability check passed for ports "42424"
Check for multiple users with UID value 0 passed
Current group ID check passed
Starting check for consistency of primary group of root user
Check for consistency of root user's primary group passed
Starting Clock synchronization checks using Network Time Protocol(NTP)...
NTP configuration file "/etc/ntp.conf" existence check passed
No NTP Daemons or Services were found to be running
PRVF-5507 : NTP daemon or service is not running on any node but NTP configuration file exists on the following node(s):
ractest5,ractest4
Clock synchronization check using Network Time Protocol(NTP) failed
Core file name pattern consistency check passed.
User "oracle" is not part of "root" group. Check passed
Default user file creation mask check passed
Checking integrity of file "/etc/resolv.conf" across nodes
"domain" and "search" entries do not coexist in any "/etc/resolv.conf" file
All nodes have same "search" order defined in file "/etc/resolv.conf"
The DNS response time for an unreachable node is within acceptable limit on all nodes
Check for integrity of file "/etc/resolv.conf" passed
Time zone consistency check passed
Checking integrity of name service switch configuration file "/etc/nsswitch.conf" ...
All nodes have same "hosts" entry defined in file "/etc/nsswitch.conf"
Check for integrity of name service switch configuration file "/etc/nsswitch.conf" passed
Checking daemon "avahi-daemon" is not configured and running
Daemon not configured check passed for process "avahi-daemon"
Daemon not running check passed for process "avahi-daemon"
Starting check for /dev/shm mounted as temporary file system ...
Check for /dev/shm mounted as temporary file system passed
Starting check for /boot mount ...
Check for /boot mount passed
Starting check for zeroconf check ...
ERROR:
PRVE-10077 : NOZEROCONF parameter was not specified or was not set to 'yes' in file "/etc/sysconfig/network" on node "RACTEST5.localdomain"
PRVE-10077 : NOZEROCONF parameter was not specified or was not set to 'yes' in file "/etc/sysconfig/network" on node "RACTEST4.localdomain"
Check for zeroconf check failed
Pre-check for cluster services setup was unsuccessful on all the nodes.
[oracle@RACTEST4 grid]$
Now ssh issue resolved! but still there are four more issues appeared.
Issue 1
The /etc/udev/rules.d/70-persistent-net.rules file has some incorrect naming convention. I fixed this file.
WARNING:
Could not find a suitable set of interfaces with the same name for the private interconnect
Issue 2
Added below entry in /etc/sysctl.conf file on both node
kernel.panic_on_oops = 1
Run the sysctl -p on both nodes.
PRVG-1206 : Check cannot be performed for configured value of kernel parameter "panic_on_oops" on node "ractest5"
PRVG-1206 : Check cannot be performed for configured value of kernel parameter "panic_on_oops" on node "ractest4"
Issue 3The below issue can be ignored. Since we are configuring NTP protocol. CSSD will take care of time synchronization.
Clock synchronization check using Network Time Protocol(NTP) failed
Issue 4
Added below entry in /etc/sysconfig/network file on both nodes and restart the network service.
NOZEROCONF=yes
ERROR:
PRVE-10077 : NOZEROCONF parameter was not specified or was not set to 'yes' in file "/etc/sysconfig/network" on node "RACTEST5.localdomain"
PRVE-10077 : NOZEROCONF parameter was not specified or was not set to 'yes' in file "/etc/sysconfig/network" on node "RACTEST4.localdomain"
Check for zeroconf check failed
Step 7 : Re run the runcluvfy.sh again and see any issues.
[oracle@RACTEST4 grid]$ ./runcluvfy.sh stage -pre crsinst -n ractest4,ractest5
Performing pre-checks for cluster services setup
Checking node reachability...
Node reachability check passed from node "ractest4"
Checking user equivalence...
User equivalence check passed for user "oracle"
Checking node connectivity...
Checking hosts config file...
Verification of the hosts config file successful
Node connectivity passed for subnet "192.168.56.0" with node(s) ractest5,ractest4
TCP connectivity check passed for subnet "192.168.56.0"
Node connectivity passed for subnet "192.168.1.0" with node(s) ractest5,ractest4
TCP connectivity check passed for subnet "192.168.1.0"
Interfaces found on subnet "192.168.56.0" that are likely candidates for VIP are:
ractest5 eth0:192.168.56.212
ractest4 eth0:192.168.56.211
Interfaces found on subnet "192.168.1.0" that are likely candidates for a private interconnect are:
ractest5 eth1:192.168.1.212
ractest4 eth1:192.168.1.211
Checking subnet mask consistency...
Subnet mask consistency check passed for subnet "192.168.56.0".
Subnet mask consistency check passed for subnet "192.168.1.0".
Subnet mask consistency check passed.
Node connectivity check passed
Checking multicast communication...
Checking subnet "192.168.56.0" for multicast communication with multicast group "224.0.0.251"...
Check of subnet "192.168.56.0" for multicast communication with multicast group "224.0.0.251" passed.
Check of multicast communication passed.
Checking ASMLib configuration.
Check for ASMLib configuration passed.
Total memory check failed
Check failed on nodes:
ractest5,ractest4
Available memory check passed
Swap space check passed
Free disk space check passed for "ractest5:/usr,ractest5:/var,ractest5:/etc,ractest5:/sbin,ractest5:/tmp"
Free disk space check passed for "ractest4:/usr,ractest4:/var,ractest4:/etc,ractest4:/sbin,ractest4:/tmp"
Check for multiple users with UID value 60321 passed
User existence check passed for "oracle"
Group existence check passed for "oinstall"
Group existence check passed for "dba"
Membership check for user "oracle" in group "oinstall" [as Primary] passed
Membership check for user "oracle" in group "dba" passed
Run level check passed
Hard limits check passed for "maximum open file descriptors"
Soft limits check passed for "maximum open file descriptors"
Hard limits check passed for "maximum user processes"
Soft limits check passed for "maximum user processes"
System architecture check passed
Kernel version check passed
Kernel parameter check passed for "semmsl"
Kernel parameter check passed for "semmns"
Kernel parameter check passed for "semopm"
Kernel parameter check passed for "semmni"
Kernel parameter check passed for "shmmax"
Kernel parameter check passed for "shmmni"
Kernel parameter check passed for "shmall"
Kernel parameter check passed for "file-max"
Kernel parameter check passed for "ip_local_port_range"
Kernel parameter check passed for "rmem_default"
Kernel parameter check passed for "rmem_max"
Kernel parameter check passed for "wmem_default"
Kernel parameter check passed for "wmem_max"
Kernel parameter check passed for "aio-max-nr"
Kernel parameter check passed for "panic_on_oops"
Package existence check passed for "binutils"
Package existence check passed for "compat-libcap1"
Package existence check passed for "compat-libstdc++-33(x86_64)"
Package existence check passed for "libgcc(x86_64)"
Package existence check passed for "libstdc++(x86_64)"
Package existence check passed for "libstdc++-devel(x86_64)"
Package existence check passed for "sysstat"
Package existence check passed for "gcc"
Package existence check passed for "gcc-c++"
Package existence check passed for "ksh"
Package existence check passed for "make"
Package existence check passed for "glibc(x86_64)"
Package existence check passed for "glibc-devel(x86_64)"
Package existence check passed for "libaio(x86_64)"
Package existence check passed for "libaio-devel(x86_64)"
Package existence check passed for "nfs-utils"
Checking availability of ports "6200,6100" required for component "Oracle Notification Service (ONS)"
Port availability check passed for ports "6200,6100"
Checking availability of ports "42424" required for component "Oracle Cluster Synchronization Services (CSSD)"
Port availability check passed for ports "42424"
Check for multiple users with UID value 0 passed
Current group ID check passed
Starting check for consistency of primary group of root user
Check for consistency of root user's primary group passed
Starting Clock synchronization checks using Network Time Protocol(NTP)...
NTP configuration file "/etc/ntp.conf" existence check passed
No NTP Daemons or Services were found to be running
PRVF-5507 : NTP daemon or service is not running on any node but NTP configuration file exists on the following node(s):
ractest5,ractest4
Clock synchronization check using Network Time Protocol(NTP) failed
Core file name pattern consistency check passed.
User "oracle" is not part of "root" group. Check passed
Default user file creation mask check passed
Checking integrity of file "/etc/resolv.conf" across nodes
"domain" and "search" entries do not coexist in any "/etc/resolv.conf" file
All nodes have same "search" order defined in file "/etc/resolv.conf"
The DNS response time for an unreachable node is within acceptable limit on all nodes
Check for integrity of file "/etc/resolv.conf" passed
Time zone consistency check passed
Checking integrity of name service switch configuration file "/etc/nsswitch.conf" ...
All nodes have same "hosts" entry defined in file "/etc/nsswitch.conf"
Check for integrity of name service switch configuration file "/etc/nsswitch.conf" passed
Checking daemon "avahi-daemon" is not configured and running
Daemon not configured check passed for process "avahi-daemon"
Daemon not running check passed for process "avahi-daemon"
Starting check for /dev/shm mounted as temporary file system ...
Check for /dev/shm mounted as temporary file system passed
Starting check for /boot mount ...
Check for /boot mount passed
Starting check for zeroconf check ...
Check for zeroconf check passed
Pre-check for cluster services setup was unsuccessful on all the nodes.
[oracle@RACTEST4 grid]$
Now all set! It is ready to start installing the cluster software!
During the cluster software installation, i found cvuqdisk package missing.
The package is existing in software location under grid/rpm directory. I installed this package on both nodes.
[root@RACTEST4 rpm]# pwd
/backup/software/cluster/grid/rpm
[root@RACTEST4 rpm]# rpm -ivh cvuqdisk-1.0.9-1.rpm
Preparing... ########################################### [100%]
Using default group oinstall to install package
1:cvuqdisk ########################################### [100%]
[root@RACTEST4 rpm]#
[root@RACTEST5 cluster]# rpm -ivh cvuqdisk-1.0.9-1.rpm
Preparing... ########################################### [100%]
Using default group oinstall to install package
1:cvuqdisk ########################################### [100%]
[root@RACTEST5 cluster]#
Again i clicked Check Again button and now the issue is disappeared.
I am not worried about physical memory now.. NTP protocol can be ignored. since CSSD will take care of time synchronization.
We are good now!!!
Monday, October 24, 2016
CRSCTL commands reference
http://askdba.org/weblog/2008/05/crsctl-cheatsheet-2/
CRSCTL CheatSheet
Amit Bansal / 21 May, 2008
You can find below various commands which can be used to administer Oracle Clusterware using crsctl. This is for purpose of easy reference.
Start Oracle Clusterware
#crsctl start crs
Stop Oracle Clusterware
#crsctl stop crs
Enable Oracle Clusterware
#crsctl enable crs
It enables automatic startup of Clusterware daemons
Disable Oracle Clusterware
#crsctl disable crs
It disables automatic startup of Clusterware daemons. This is useful when you are performing some
operations like OS patching and does not want clusterware to start the daemons automatically.
Checking Voting disk Location
$crsctl query css votedisk
0. 0 /dev/sda3
1. 0 /dev/sda5
2. 0 /dev/sda6
Located 3 voting disk(s).
Note: -Any command which just needs to query information can be run using oracle user. But anything which alters Oracle Clusterware requires root privileges.
Add Voting disk
#crsctl add css votedisk path
Remove Voting disk
#crsctl delete css votedisk path
Check CRS Status
$crsctl check crs
Cluster Synchronization Services appears healthy
Cluster Ready Services appears healthy
Event Manager appears healthy
You can also see particular daemon status
$crsctl check cssd
Cluster Synchronization Services appears healthy
$crsctl check crsd
Cluster Ready Services appears healthy
$crsctl check evmd
Event Manager appears healthy
You can also check Clusterware status on both the nodes using
$crsctl check cluster
prod01 ONLINE
prod02 ONLINE
Checking Oracle Clusterware Version
To determine software version (binary version of the software on a particular cluster node) use
$crsctl query crs softwareversion
Oracle Clusterware version on node [prod01] is [11.1.0.6.0]
For checking active version on cluster, use
$ crsctl query crs activeversion
Oracle Clusterware active version on the cluster is [11.1.0.6.0]
As per documentation, multiple versions are used while upgrading.
There are other options for CRSCTL too which can be seen using
$crsctl
Or
$crsctl help
11.2 Reference
11.2 introduced few changes to crsctl usage. Most important is clusterized commands which allows you to perform remote operations. They are
crsctl check cluster
crsctl start cluster
crsctl stop cluster
All these commands allow following usage
Default Stop local server
-all Stop all servers
-n Stop named servers
server [...] One or more blank-separated server names
-f Force option
Let's see usage
% crsctl check cluster -all
**************************************************************
prod01:
CRS-4537: Cluster Ready Services is online
CRS-4529: Cluster Synchronization Services is online
CRS-4533: Event Manager is online
**************************************************************
prod02:
CRS-4537: Cluster Ready Services is online
CRS-4529: Cluster Synchronization Services is online
CRS-4533: Event Manager is online
**************************************************************
crsctl pin css is used to associate node name with node number. i.e if olsnodes shows prod01 as 1, then it should persist. This is helpful if you intend to run pre 11.2 database
?
1
2
#crsctl pin css -n prod01
#crsctl pin css -n prod02
To check daemon status, following commands need to be used
Check crsd - crsctl check crs
Check cssd - crsctl check crs
check evmd - crsctl check evm
crs_unregister is replaced by crsctl delete resource
crs_stat has been deprecated (though still works) and you need to use
$crsctl stat res -t
e.g
--------------------------------------------------------------------------------
NAME TARGET STATE SERVER STATE_DETAILS
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.DATA.dg
ONLINE ONLINE prod01
ONLINE ONLINE prod02
ora.FLASH.dg
ONLINE ONLINE prod01
ONLINE ONLINE prod02
ora.LISTENER.lsnr
ONLINE ONLINE prod01
ONLINE ONLINE prod02
ora.asm
ONLINE ONLINE prod01 Started
ONLINE ONLINE prod02 Started
ora.gsd
OFFLINE OFFLINE prod01
OFFLINE OFFLINE prod02
ora.net1.network
ONLINE ONLINE prod01
ONLINE ONLINE prod02
ora.ons
ONLINE ONLINE prod01
ONLINE ONLINE prod02
ora.registry.acfs
ONLINE ONLINE prod01
ONLINE ONLINE prod02
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
1 ONLINE ONLINE prod01
ora.cvu
1 ONLINE ONLINE prod01
ora.oc4j
1 ONLINE ONLINE prod01
ora.prod01.vip
1 ONLINE ONLINE prod01
ora.prod02.vip
1 ONLINE ONLINE prod02
ora.scan1.vip
1 ONLINE ONLINE prod01
ora.tintin.db
1 ONLINE ONLINE prod01 Open
2 ONLINE ONLINE prod02 Open
Wrote following awk command to give output on one line
?
1
2
crsctl status res |grep -v "^$"|awk -F "=" 'BEGIN {print " "} {printf("%s",NR%4 ? $2"|" : $2"\n")}'|sed -e 's/ *, /,/g' -e 's/, /,/g'|\
awk -F "|" 'BEGIN { printf "%-40s%-35s%-20s%-50s\n","Resource Name","Resource Type","Target ","State" }{ split ($3,trg,",") split ($4,st,",")}{for (i in trg) {printf "%-40s%-35s%-20s%-50s\n",$1,$2,trg[i],st[i]}}'
output
?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
Resource Name Resource Type Target State
ora.DATA.dg ora.diskgroup.type ONLINE ONLINE on prod01
ora.DATA.dg ora.diskgroup.type ONLINE ONLINE on prod02
ora.FLASH.dg ora.diskgroup.type ONLINE ONLINE on prod01
ora.FLASH.dg ora.diskgroup.type ONLINE ONLINE on prod02
ora.LISTENER.lsnr ora.listener.type ONLINE ONLINE on prod01
ora.LISTENER.lsnr ora.listener.type ONLINE ONLINE on prod02
ora.LISTENER_SCAN1.lsnr ora.scan_listener.type ONLINE ONLINE on prod01
ora.asm ora.asm.type ONLINE ONLINE on prod01
ora.asm ora.asm.type ONLINE ONLINE on prod02
ora.cvu ora.cvu.type ONLINE ONLINE on prod01
ora.gsd ora.gsd.type OFFLINE OFFLINE
ora.gsd ora.gsd.type OFFLINE OFFLINE
ora.net1.network ora.network.type ONLINE ONLINE on prod01
ora.net1.network ora.network.type ONLINE ONLINE on prod02
ora.oc4j ora.oc4j.type ONLINE ONLINE on prod01
ora.ons ora.ons.type ONLINE ONLINE on prod01
ora.ons ora.ons.type ONLINE ONLINE on prod02
ora.prod01.vip ora.cluster_vip_net1.type ONLINE ONLINE on prod01
ora.prod02.vip ora.cluster_vip_net1.type ONLINE ONLINE on prod02
ora.registry.acfs ora.registry.acfs.type ONLINE ONLINE on prod01
ora.registry.acfs ora.registry.acfs.type ONLINE ONLINE on prod02
ora.scan1.vip ora.scan_vip.type ONLINE ONLINE on prod01
ora.snowy.db ora.database.type OFFLINE OFFLINE
ora.snowy.db ora.database.type ONLINE OFFLINE
ora.tintin.db ora.database.type ONLINE ONLINE on prod01
ora.tintin.db ora.database.type ONLINE ONLINE on prod02
ora.tintin.tintin_db_svc.svc ora.service.type ONLINE ONLINE on prod02
ora.tintin.tintin_ggate_svc.svc ora.service.type ONLINE ONLINE on prod01
Monday, October 17, 2016
MaxL Script to Automate ESSBASE Backup
$ cat backupessbase.sh
#!/bin/sh
#######Essbase Application and Bin folder Backup #################
#######Author Mohammed Ashraf TP #################
#######Creation Date 22 September 2016 #################
#######This script is to Automate the following #################
#######Automate the backup of app and bin folder #################
#######Backup the essbase database using Maxl script #################
export DATE=`date '+%d%b%y'`
mkdir -p /TapeBackup/essbasePRODbackup/essbase_backup_`date "+%Y%m%d%H"`
cp -r /phyp01/essbase/Oracle/Middleware/user_projects/epmsystem1/EssbaseServer/essbaseserver1/bin /TapeBackup/essbasePRODbackup/essbase_backup_`date "+%Y%m%d%H"`
cp -r /phyp01/essbase/Oracle/Middleware/user_projects/epmsystem1/EssbaseServer/essbaseserver1/app /TapeBackup/essbasePRODbackup/essbase_backup_`date "+%Y%m%d%H"`
/phyp01/essbase/Oracle/Middleware/user_projects/epmsystem1/EssbaseServer/essbaseserver1/bin/startMaxl.sh -u hyp_admin -p welcome123 -s mof-pessdb01.mof.local tp.msh
cp /tmp/Maxl_bkp.txt /TapeBackup/essbasePRODbackup/essbase_backup_`date "+%Y%m%d%H"`/
================================================================================
$ cat tp.msh
export database QGFMIS.MainBud Level0 data to data_file "/tmp/Maxl_bkp.txt";
===========================================================================
$ cat obsolete_essbase_backup.sh
find /TapeBackup/essbasePRODbackup/* -type d -ctime +3 -exec rm -rf {} \;
=======================================================
$crontab -l
1 2 * * * /phyp01/essbase/Oracle/Middleware/user_projects/epmsystem1/EssbaseServer/essbaseserver1/bin/obsolete_essbase_backup.sh >/dev/null 2>&1
1 * * * * /phyp01/essbase/Oracle/Middleware/user_projects/epmsystem1/EssbaseServer/essbaseserver1/bin/backupessbase.sh >/dev/null 2>&1
Planning 11.1.2.4 Install
https://community.oracle.com/thread/3914710
You need to install foundation, RAF,EAS and all the other java web applications that you are going to have in the environment (Planning, FDMEE) on the foundation server even though you will only be configuring foundation, RAF and EAS on that server, if you are going to use OHS as the web server you will need to install that as well.
From the docs:
"On the machine on which you plan to administer the WebLogic Server, you must install all Java web applications for all applications you plan to deploy on any machine in the environment. (The WebLogic Administration Server is installed and deployed on the Foundation Services machine.)"
Server 2 install the products you are going to deploy so planning and FDMEE.
Server 3 once again only install products you are going to deploy so only essbase.
It is probably worth reading through the install and config document - Installation and Configuration Guide
Creating the Sample Vision Planning Application with Oracle EPM Versions 11.1.2.3.500/11.1.2.4
https://blog.topdownconsulting.com/2016/02/creating-sample-vision-planning-application-oracle-epm-versions-11-1-2-3-50011-1-2-4/
Thursday, October 13, 2016
SOA 12.2.1.1.0 Installation & Configuration Links
https://docs.oracle.com/middleware/1221/core/INSOA.pdf
https://www.youtube.com/watch?v=yQNgo9YKR3I
https://dzone.com/articles/oracle-soa-1221-installation-and-configurations
https://www.youtube.com/watch?v=29MeXNFzmfo
https://svgonugu.com/2014/07/04/soa-suite-12c-installation/
http://mahesh4soa.blogspot.qa/2015/12/oracle-soa-1221-step-by-step.html
https://docs.oracle.com/middleware/12211/soasuite/index.html
http://www.oracle.com/technetwork/middleware/soasuite/learnmore/prebuiltvm-soasuite122110-3070567.html
Wednesday, October 12, 2016
Oracle 12c RAC New Features and Deprecated Features
Oracle 12c RAC New Features
Oracle has come a long way from its inception of the 9i RAC database to its current 12c version. I remember the days when we had to deal with RAC related issues, ranging from performance to stability which gradually improved as this product matured.
Features continued to be added with each release and in 12c now, it has a very flexible architecture, being able to fulfill numerous requirements using different configurations. Not only is it a robust highly availability database solution but it is also capable of providing the infrastructure to host other applications. Here is a brief review of these features and their functionality.
Related Article
• Oracle 12c RAC: Installation on Oracle Linux 6 using VirtualBox
Oracle 12c RAC New Features
Oracle ASM Flex
This will help reduce the overhead on the database server by running an ASM instance remotely. Instances can use the remote ASM node for any planned or unplanned downtime as well. All the metadata requests can be covered by non-local ASM instances. In addition to that this feature removes the risk of single point of failure, of having only one ASM instance for storage management. Now if a local ASM instance fails, the database instance can now connect directly to any of the other surviving remote ASM instances in the cluster.
ASM Disk Scrubbing
This monitors all the disks in the ASM disk groups and will discover logical corruptions. Normally these corruptions were discovered when an RMAN backup job ran. Disk Scrubbing will try to automatically recover those logical corruptions without the DBA even knowing!
Shared Password file in ASM
A single password file can now be stored in the ASM diskgroup and can be shared by all nodes. No need to have individual copies for each instance.
ASM Multiple Diskgroup Rebalance and Disk Resync Enhancements
Resync Power limit – Allows multiple diskgroups to be resynced concurrently.
Disk Resync Checkpoint – Faster recovery from instance failures.
Grid Infrastructure Rolling Migration support for one-off’s
When applying a one-off patch to the ASM instance, the databases that it is serving can be pointed to use a different ASM instance.
Oracle Clusterware Flex Cluster
This feature may appear similar to the ASM Flex feature but actually it is not. This is another type of cluster that has been introduced in Oracle 12c. We need to understand the two main components Hub Nodes and Leaf Nodes.
Hub Nodes are nodes that you currently see in the 11g RAC architecture. Every node is a full-fledged node with the required Clusterware software, share storage with a voting disk, interconnect network etc. components. On the other hand the leaf nodes are lightweight nodes with no shared storageand minimal Clusterware software. A leaf node will be connected to a Hub Node.
Grid Home Server
This new feature will allow you to have a single Golden Oracle Home on one of nodes and all other nodes to be a client of that Golden Home. You will only have to patch the single golden Oracle Home and rest will take it from there.
Application Continuity
This helps minimize the application downtime caused by temporary failures in the infrastructure and/or the database servers. This piece sits between the application and the database working at the JDBC driver layer. If any failure occurs and is recoverable, it will be recovered automatically while being transparent to the application. The application will only observe a minor latency delay in the transactions and the failure will automatically be recovered transparently. Additionally Oracle guarantees the successful completion of the in-flight transactions, eliminating the chance of duplicate transactions.
The purpose of leaf nodes is to include application servers and other servers with additional software running on the Oracle 12c Clusterware infrastructure. These leaf nodes will not have any database instances running on them. If a leaf node goes down then there will be no impact on Hub nodes either. This allows the flexibility to run leaf nodes on Virtual Machines while Hub nodes can run on the actual physical machines.
IPv6 Support
IPv6 was supported in Oracle database 11gr2 but was only available for a standalone database. In 12c Database, clients can also now connect to database in RAC environments, using the IPv6 protocol. The interconnect however still only supports IPv4. This feature helps the customers meet the PCI, SOX and other Security Compliance standards.
Multiple SCAN’s Per Subnet
Now you can configure multiple SCAN’s per subnet mask, per cluster. This obviously is made available to provide redundancy.
GHCTL
The new ghctl utility will improve patching process.
UI auto runs root.sh
Oracle UI will execute the root.sh script on all nodes. You don’t have to do this on all nodes manually.
Deprecated Features
While it is good to be familiar with the new features it equally if not more to be aware of what features of RAC are being deprecated so plans can be made to move away from those Deprecated feature and alternatives chosen.
Oracle Restart
Oracle Restart feature which was provided as a part of the Oracle Grid Infrastructure has been deprecated. It will be de-supported in future versions.
RAW/Block Storage Devices
Oracle Database 12c and Oracle Clusterware 12c, no longer support raw storage devices. The files must be moved to Oracle ASM before upgrading to Oracle Clusterware 12c.
Subscribe to:
Posts (Atom)