Your SlideShare is downloading. ×
Rac
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Rac

270
views

Published on

Published in: Technology, News & Politics

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
270
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
49
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. ############### Configuring Public and Private Network #Edit Host file on all nodes vi /etc/hosts # Do not remove the following line, or various programs # that require network functionality will fail. 127.0.0.1 #::1 localhost.localdomain localhost localhost6.localdomain6 localhost6 #public IP 192.168.100.101 192.168.100.102 192.168.100.103 192.168.100.104 192.168.100.105 192.168.100.106 rac01.ent.net rac02.ent.net rac03.ent.net rac04.ent.net rac05.ent.net rac06.ent.net rac01 rac02 rac03 rac04 rac05 rac06 #virtual IP 192.168.100.107 192.168.100.108 192.168.100.109 192.168.100.110 192.168.100.111 192.168.100.112 rac01-vip.ent.net rac02-vip.ent.net rac03-vip.ent.net rac04-vip.ent.net rac05-vip.ent.net rac06-vip.ent.net rac01-vip rac02-vip rac03-vip rac04-vip rac05-vip rac06-vip #Private IP 192.168.222.1 192.168.222.2 192.168.222.3 192.168.222.4 192.168.222.5 192.168.222.6 rac01-priv.ent.net rac01-priv rac02-priv.ent.net rac02-priv rac03-priv.ent.net rac03-priv rac04-priv.ent.net rac04-priv rac05-priv.ent.net rac05-priv rac06-priv.ent.net rac06-priv
  • 2. #SCAN IP #192.168.100.113 entdbscan #192.168.100.114 entdbscan #192.168.100.115 entdbscan vi /etc/resolv.conf search ent.net nameserver 192.168.0.3 nameserver 192.168.0.4 #####Firewall & SELinux /etc/rc.d/init.d/iptables stop chkconfig iptables off /etc/rc.d/init.d/iptables status vi /etc/sysconfig/selinux SELINUX=disabled ##Restart OR below commands getenforce (returns "Enforcing") setenforce 0 getenforce (returns "Permissive") #####NTP service vi /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="" sbin/service ntpd restart
  • 3. Users #########Grid groupadd -g 1000 oinstall groupadd -g 1200 asmadmin groupadd -g 1201 asmdba groupadd -g 1202 asmoper useradd -m -u 1100 -g oinstall -G asmadmin,asmdba,asmoper -d /home/grid -s /bin/bash grid id grid passwd grid su - grid echo > .bash_profile vi .bash_profile # .bash_profile # Get the aliases and functions if [ -f ~/.bashrc ]; then . ~/.bashrc fi export ORACLE_SID=+ASM1 export JAVA_HOME=/usr/local/java export ORACLE_BASE=/grid/gridbase export ORACLE_HOME=/grid/product/11.2.0/grid #export ORACLE_PATH=/oracle/common/oracle/sql export ORACLE_TERM=xterm #export NLS_DATE_FORMAT="DD-MON-YYYY HH24:MI:SS" #export TNS_ADMIN=$ORACLE_HOME/network/admin export ORA_NLS11=$ORACLE_HOME/nls/data PATH=.:${JAVA_HOME}/bin:${PATH}:$HOME/bin:$ORACLE_HOME/bin PATH=${PATH}:/usr/bin:/bin:/usr/bin/X11:/usr/local/bin export PATH LD_LIBRARY_PATH=$ORACLE_HOME/lib
  • 4. LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$ORACLE_HOME/oracm/lib LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/lib:/usr/lib:/usr/local/lib export LD_LIBRARY_PATH CLASSPATH=$ORACLE_HOME/JRE CLASSPATH=${CLASSPATH}:$ORACLE_HOME/jlib CLASSPATH=${CLASSPATH}:$ORACLE_HOME/rdbms/jlib CLASSPATH=${CLASSPATH}:$ORACLE_HOME/network/jlib export CLASSPATH export THREADS_FLAG=native export TEMP=/tmp export TMPDIR=/tmp umask 022 # User specific environment and startup programs PATH=$PATH:$HOME/bin export PATH #########Oracle groupadd -g 1300 dba groupadd -g 1301 oper useradd -m -u 1101 -g oinstall -G dba,oper,asmdba -d /home/oracle -s /bin/bash oracle id oracle passwd oracle su - oracle echo > .bash_profile vi .bash_profile # .bash_profile # Get the aliases and functions if [ -f ~/.bashrc ]; then . ~/.bashrc
  • 5. fi export ORACLE_SID=entdb1 export ORACLE_UNQNAME=entdb export JAVA_HOME=/usr/local/java export ORACLE_BASE=/oracle export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1 #export ORACLE_PATH=/app/common/oracle/sql #export SQLPATH=/app/common/oracle/sql export ORACLE_TERM=xterm export NLS_LANG=AMERICAN_AMERICA.AR8MSWIN1256 #export NLS_DATE_FORMAT="DD-MON-YYYY HH24:MI:SS" #export TNS_ADMIN=$ORACLE_HOME/network/admin export ORA_NLS11=$ORACLE_HOME/nls/data PATH=.:${JAVA_HOME}/bin:${PATH}:$HOME/bin:$ORACLE_HOME/bin PATH=${PATH}:/usr/bin:/bin:/usr/bin/X11:/usr/local/bin #PATH=${PATH}:/app/common/oracle/bin export PATH LD_LIBRARY_PATH=$ORACLE_HOME/lib LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$ORACLE_HOME/oracm/lib LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/lib:/usr/lib:/usr/local/lib export LD_LIBRARY_PATH CLASSPATH=$ORACLE_HOME/JRE CLASSPATH=${CLASSPATH}:$ORACLE_HOME/jlib CLASSPATH=${CLASSPATH}:$ORACLE_HOME/rdbms/jlib CLASSPATH=${CLASSPATH}:$ORACLE_HOME/network/jlib export CLASSPATH export THREADS_FLAG=native export TEMP=/tmp export TMPDIR=/tmp umask 022 # User specific environment and startup programs PATH=$PATH:$HOME/bin export PATH
  • 6. #########Nobody id nobody usr/sbin/useradd nobody ###############Directories mkdir -p /grid mkdir -p /grid/11.2.0/gridbase chown -R grid:oinstall /grid mkdir -p /oracle chown oracle:oinstall /oracle chmod -R 775 /oracle ##############Resource Limits ##### cat >> /etc/security/limits.conf <<EOF grid soft nproc 2047 grid hard nproc 16384 grid soft nofile 1024 grid hard nofile 65536 oracle soft nproc 2047 oracle hard nproc 16384 oracle soft nofile 1024 oracle hard nofile 65536 EOF ##### cat >> /etc/pam.d/login <<EOF session required pam_limits.so EOF
  • 7. #####Bourne, Bash, Korn shell cat >> /etc/profile <<EOF if [ $USER = "oracle" ] || [ $USER = "grid" ]; then if [ $SHELL = "/bin/ksh" ]; then ulimit -p 16384 ulimit -n 65536 else ulimit -u 16384 -n 65536 fi umask 022 fi EOF #####Cshell cat >> /etc/csh.login <<EOF if ( $USER == "oracle" || $USER == "grid" ) then limit maxproc 16384 limit descriptors 65536 endif EOF ###############kernel parameters /etc/sysctl.conf kernel.shmmax = 4294967295 kernel.shmall = 2097152 kernel.shmmni = 4096 kernel.sem = 250 32000 100 128 fs.file-max = 6815744 net.ipv4.ip_local_port_range = 9000 65500
  • 8. net.core.rmem_default=262144 net.core.rmem_max=4194304 net.core.wmem_default=262144 net.core.wmem_max=1048576 fs.aio-max-nr=1048576 sysctl -p ###############ASMLib (Root) ASMLib Kernel Driver:oracleasm-2.6.18-238.el5-2.0.5-1.el5.x86_64.rpm Userspace Library:oracleasmlib-2.0.4-1.el5.x86_64.rpm Driver Support Files:oracleasm-support-2.1.7-1.el5.x86_64.rpm rpm -Uvh oracleasm-support-2.1.3-1.el5.x86_64.rpm rpm -Uvh oracleasm-2.6.18-164.el5-2.0.5-1.el5.x86_64.rpm rpm -Uvh oracleasmlib-2.0.4-1.el5.x86_64.rpm /usr/sbin/oracleasm configure -i grid asmadmin y y #( # Creates the /etc/sysconfig/oracleasm configuration file # Creates the /dev/oracleasm mount point # Mounts the ASMLib driver file system #)
  • 9. #load the oracleasm kernel module: /usr/sbin/oracleasm init #To avoid ASM issue with Multipath devices on Linux vi /etc/sysconfig/oracleasm ORACLEASM_SCANORDER="dm" ORACLEASM_SCANEXCLUDE="sd" /etc/init.d/oracleasm stop /etc/init.d/oracleasm start ########################################################## ###############ASM Disks #Obtain wwid for raw devices for i in `cat /proc/partitions | awk '{print $4}' |grep sd | grep [a-z]$`; do echo "### $i: `scsi_id -g -u s /block/$i`"; done #Configuring multipath.conf using output of above command vi /etc/multipath.conf multipaths { multipath { wwid alias path_grouping_policy path_selector failback rr_weight no_path_retry } service multipathd restart multipath –ll 360014380125d8be50000a00001d00000 Data1 multibus "round-robin 0" manual priorities 5
  • 10. dmsetup ls | sort ls -l /dev/disk/by-id/ ls -l /dev/dm-* #/dev/mapper/ devices are persistent, created sufficiently early during the boot process and makes use of their defined aliases - use only these devices to access and interact with multipathed devices. ls –l /dev/mapper/* # Ownership and Permissions # OCR & VOTE disks chown grid:asmadmin /dev/mapper/Ocr* chmod 0640 /dev/mapper/ocr* chown grid:asmadmin /dev/mapper/Data* chmod 0640 /dev/mapper/data* chown grid:asmadmin /dev/mapper/Fra* chmod 0640 /dev/mapper/fra* /usr/sbin/oracleasm createdisk OCR1 /dev/mapper/Ocr1 /usr/sbin/oracleasm createdisk OCR2 /dev/mapper/Ocr2 /usr/sbin/oracleasm createdisk OCR3 /dev/mapper/Ocr3 /usr/sbin/oracleasm createdisk DATA1 /dev/mapper/Data1 /usr/sbin/oracleasm createdisk DATA2 /dev/mapper/Data2 /usr/sbin/oracleasm createdisk FRA1 /dev/mapper/Fra1 #Other nodes /usr/sbin/oracleasm scandisks /usr/sbin/oracleasm listdisks