您好,欢迎访问三七文档
当前位置:首页 > IT计算机/网络 > 数据库 > linux4_oracle10g_rac
从上到下顺序安装先检查linux内核版本#uname–r2.6.9-55.ELsmp安装linux自带的两个重要包:rsh-server用来实现双机互联通信telnet-serverlibaio-0.3.105-2.i386.rpmopenmotif21-2.1.30-11.RHEL4.6.i386.rpm根据版本不同到oracle网站下载相应的安装包,主要包括以下几个Asm内核包:oracleoracleasm-2.6.9-42.0.0.0.1ELup内核驱动程序Ocfs包:ocfs-2-2.6.9-42.0.0.0.1EL(2.6.9-42.0.0.0.1EL)为kernel版本ocfs2-toolsocfs2consoleOracleasmlib包:oracleasm-support-2.0.3-2oracleasmlib-2.0.2-1.i386.rpm添加分区,根据不同的挂载点,添加不同的分区。其中主要包括三个分区:1.根分区,用于安装操作系统linux2.Swap分区,用于I/O与内存交换3.根据安装的oracle的要求,分配1个或者多个分区来存放程序文件和数据库文件。其实也就是把实例和数据库分开。每台机器应该有两块网卡,一块连接局域网通信,一块主要用在集群系统之间通信。同步每台机器的时间,以保证数据可以正确进行处理。编辑/boot/grub/grub.conf,修改为以下内容#boot=/dev/sdadefault=0timeout=5splashimage=(hd0,0)/boot/grub/splash.xpm.gzhiddenmenutitleEnterprise(2.6.9-42.0.0.0.1.ELsmp)root(hd0,0)kernel/boot/vmlinuz-2.6.9-42.0.0.0.1.ELsmproroot=LABEL=/rhgbquietclock=pitnosmpnoapicnolapicinitrd/boot/initrd-2.6.9-42.0.0.0.1.ELsmp.imgtitleEnterprise-up(2.6.9-42.0.0.0.1.EL)root(hd0,0)kernel/boot/vmlinuz-2.6.9-42.0.0.0.1.ELroroot=LABEL=/rhgbquietclock=pitnosmpnoapicnolapicinitrd/boot/initrd-2.6.9-42.0.0.0.1.EL.img创建oracle用户,创建用户以及用户组oinstall,dba#groupaddoinstall#groupadddba#mkdir-p/export/home/oracle/ocfs#useradd-d/export/home/oracle-goinstall-Gdba-s/bin/kshoracle#chownoracle:dba/export/home/oracle/u01#passwdoracleNewPassword:Re-enternewPassword:passwd:passwordsuccessfullychangedfororacle创建oracle用户环境文件/export/home/oracle/.profileexportPS1=`/bin/hostname-s`-exportEDITOR=viexportORACLE_SID=devdb1exportORACLE_BASE=/u01/app/oracleexportORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1exportORA_CRS_HOME=$ORACLE_BASE/product/10.2.0/crs_1exportLD_LIBRARY_PATH=$ORACLE_HOME/libexportPATH=$ORACLE_HOME/bin:$ORA_CRS_HOME/bin:/bin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/X11R6/binumask022创建文件系统目录结构rac1-mkdirp$ORACLE_BASE/adminrac1-mkdirp$ORACLE_HOMErac1-mkdirp$ORA_CRS_HOMErac1-mkdir-p/u01/oradata/devdb提高Oracle用户的shell限制/etc/security/limits.conforaclesoftnproc2047oraclehardnproc16384oraclesoftnofile1024oraclehardnofile65536/etc/pam.d/loginsessionrequired/lib/security/pam_limits.so/etc/profileif[$USER=oracle];thenif[$SHELL=/bin/ksh];thenulimit-p16384ulimit-n65536elseulimit-u16384-n65536fifi安装EnterpriseLinux软件程序包配置内核参数#more/etc/sysctl.confkernel.shmall=2097152kernel.shmmax=2147483648kernel.shmmni=4096kernel.sem=25032000100128fs.file-max=65536net.ipv4.ip_local_port_range=102465000net.core.rmem_default=1048576net.core.rmem_max=1048576net.core.wmem_default=262144net.core.wmem_max=262144#/sbin/sysctl–p修改/etc/hosts文件#more/etc/hosts127.0.0.1localhost192.168.2.131rac1.mycorpdomain.comrac1192.168.2.31rac1-vip.mycorpdomain.comrac1-vip10.10.10.31rac1-priv.mycorpdomain.comrac1-priv192.168.2.132rac2.mycorpdomain.comrac2192.168.2.32rac2-vip.mycorpdomain.comrac2-vip10.10.10.32rac2-priv.mycorpdomain.comrac2-priv配置hangchecktimer内核模块/etc/modprobe.confoptionshangcheck-timerhangcheck_tick=30hangcheck_margin=180要立即加载模块,执行“modprobe-vhangcheck-timer”。为OCFS2和OracleASM创建磁盘分区Fdisk/dev/sdbFdisk/dev/sdcFdisk/dev/sddFdisk/dev/sde安装oracleasmlib程序包为ASM磁盘映射原始设备etc/sysconfig/rawdevices/dev/raw/raw1/dev/sdc1/dev/raw/raw2/dev/sdd1/dev/raw/raw3/dev/sde1#/sbin/servicerawdevicesrestart#chownoracle:dba/dev/raw/raw[1-3]#chmod660/dev/raw/raw[1-3]#ls-lat/dev/raw/raw*以oracle用户身份执行rac1-ln-sf/dev/raw/raw1/u01/oradata/devdb/asmdisk1rac1-ln-sf/dev/raw/raw2/u01/oradata/devdb/asmdisk2rac1-ln-sf/dev/raw/raw3/u01/oradata/devdb/asmdisk3修改/etc/udev/permissions.d/50-udev.permissions#rawdevicesram*:root:disk:0660#raw/*:root:disk:0660raw/*:oracle:dba:0660====================================================以上为配置一台服务器,按照所有的步骤配置其他机器====================================================使用SSH建立用户等效性,在安装过程中可以进行软件的复制,不提示输入口令,也就是直接认可所有节点,他们之间可以相互通信。所以必须在所有节点上按照以下步骤(绿色块)进行配置rac1-mkdir~/.sshrac1-chmod700~/.sshrac1-ssh-keygen-trsarac1-ssh-keygen-tdsa最后在第一台要安装软件的机器上执行rac1-cat~/.ssh/id_rsa.pub~/.ssh/authorized_keysrac1-cat~/.ssh/id_dsa.pub~/.ssh/authorized_keysrac1-sshrac2cat~/.ssh/id_rsa.pub~/.ssh/authorized_keysrac1-sshrac2cat~/.ssh/id_dsa.pub~/.ssh/authorized_keysrac1-scp~/.ssh/authorized_keysrac2:~/.ssh/authorized_keys配置完成然后测试通信:Sshrac1dateSshrac2dateSshrac1-privdateSshrac2-privdate::::::::::::::::::::::::::SshracndateSshracn-privdate配置Oracle自动存储管理(ASM),需要在所有节点上配置#/etc/init.d/oracleasmconfigureDefaultusertoownthedriverinterface[]:oracleDefaultgrouptoownthedriverinterface[]:dbaStartOracleASMlibrarydriveronboot(y/n)[n]:yFixpermissionsofOracleASMdisksonboot(y/n)[y]:y创建ASM磁盘,任意一个节点上来创建#/etc/init.d/oracleasmcreatediskVOL1/dev/sdc1#/etc/init.d/oracleasmcreatediskVOL2/dev/sdd1#/etc/init.d/oracleasmcreatediskVOL3/dev/sde1#/etc/init.d/oracleasmscandisks#/etc/init.d/oracleasmlistdisks配置Oracle集群文件系统(OCFS2),它允许所有节点在集群文件系统上同时共享文件创建OCFS2配置文件#ocfs2console生成的配置文件如下:#more/etc/ocfs2/cluster.conf在rac1的OCFS2控制台上选择Cluster和PropagateConfiguration以将配置文件传播到rac2配置O2CB驱动程序。O2CB是一组集群服务,负责管理节点与集群文件系统之间的通信#/etc/init.d/o2cbunload#/etc/init.d/o2cbconfigureLoadO2CBdriveronboot(y/n)[y]:yClustertostartonboot(Enternonetoclear)[ocfs2]:Specifyheartbeatdeadthreshold(=7)[7]:61格式化文
本文标题:linux4_oracle10g_rac
链接地址:https://www.777doc.com/doc-8244 .html