创建oracle10g双节点集群

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

主机配置注意事项(每个节点):每个节点服务器必须是双网卡,支持tcp/ip协议,安装集群软件服务器要支持udp防火墙关闭serviceiptablesstopSELinux禁用vi/etc/selinux/configSELINUX=disableip地址使用静态配置:static网关要指定#IntelCorporation82566MMGigabitNetworkConnectionDEVICE=eth0BOOTPROTO=staticIPADDR=10.1.1.135NETMASK=255.255.255.0GATEWAY=10.1.3.1HWADDR=00:1E:37:D6:FA:44ONBOOT=yes重启network:servicenetworkrestarthostname不要出现在回环地址!如果启动过单机asm服务,请先停止:$ORACLE_HOME/bin/localconfigdelete卸载独占模式的oracle软件(先用OUI卸载,再手工清理垃圾文件/etc/*.ora$ORACLE_HOME)如果是4以上的版本,降低版本到4/etc/redhat-release----------------------------------------------------------------------------------------------------------配置etc/hosts(所有节点)#Donotremovethefollowingline,orvariousprograms#thatrequirenetworkfunctionalitywillfail.127.0.0.1localhost.localdomainlocalhost::1localhost6.localdomain6localhost6#publicNetwork-(eth0)10.1.1.135xie.uplooking1.com10.1.1.132xie.uplooking.com#publicvirtualIP(eth0:#)10.1.1.136xie.uplooking1.com-vip10.1.1.133xie.uplooking.com-vip#privateInterconnect-(eth0:0)10.1.2.135xie.uplooking1.com-priv10.1.2.132xie.uplooking.com-priv配置ifcfg-eth0:0(所有节点)[root@xienetwork-scripts]#viifcfg-eth0:0#RealtekSemiconductorCo.,Ltd.RTL-8139/8139C/8139C+DEVICE=eth0:0BOOTPROTO=staticONBOOT=yesIPADDR=10.1.2.132NETMASK=255.255.255.0重启network:servicenetworkrestart----------------------------------------------------------------------------------------配置hangcheck-timer:用于监视Linux内核是否挂起vi/etc/modprobe.confoptionshangcheck-timerhangcheck_tick=30hangcheck_margin=180自动加载hangcheck-timervi/etc/rc.localmodprobehangcheck-timer检查hangcheck-timer模块是否已经加载:lsmod|grephangcheck_timer-------------------------------------------------------------------------------------------------------------------------------创建oracle用户:跑脚本:1./install.sh#/bin/bash../adduser.sh../sysctl.sh../limits.sh../mkdir.sh../chprofile.sh2.adduser.sh#/bin/bashADDGROUPS=oinstalldbaADDUSERS=oracleforgroupin$ADDGROUPS;doif[-z$(awk-F:'{print$1}'/etc/group|grep$group)];thengroupadd$groupechoAddnewgroup$groupelseechoGroup$groupalreadyexistedfidoneforuserin$ADDUSERS;doif[-z$(awk-F:'{print$1}'/etc/passwd|grep$user)];thenuseradd$userechoAddnewuser$userelseechoUser$useralreadyexistedfidoneif$(usermod-goinstall-Gdbaoracle);thenechoModifyuseroracleaccountsuccesselseechoModifyuseroracleaccountfailurefi3.sysctl.sh#/bin/bash#echo25032000100128/proc/sys/kernel/sem#echo536870912/proc/sys/kernel/shmmax#echo4096/proc/sys/kernel/shmmni#echo2097152/proc/sys/kernel/shmall#echo65536/proc/sys/fs/file-max#echo102465000/proc/sys/net/ipv4/ip_local_port_rangeSYSCTL_FILE=/etc/sysctl.confRCLOCAL_FILE=/etc/rc.localif[-f$SYSCTL_FILE];thenif[-z$(grepOracle$SYSCTL_FILE)];thencat$SYSCTL_FILEEND#Oracleconfigurekernelparameterskernel.shmmax=2147483648kernel.shmmni=4096kernel.shmall=2097152kernel.sem=25032000100128fs.file-max=65536net.ipv4.ip_local_port_range=102465000net.core.rmem_default=262144net.core.rmem_max=262144net.core.wmem_default=262144net.core.wmem_max=262144END/sbin/sysctl-pechoAddOracleconfigurekernelparameterssuccesselseechoOracleconfigurekernelparametersalreadyexistedfielseif[-z$(grepOracle$RCLOCAL_FILE)];thencat$RCLOCAL_FILEEND#Oracleconfigurekernelparametersecho536870912/proc/sys/kernel/shmmaxecho4096/proc/sys/kernel/shmmniecho2097152/proc/sys/kernel/shmallecho25032000100128/proc/sys/kernel/semecho65536/proc/sys/fs/file-maxecho102465000/proc/sys/net/ipv4/ip_local_port_rangeEND.$RCLOCAL_FILEechoAddOracleconfigurekernelparameterssuccesselseechoOracleconfigurekernelparametersalreadyexistedfifi4.limits.sh#/bin/bashLIMITS_FILE=/etc/security/limits.confif[-f$LIMITS_FILE];thenif[-z$(grepOracle$LIMITS_FILE)];thencat$LIMITS_FILEEND#Oracleconfigureshellparametersoraclesoftnofile65536oraclehardnofile65536oraclesoftnproc16384oraclehardnproc16384ENDechoAddOracleconfigureshellparameterssuccesselseechoOracleconfigureshellparametersalreadyexistedfielseecho$0:$LIMITS_FILEnotfoundfi5.mkdir.sh#/bin/bashORACLE_FILE_BASE=/u01/app/oracleORACLE_FILE_VAR=/var/opt/oracleORACLE_FILE_HOME=$ORACLE_FILE_BASE/product/10.2.0/db_1fordirectoryin$ORACLE_FILE_BASE$ORACLE_FILE_VAR$ORACLE_FILE_HOME;doif[-d$directory];thenechoDirectory$directoryalreadyexistedelsemkdir-p$directorychown-Roracle.dba$directoryechoChangedirectory$directoryownerandgroupsuccessfidone6.chprofile.sh#/bin/bashPROFILES=/home/oracle/.bashrcforPROFILEin$PROFILES;doif[-f$PROFILE];thenif[-z$(grepOracle$PROFILE)];thencat$PROFILEEND#OracleconfigureprofileparameterssuccessexportORACLE_BASE=/u01/app/oracleexportORACLE_HOME=\$ORACLE_BASE/product/10.2.0/db_1exportCRS_HOME=/u01/crs_1exportPATH=\$ORACLE_HOME/bin:\$PATHexportORACLE_OWNER=oracleexportORACLE_SID=racdb1exportORACLE_TERM=vt100exportTHREADS_FLAG=nativeexportLD_LIBRARY_PATH=\$ORACLE_HOME/lib:\$LD_LIBRARY_PATHexportPATH=\$ORACLE_HOME/bin:\$PATHexportSQLPATH=/home/oracleexportEDITOR=vialiassqlplus='rlwrapsqlplus'aliaslsnrctl='rlwraplsnrctl'aliasrman='rlwraprman'aliasasmcmd='rlwrapasmcmd'##changethisNLSsettingstosuityourcountry:#example:#german_germany.we8iso8859p15,american_america.we8iso8

1 / 22
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功