Rhel7_Oracle11g_rac安装方法是什么
发表于:2024-12-13 作者:千家信息网编辑
千家信息网最后更新 2024年12月13日,这篇文章主要讲解了"Rhel7_Oracle11g_rac安装方法是什么",文中的讲解内容简单清晰,易于学习与理解,下面请大家跟着小编的思路慢慢深入,一起来研究和学习"Rhel7_Oracle11g_
千家信息网最后更新 2024年12月13日Rhel7_Oracle11g_rac安装方法是什么
这篇文章主要讲解了"Rhel7_Oracle11g_rac安装方法是什么",文中的讲解内容简单清晰,易于学习与理解,下面请大家跟着小编的思路慢慢深入,一起来研究和学习"Rhel7_Oracle11g_rac安装方法是什么"吧!
1、禁用selinux
getenforcesetenforce 0vim /etc/selinux/config
2、关闭防火墙、禁止开机启动
systemctl stop firewalld.servicesystemctl disable firewalld.service
3、修改主机名
主机名中禁止使用下划线"_",建议使用小写字母,长度小于8位hostnamectl set-hostname mydb1hostnamectl set-hostname mydb2修改完重新登录
4、配置yum
mount -t iso9660 -o loop /dev/sr0 /media/cat rhel7.repo[base]name=rhel7.7baseurl=file:///mediaenable=1gpgcheck=0
5、关闭没必要的服务
Redhat6:service iptables stopservice ip6tables stopchkconfig iptables offchkconfig ip6tables offservice sshd startchkconfig sshd onservice Bluetooth stopchkconfig Bluetooth offservice postfix stopchkconfig postfix offservice cups stopchkconfig cups offservice cpuspeed offchkconfig cpuspeed offservice NetworkManager stopchkconfig NetworkManager offservice vsftpd stopchkconfig vsftpd offservice dhcpd stopchkconfig dhcpd offservice nfs stopchkconfig nfs offservice nfslock stopchkconfig nfslock offservice ypbind stopchkconfig ypbind offRedhat7:.................
5、安装依赖包
--检查rpm -q --qf '%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n' \binutils \compat-libcap1 \compat-libstdc++-33 \gcc \gcc-c++ \glibc \glibc-devel \ksh \libstdc++ \libstdc++-devel \libaio \libaio-devel \make \sysstat--安装yum -y install binutils compat-libstdc++-33 gcc gcc-c++ glibc glibc-common glibc-devel ksh libaio libaio-devel libgcc libstdc++ libstdc++-devel make sysstat openssh-clients compat-libcap1 xorg-x11-utils xorg-x11-xauth elfutils unixODBC unixODBC-devel libXp elfutils-libelf elfutils-libelf-devel smartmontools
6、内核参数修改
--计算方法:cat /proc/sys/fs/file-max + 512 * process * instance numberfs.file-max = 6815744kernel.sem = 250 32000 100 128kernel.shmmni = 4096--计算方法:getconf PAGE_SIZE TOTAL RAM IN BYTES / PAGE_SIZEkernel.shmall = 536870912--计算方法:HALF OF TOTAL RAM IN BYTESkernel.shmmax = 1073741824net.ipv4.ip_local_port_range = 9000 65500net.core.rmem_default = 262144net.core.wmem_default = 262144net.core.rmem_max = 4194304net.core.wmem_max = 1048576fs.aio-max-nr = 4194304vm.dirty_ratio=20vm.dirty_background_ratio=3vm.dirty_writeback_centisecs=100vm.dirty_expire_centisecs=500vm.swappiness=10vm.min_free_kbytes=524288#rp_filter,这里假设 eth3 和 eth4 都是私有网卡net.ipv4.conf.ens39.rp_filter = 2net.ipv4.conf.ens39.rp_filter = 2#IP分片汇聚的最大/最小内存用量,计算公式:numCPU *130000,逻辑 cpu 为 96,那么 high参数建议至少设置为 12m 以上。同时 low 参数比 high 参数少 1m 即可。net.ipv4.ipfrag_high_thresh=16777216net.ipv4.ipfrag_low_thresh=15728640net.ipv4.ipfrag_time=60-----修改后如下:fs.file-max = 6815744kernel.sem = 250 32000 100 128kernel.shmmni = 4096kernel.shmall = 536870912kernel.shmmax = 1073741824net.ipv4.ip_local_port_range = 9000 65500net.core.rmem_default = 262144net.core.wmem_default = 262144net.core.rmem_max = 4194304net.core.wmem_max = 1048576fs.aio-max-nr = 4194304vm.dirty_ratio= 20vm.dirty_background_ratio= 3vm.dirty_writeback_centisecs= 100vm.dirty_expire_centisecs= 500vm.swappiness= 10vm.min_free_kbytes= 524288net.ipv4.conf.ens39.rp_filter = 2net.ipv4.conf.ens39.rp_filter = 2net.ipv4.ipfrag_high_thresh=16777216net.ipv4.ipfrag_low_thresh=15728640net.ipv4.ipfrag_time=60
7、关闭操作系统透明大页
redhat7# cat /sys/kernel/mm/transparent_hugepage/enabledalways madvise [never]--增加transparent_hugepage=nevercat /etc/default/grubGRUB_TIMEOUT=5GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"GRUB_DEFAULT=savedGRUB_DISABLE_SUBMENU=trueGRUB_TERMINAL_OUTPUT="console"GRUB_CMDLINE_LINUX="rd.lvm.lv=myvg/swap rd.lvm.lv=myvg/usrvconsole.font=latarcyrheb-sun16 rd.lvm.lv=myvg/root crashkernel=autovconsole.keymap=us rhgb quiet transparent_hugepage=never"GRUB_DISABLE_RECOVERY="true"--对grub生效# grub2-mkconfig -o /boot/grub2/grub.cfgGenerating grub configuration file ...Found linux image: /boot/vmlinuz-3.10.0-123.el7.x86_64Found initrd image: /boot/initramfs-3.10.0-123.el7.x86_64.imgFound linux image: /boot/vmlinuz-0-rescue-41c535c189b842eea5a8c20cbd9bff26Found initrd image: /boot/initramfs-0-rescue-41c535c189b842eea5a8c20cbd9bff26.imgdone--关闭tuned服务# systemctl stop tuned.service# systemctl disable tuned.service--重启reboot--确认cat /sys/kernel/mm/transparent_hugepage/enabledredhat6、redhat7在/etc/rc.d/rc.local文件中加入下面配置,重启生效:if test -f /sys/kernel/mm/transparent_hugepage/enabled; thenecho never > /sys/kernel/mm/transparent_hugepage/enabledfiif test -f /sys/kernel/mm/transparent_hugepage/defrag; thenecho never > /sys/kernel/mm/transparent_hugepage/defragfi重启后确认结果如下:cat /sys/kernel/mm/transparent_hugepage/defragalways [never]cat /sys/kernel/mm/transparent_hugepage/enabledalways [never]
8、ntp设置
Redhat6配置: # 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 ntpdateSYNC_HWCLOCK=yes #同步硬件bios时间#vi /etc/ntp.confserver xx.xx.xx.xx prefer #添加ntp服务器地址为首要地址server 127.127.1.0 iburst#添加本机为次要同步地址#vi /etc/ntp/step-tickersxx.xx.xx.xx#添加ntp服务器地址,设置在ntp启动时自动同步时间配置完毕后,重启ntpd服务,并查看状态chkconfig ntpd onservice ntpd restartntpstat#查看ntpd服务状态date #查看时间是否正常redhat7配置:yum install ntpvi /etc/ntp.confserver 10.5.26.10 iburstvi /etc/sysconfig/ntpdOPTIONS="-x -g"systemctl start ntpd.servicesystemctl enable ntpd.servicesystemctl status ntpd.service
9、网卡绑定
red6touch /etc/modprobe.d/bonding.confecho "alias bondeth0 bonding" >> /etc/modprobe.d/bonding.confvi /etc/sysconfig/network-scripts/ifcfg-bond0DEVICE=bond0ONBOOT=yesBOOTPROTO=staticUSERCTL=noNM_CONTROLLED=noIPADDR=10.1.2.3NETMASK=255.255.255.0GATEWAY=10.1.2.254BONDING_OPTS="mode=1 miimon=100"vi /etc/sysconfig/network-scripts/ifcfg-eth0DEVICE=eth0ONBOOT=yesBOOTPROTO=noneMASTER=bond0SLAVE=yesUSERCTL=noNM_CONTROLLED=noecho "ifenslave bond0 eth0 eth2" >>/etc/rc.d/rc.local重启服务器查看状态cat /sys/class/net/bonding_masterscat /sys/class/net/bondeth0/bonding/modecat /proc/net/bonding/bondeth0通过拔插网线验证red7 nmcli team
10、网络检查
(1). 确保节点间通信网络(私有网络)是通过单独的交换机连接,而不是直连。(2). 确保所有节点的连接到相同网络的网卡名称、网络子网都一样。比如连接到 public网络的网卡名称都叫 eth0,其 IP 地址子网都是 133.37.x.0,子网掩码都为255.255.255.0。(3). 确保系统中有且只有一个默认路由,并且是通过 public 网络到达默认路由。(4). 确保网卡到网络的带宽是正确的。#ethtool eth2Settings for eth2:Supported ports: [ TP ]Supported link modes: 10baseT/Half 10baseT/Full100baseT/Half 100baseT/Full1000baseT/FullSupports auto-negotiation: YesAdvertised link modes: 10baseT/Half 10baseT/Full100baseT/Half 100baseT/Full1000baseT/FullAdvertised auto-negotiation: YesSpeed: 1000Mb/sDuplex: FullPort: Twisted PairPHYAD: 1Transceiver: internalAuto-negotiation: onSupports Wake-on: umbgWake-on: gCurrent message level: 0x00000003 (3)Link detected: yes上面的 Speed: 1000Mb/s 表示连接的实际网络带宽为 1000Mbps。虽然交换机、网卡都是 1000Mbps 或以上带宽,但有时由于端口问题、网络线缆问题等原因,实际带宽并没有这么多。(5). 确保在私有网络上开启了多播。可以在 Oracle 官方支持网站上下载 mcasttest.pl脚本进行检查
11、存储多路径配置
见 https://www.modb.pro/db/14031
12、创建用户组
groupadd -g 1000 oinstallgroupadd -g 1001 dbagroupadd -g 1002 opergroupadd -g 1003 asmadmingroupadd -g 1004 asmopergroupadd -g 1005 asmdbauseradd -u 1000 -g oinstall -G dba,oper,asmdba oracleuseradd -u 1001 -g oinstall -G dba,asmadmin,asmdba,asmoper,oper grid
13、limits限制
touch /etc/security/limits.d/99-grid-oracle-limits.confgrid soft nproc 16384grid hard nproc 16384grid soft nofile 10240grid hard nofile 65536grid soft stack 10240grid hard stack 32768grid soft memlock unlimitedgrid hard memlock unlimitedgrid soft core unlimitedgrid hard core unlimitedoracle soft nproc 16384oracle hard nproc 16384oracle soft nofile 10240oracle hard nofile 65536oracle soft stack 10240oracle hard stack 32768oracle soft memlock unlimitedoracle hard memlock unlimitedoracle soft core unlimitedoracle hard core unlimitedtouch /etc/profile.d/oracle-grid.sh#Setting the appropriate ulimits for oracle and grid userif [ $USER = "oracle" ]; then if [ $SHELL = "/bin/ksh" ]; then ulimit -u 16384 ulimit -n 65536else ulimit -u 16384 -n 65536 fifiif [ $USER = "grid" ]; then if [ $SHELL = "/bin/ksh" ]; then ulimit -u 16384 ulimit -n 65536 else ulimit -u 16384 -n 65536 fifi
14、创建目录
集群软件BASE目录:/u01/app/oracle集群软件HOME目录:/u01/app/11.2.0/grid 数据库软件BASE目录:/u01/app/oracle数据库软件HOME目录:/u01/app/oracle/product/11.2.0/db_homemkdir -p /u01/app/gridmkdir -p /u01/app/11.2.0/gridmkdir -p /u01/app/oraInventorychown -R grid:oinstall /u01/mkdir -p /u01/app/oracle/product/11.2.0/db_homechown -R oracle:oinstall /u01/app/oracle/chmod -R 755 /u01
15、设置oracle、grid用户环境变量
oracle:export TMP=/tmpexport TMPDIR=$TMPexport ORACLE_SID=racdb1;export ORACLE_BASE=/u01/app/oracleexport ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_homeexport ORACLE_TERM=xtermexport PATH=/usr/sbin:$PATHexport PATH=$ORACLE_HOME/bin:$PATHexport LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/libexport CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlibexport NLS_LANG=AMERICAN_AMERICA.ZHS16GBKexport LANG=en_US.UTF-8umask 022grid:export ORACLE_SID=+ASM1export ORACLE_OWNER=gridexport ORACLE_BASE=/u01/app/gridexport ORACLE_HOME=/u01/app/11.2.0/gridexport LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib:/lib:/usr/lib:/usr/local/lib PATH=$PATH:$HOME/bin$:$ORACLE_HOME/binexport LANG=en_US.UTF-8export PATH umask 022
16、修改hosts文件
Public IP:别名直接使用主机名,即uname -a返回的机器名;Private IP: 别名为主机名-priv。Virtual IP:别名为主机名-vip。SCAN IP:别名为数据库名-scan。#Public Ip192.168.0.203 mydb1192.168.0.204 mydb2#Virtual Ip192.168.0.205 mydb1-vip192.168.0.206 mydb2-vip#Private Ip192.168.124.203 mydb1-priv192.168.124.204 mydb2-priv#Scan Ip192.168.0.207 racdb-scan
17、设置互信
安装grid软件时使用sshUserSetup.sh快速创建互信, $node1 $node2变量参数需要根据实际节点名称进行内容调整。在一个节点上执行即可(可以在root用户下执行):./sshUserSetup.sh -user grid -hosts "$node1 $node2" -advanced -exverify -confirm./sshUserSetup.sh -user oracle -hosts "$node1 $node2" -advanced -exverify -confirm
18、命名规范
1)集群(CLUSTER)的命名规则Cluster name本身没有特殊用途,仅在使用其他管理工具统一管理不同RAC实例时有用,不得超过15个字符。${DB_NAME}-cls2)SCAN的命名规则SCAN 名称本身没有特殊用途,仅在使用其他管理工具统一管理时有用,不得超过15个字符。${DB_NAME}-scan
19、安装时检查忽略选项
1)Package:pdksh-5.2.142)Device Checks for AM3)Task resolv.conf Integrity
20、grid集群软件安装,在执行root.sh脚本前,添加ohas服务
touch /usr/lib/systemd/system/ohas.servicechmod 777 /usr/lib/systemd/system/ohas.serviceohas.service :[Unit]Description=Oracle High Availability ServicesAfter=syslog.target[Service]ExecStart=/etc/init.d/init.ohasd run >/dev/null 2>&1 Type=simpleRestart=always[Install]WantedBy=multi-user.targetsystemctl daemon-reloadsystemctl enable ohas.servicesystemctl start ohas.servicesystemctl status ohas.service
21、在两个节点分别执行orainstRoot.sh和root.sh脚本
执行顺序:1节点orainstRoot.sh,2节点orainstRoot.sh,1节点root.sh,2节点root.sh1节点:[root@mydb1 system]# /u01/app/oraInventory/orainstRoot.shChanging permissions of /u01/app/oraInventory.Adding read,write permissions for group.Removing read,write,execute permissions for world.Changing groupname of /u01/app/oraInventory to oinstall.The execution of the script is complete.[root@mydb1 system]# /u01/app/11.2.0/grid/root.shPerforming root user operation for Oracle 11g The following environment variables are set as:ORACLE_OWNER= gridORACLE_HOME= /u01/app/11.2.0/gridEnter the full pathname of the local bin directory: [/usr/local/bin]: Copying dbhome to /usr/local/bin ... Copying oraenv to /usr/local/bin ... Copying coraenv to /usr/local/bin ...Creating /etc/oratab file...Entries will be added to the /etc/oratab file as needed byDatabase Configuration Assistant when a database is createdFinished running generic part of root script.Now product-specific root actions will be performed.Using configuration parameter file: /u01/app/11.2.0/grid/crs/install/crsconfig_paramsCreating trace directoryUser ignored Prerequisites during installationInstalling Trace File AnalyzerOLR initialization - successful root wallet root wallet cert root cert export peer wallet profile reader wallet pa wallet peer wallet keys pa wallet keys peer cert request pa cert request peer cert pa cert peer root cert TP profile reader root cert TP pa root cert TP peer pa cert TP pa peer cert TP profile reader pa cert TP profile reader peer cert TP peer user cert pa user certAdding Clusterware entries to inittab**ohasd failed to start** ##出现该提示需要重启ohas.service服务Failed to start the Clusterware. Last 20 lines of the alert log follow: 2020-01-10 08:16:18.019: [client(23496)]CRS-2101:The OLR was formatted using version 3.CRS-2672: Attempting to start 'ora.mdnsd' on 'mydb1'CRS-2676: Start of 'ora.mdnsd' on 'mydb1' succeededCRS-2672: Attempting to start 'ora.gpnpd' on 'mydb1'CRS-2676: Start of 'ora.gpnpd' on 'mydb1' succeededCRS-2672: Attempting to start 'ora.cssdmonitor' on 'mydb1'CRS-2672: Attempting to start 'ora.gipcd' on 'mydb1'CRS-2676: Start of 'ora.cssdmonitor' on 'mydb1' succeededCRS-2676: Start of 'ora.gipcd' on 'mydb1' succeededCRS-2672: Attempting to start 'ora.cssd' on 'mydb1'CRS-2672: Attempting to start 'ora.diskmon' on 'mydb1'CRS-2676: Start of 'ora.diskmon' on 'mydb1' succeededCRS-2676: Start of 'ora.cssd' on 'mydb1' succeeded已成功创建并启动 ASM。已成功创建磁盘组OCRDG。clscfg: -install mode specifiedSuccessfully accumulated necessary OCR keys.Creating OCR keys for user 'root', privgrp 'root'..Operation successful.CRS-4256: Updating the profileSuccessful addition of voting disk 992a298111ba4fb8bf16c75cdd232ca8.Successfully replaced voting disk group with +OCRDG.CRS-4256: Updating the profileCRS-4266: Voting file(s) successfully replaced## STATEFile Universal IdFile Name Disk group-- ------------------------------- --------- 1. ONLINE 992a298111ba4fb8bf16c75cdd232ca8 (/dev/mapper/asm_ocr1p1) [OCRDG]Located 1 voting disk(s).sh: /bin/netstat: 没有那个文件或目录CRS-2672: Attempting to start 'ora.asm' on 'mydb1'CRS-2676: Start of 'ora.asm' on 'mydb1' succeededCRS-2672: Attempting to start 'ora.OCRDG.dg' on 'mydb1'CRS-2676: Start of 'ora.OCRDG.dg' on 'mydb1' succeeded软件包准备中...cvuqdisk-1.0.9-1.x86_64Configure Oracle Grid Infrastructure for a Cluster ... succeeded2节点:[root@mydb2 etc]# /u01/app/oraInventory/orainstRoot.shChanging permissions of /u01/app/oraInventory.Adding read,write permissions for group.Removing read,write,execute permissions for world.Changing groupname of /u01/app/oraInventory to oinstall.The execution of the script is complete.[root@mydb2 etc]# [root@mydb2 etc]# cd[root@mydb2 ~]# /u01/app/11.2.0/grid/root.shPerforming root user operation for Oracle 11g The following environment variables are set as:ORACLE_OWNER= gridORACLE_HOME= /u01/app/11.2.0/gridEnter the full pathname of the local bin directory: [/usr/local/bin]: Copying dbhome to /usr/local/bin ... Copying oraenv to /usr/local/bin ... Copying coraenv to /usr/local/bin ...Creating /etc/oratab file...Entries will be added to the /etc/oratab file as needed byDatabase Configuration Assistant when a database is createdFinished running generic part of root script.Now product-specific root actions will be performed.Using configuration parameter file: /u01/app/11.2.0/grid/crs/install/crsconfig_paramsCreating trace directoryUser ignored Prerequisites during installationInstalling Trace File AnalyzerOLR initialization - successfulAdding Clusterware entries to inittab**ohasd failed to start** ##出现该提示需要重启ohas.service服务Failed to start the Clusterware. Last 20 lines of the alert log follow: 2020-01-10 08:27:01.458: [client(21808)]CRS-2101:The OLR was formatted using version 3.CRS-4402: The CSS daemon was started in exclusive mode but found an active CSS daemon on node mydb1, number 1, and is terminatingAn active cluster was found during exclusive startup, restarting to join the clustersh: /bin/netstat: 没有那个文件或目录软件包准备中...cvuqdisk-1.0.9-1.x86_64Configure Oracle Grid Infrastructure for a Cluster ... succeeded
22、报错忽略
1)Configure Oracle Grid Infrastructure for aCluster2)Oracle Cluster Verification Utility
23、数据库软件安装检查忽略项
1)Package:pdksh-5.2.142)Task resolv.conf Integrity3)Single Client Access Name(SCAN)
23、安装报错
提示:Error in invoking target 'agent nmhs'of makefile '/u01/app/oracle/product/11.2.0/db_home/sysman/lib/ins_emagent.mk'.解决方法如下:cd $ORACLE_HOME/sysman/libcp ins_emagent.mk ins_emagent.mk.bakvi ins_emagent.mk/NMECTL 快速定位,修改如下:$(MK_EMAGENT_NMECTL) -lnnz11说明:第一个是字母l 后面两个是数字1然后点击 Retry
24、root用户下,在两个节点分别执行root.sh
/u01/app/oracle/product/11.2.0/db_home/root.sh[root@mydb2 ~]# /u01/app/oracle/product/11.2.0/db_home/root.shPerforming root user operation for Oracle 11g The following environment variables are set as:ORACLE_OWNER= oracleORACLE_HOME= /u01/app/oracle/product/11.2.0/db_homeEnter the full pathname of the local bin directory: [/usr/local/bin]: The contents of "dbhome" have not changed. No need to overwrite.The contents of "oraenv" have not changed. No need to overwrite.The contents of "coraenv" have not changed. No need to overwrite.Entries will be added to the /etc/oratab file as needed byDatabase Configuration Assistant when a database is createdFinished running generic part of root script.Now product-specific root actions will be performed.Finished product-specific root actions.
25、使用asmca配置实例安装所需磁盘
REDODG
DATADG
ARCHDG
26、使用dbca创建实例
27、配置hugepage,大页内存
使用大内存页有哪些好处:
1. 减少页表(Page Table)大小。每一个Huge Page,对应的是连续的2MB物理内存,这样12GB的物理内存只需要48KB的Page Table,与原来的24MB相比减少很多。2. Huge Page内存只能锁定在物理内存中,不能被交换到交换区。这样避免了交换引起的性能影响。3. 由于页表数量的减少,使得CPU中的TLB(可理解为CPU对页表的CACHE)的命中率大大提高。4. 针对Huge Page的页表,在各进程之间可以共享,也降低了Page Table的大小。实际上这里可以反映出Linux在分页处理机制上的缺陷。而其他操作系统,比如AIX,对于共享内存段这样的内存,进程共享相同的页表,避免了Linux的这种问题。像笔者维护的一套系统,连接数平常都是5000以上,实例的SGA在60GB左右,要是按Linux的分页处理方式,系统中大部分内存都会被页表给用掉。
实施步骤如下:
1)检查/proc/meminfogrep -i hugepage /proc/meminfo2)计算HugePages_Total大小,使用hugepages_settings.sh脚本进行计算:#!/bin/bashKERN=`uname -r | awk -F. '{ printf("%d.%d\n",$1,$2); }'`# Find out the HugePage sizeHPG_SZ=`grep Hugepagesize /proc/meminfo | awk '{print $2}'`# Start from 1 pages to be on the safe side and guarantee 1 free HugePageNUM_PG=1# Cumulative number of pages required to handle the running shared memory segmentsfor SEG_BYTES in `ipcs -m | awk '{print $5}' | grep "[0-9][0-9]*"`doMIN_PG=`echo "$SEG_BYTES/($HPG_SZ*1024)" | bc -q`if [ $MIN_PG -gt 0 ]; thenNUM_PG=`echo "$NUM_PG+$MIN_PG+1" | bc -q`fidone# Finish with resultscase $KERN in'2.4') HUGETLB_POOL=`echo "$NUM_PG*$HPG_SZ/1024" | bc -q`;echo "Recommended setting: vm.hugetlb_pool = $HUGETLB_POOL" ;;'2.6') MEM_LOCK=`echo "$NUM_PG*$HPG_SZ" | bc -q`;echo "Recommended setting within the kernel boot command line(/etc/sysctl.conf): vm.nr_hugepages = $NUM_PG"echo "Recommended setting within /etc/security/limits.d/99-grid-oracle-limits.conf: oracle soft memlock $MEM_LOCK"echo "Recommended setting within /etc/security/limits.d/99-grid-oracle-limits.conf: oracle hard memlock $MEM_LOCK" ;;'3.10') MEM_LOCK=`echo "$NUM_PG*$HPG_SZ" | bc -q`;echo "Recommended setting within the kernel boot command line(/etc/sysctl.conf): vm.nr_hugepages =$NUM_PG"echo "Recommended setting within /etc/security/limits.d/99-grid-oracle-limits.conf: oracle soft memlock $MEM_LOCK"echo "Recommended setting within /etc/security/limits.d/99-grid-oracle-limits.conf: oracle hard memlock $MEM_LOCK" ;;*) echo "Unrecognized kernel version $KERN. Exiting." ;;esac#end ----3)修改/etc/sysctl.conf文件,增加如下行,根据上步计算的hugepages大小:vm.nr_hugepages=92184)生效sysctl -p5)修改/etc/security/limits.d/99-grid-oracle-limits.conf,增加如下,设定oracle用户可以锁定内存的大小 ,以KB为单位,可以设置为具体值,也可设置为unlimited:oracle soft memlock unlimitedoracle hard memlock unlimited6)重新启动实例
28、修改本地和集群监听端口号为11521
1)修改前确认:[grid@mydb1 ~]$ srvctl config listenerName: LISTENERNetwork: 1, Owner: gridHome:End points: TCP:1521[grid@mydb1 ~]$ srvctl config scan_listenerSCAN Listener LISTENER_SCAN1 exists. Port: TCP:15212)在集群下修改listener、scan_listener端口为11521,在一个节点执行srvctl modify listener -l LISTENER -p "TCP:11521"srvctl modify scan_listener -p 115213)修改local_listener,进入sqlplus;alter system set local_listener = '(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.205)(PORT = 11521))' scope=both sid='racdb1';alter system set local_listener = '(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.206)(PORT = 11521))' scope=both sid='racdb2';4)修改remote_listeneralter system set remote_listener='racdb-scan:11521' scope=both;5)在第1个节点关闭本地监听,修改listener.ora、endpoints_listener.ora、tnsnames.ora,并重启本地监听srvctl stop listener -l LISTENER -n mydb1cd $ORACLE_HOME/network/admin--修改1521为11521vi endpoints_listener.oravi listener.orasrvctl start listener -l LISTENER -n mydb1srvctl status listener -l LISTENERsrvctl config listener6)在第2个节点关闭本地监听,修改listener.ora、endpoints_listener.ora、tnsnames.ora,并重启本地监听srvctl stop listener -l LISTENER -n mydb2cd $ORACLE_HOME/network/admin--修改1521为11521vi endpoints_listener.oravi listener.orasrvctl start listener -l LISTENER -n mydb2srvctl status listener -l LISTENERsrvctl config listener7)修改ASM 监听端口 (如果不修改asm监听端口,lsnrctl status查看监听状态时不会显示asm服务监听状态)su - gridsqlplus / as sysdbaalter system set local_listener='(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.0.205)(PORT=11521))' scope=both sid='+ASM1';alter system set local_listener='(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.0.206)(PORT=11521))' scope=both sid='+ASM2';lsnrctl status
29、asm参数优化
ASM 磁盘组使用的是默认的 1M AU 大小,对于大型数据库,这会造成较多的内存占用,同时对性能略微有些影响,建议对于新增的用于放置数据文件的 ASM 磁盘组,适当调大 AU大小,比如 4M 或 8M(2 的幂值)。根据电信运营商的实际经验,建议设置 AU 为 为 4m 。
30、数据库参数修改推荐
Alter system set resource_manager_plan='FORCE:' scope =spfile sid='*';Alter system set audit_trail=none scope=spfile sid='*';alter system set undo_retention=10800 scope=spfile sid='*';alter system set session_cached_cursors=200 scope=spfile sid='*';alter system set db_files=2000 scope=spfile sid='*';alter system set max_shared_servers=0 scope=spfile sid='*';alter system set sec_max_failed_login_attempts=100 scope=spfile sid='*';alter system set deferred_segment_creation=false scope=spfile sid='*';alter system set parallel_force_local=true scope=spfile sid='*';alter system set parallel_max_servers=32 scope=spfile sid='*';alter system set sec_case_sensitive_logon=false scope=spfile sid='*';alter system set open_cursors=3000 scope=spfile sid='*';alter system set open_links =40 scope=spfile sid='*';alter system set open_links_per_instance =40 scope=spfile sid='*';alter system set db_cache_advice=off scope=spfile sid='*';alter system set "_b_tree_bitmap_plans"=false scope=spfile sid='*';alter system set "_gc_policy_time"=0 scope=spfile sid='*';alter system set "_gc_defer_time"=3 scope=spfile sid='*';alter system set "_lm_tickets"=5000 scope=spfile sid='*';alter system set "_optimizer_use_feedback"=false sid='*';alter system set "_undo_autotune"=false scope=both sid='*';alter system set "_bloom_filter_enabled"=FALSE scope=spfile sid='*';alter system set "_cleanup_rollback_entries"=2000 scope=spfile sid='*';alter system set "_px_use_large_pool"=true scope=spfile sid='*';alter system set "_optimizer_extended_cursor_sharing_rel"=NONE scope=spfilesid='*';alter system set "_optimizer_extended_cursor_sharing"=NONE scope=spfile sid='*';alter system set "_optimizer_adaptive_cursor_sharing"=false scope=spfilesid='*';alter system set "_optimizer_mjc_enabled"=FALSE scope=spfile sid='*';alter system set "_sort_elimination_cost_ratio"=1 scope=spfile sid='*';alter system set "_partition_large_extents"=FALSE scope=spfile sid='*';alter system set "_index_partition_large_extents"=FALSE scope=spfile sid='*';alter system set "_clusterwide_global_transactions"=FALSE scope=spfile sid='*';alter system set "_part_access_version_by_number"=FALSE scope=spfile; alter system set "_partition_large_extents"=FALSE scope=spfile;alter system set "_sort_elimination_cost_ratio"=1 scope=spfile;alter system set "_use_adaptive_log_file_sync"=FALSE scope=spfile;alter system set "_lm_sync_timeout"=1200 scope=spfile;alter system set "_ksmg_granule_size"=134217728 scope=spfile;alter system set "_optimizer_cartesian_enabled"=false scope=spfile;alter system set "_external_scn_logging_threshold_seconds"=3600 scope=spfile;alter system set "_datafile_write_errors_crash_instance"=false scope=spfile;alter system set event='28401 TRACE NAME CONTEXT FOREVER, LEVEL 1:60025 trace namecontext forever:10949 trace name context forever,level 1' sid='*' scope=spfile;
感谢各位的阅读,以上就是"Rhel7_Oracle11g_rac安装方法是什么"的内容了,经过本文的学习后,相信大家对Rhel7_Oracle11g_rac安装方法是什么这一问题有了更深刻的体会,具体使用情况还需要大家实践验证。这里是,小编将为大家推送更多相关知识点的文章,欢迎关注!
节点
内存
网络
服务
软件
监听
方法
配置
参数
大小
数据
目录
数据库
文件
网卡
集群
检查
主机
地址
实例
数据库的安全要保护哪些东西
数据库安全各自的含义是什么
生产安全数据库录入
数据库的安全性及管理
数据库安全策略包含哪些
海淀数据库安全审计系统
建立农村房屋安全信息数据库
易用的数据库客户端支持安全管理
连接数据库失败ssl安全错误
数据库的锁怎样保障安全
旌德微型软件开发服务零售价格
数据库不支持事务怎么回滚
四方网络安全对话
数据库输入命令号码怎么取消
对日软件开发为什么多为外派
数据模型对应数据库设计那个步骤
云南网络技术服务资费
外网如何连接如何数据库
2022年网络安全政治题
软件开发安全标准规范
办税大厅网络安全自查情况
网络技术学习视频素材
软件开发工具 称为
游戏服务器和数据库异步交互
学校查重检测是用哪个数据库啊
广州嘉荣互联网科技有限
上海付正网络技术有限公司老板
一二年级网络安全主题
辽宁语音网络技术分类创新服务
知富服务器
手机单机软件开发需要学什么
三星网络安全负责人
阿德莱德大学网络安全专业
服务器如何制作新手装备箱
web服务器部署实训体会
qt如何使用本地数据库连接
数据库系统参考文献
七日杀开服务器占用空间
正保数据库试用服务
北京客邻尚品网络技术有