OracleRestart[11204]“加”ASM“加”RHEL5安装手册.docx

上传人:小飞机 文档编号:1663320 上传时间:2022-12-13 格式:DOCX 页数:38 大小:2.66MB
返回 下载 相关 举报
OracleRestart[11204]“加”ASM“加”RHEL5安装手册.docx_第1页
第1页 / 共38页
OracleRestart[11204]“加”ASM“加”RHEL5安装手册.docx_第2页
第2页 / 共38页
OracleRestart[11204]“加”ASM“加”RHEL5安装手册.docx_第3页
第3页 / 共38页
OracleRestart[11204]“加”ASM“加”RHEL5安装手册.docx_第4页
第4页 / 共38页
OracleRestart[11204]“加”ASM“加”RHEL5安装手册.docx_第5页
第5页 / 共38页
点击查看更多>>
资源描述

《OracleRestart[11204]“加”ASM“加”RHEL5安装手册.docx》由会员分享,可在线阅读,更多相关《OracleRestart[11204]“加”ASM“加”RHEL5安装手册.docx(38页珍藏版)》请在三一办公上搜索。

1、Oracle Restart+ASM+RHEL5安装手册Oracle restart数据库是在原来单实例数据库的基础上,利用了Clusterware增强了单实例数据库的可用性.可以使用srvctl,crsctl命令管理单实例数据库,当服务器重起或进程异常终止时,能够自动启动数据库.一 OS环境配置1 创建用户groupadd g 600 dbauseradd u 600 g dba G dba oracleuseradd u 601 g dba G dba grid chown R oracle:dba /oraclechown R grid:dba /grid chmod R 775 /or

2、aclechmod R 775 /grid2 版本及kernelRHEL5 5.2以上, kernel 2.6.18以后RHEL6 6.0以后 kernel 2.6.32-71.el6.x86_64 以后 3 安装rpm包 查询rpm包是否安装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 l

3、ibaio-devel libgcc libstdc+ libstdc+-devel make sysstat unixODBC unixODBC-develRHEL 5 binutils-2.17.50.0.6compat-libstdc+-33-3.2.3compat-libstdc+-33-3.2.3 (32 bit)elfutils-libelf-0.125elfutils-libelf-devel-0.125gcc-4.1.2gcc-c+-4.1.2glibc-2.5-24glibc-2.5-24 (32 bit)glibc-common-2.5glibc-devel-2.5glib

4、c-devel-2.5 (32 bit)glibc-headers-2.5ksh-20060214libaio-0.3.106libaio-0.3.106 (32 bit)libaio-devel-0.3.106libaio-devel-0.3.106 (32 bit)libgcc-4.1.2libgcc-4.1.2 (32 bit)libstdc+-4.1.2libstdc+-4.1.2 (32 bit)libstdc+-devel 4.1.2make-3.81sysstat-7.0.2unixODBC-2.2.11unixODBC-2.2.11 (32 bit)unixODBC-devel

5、-2.2.11unixODBC-devel-2.2.11 (32 bit)REHL6 binutils-2.20.51.0.2-5.11.el6 (x86_64)compat-libcap1-1.10-1 (x86_64)compat-libstdc+-33-3.2.3-69.el6 (x86_64)compat-libstdc+-33-3.2.3-69.el6.i686gcc-4.4.4-13.el6 (x86_64)gcc-c+-4.4.4-13.el6 (x86_64)glibc-2.12-1.7.el6 (i686)glibc-2.12-1.7.el6 (x86_64)glibc-de

6、vel-2.12-1.7.el6 (x86_64)glibc-devel-2.12-1.7.el6.i686kshlibgcc-4.4.4-13.el6 (i686)libgcc-4.4.4-13.el6 (x86_64)libstdc+-4.4.4-13.el6 (x86_64)libstdc+-4.4.4-13.el6.i686libstdc+-devel-4.4.4-13.el6 (x86_64)libstdc+-devel-4.4.4-13.el6.i686libaio-0.3.107-10.el6 (x86_64)libaio-0.3.107-10.el6.i686libaio-de

7、vel-0.3.107-10.el6 (x86_64)libaio-devel-0.3.107-10.el6.i686make-3.81-19.el6sysstat-9.0.4-11.el6 (x86_64)unixODBC-2.2.14-11.el6 (x86_64) or laterunixODBC-2.2.14-11.el6.i686 or laterunixODBC-devel-2.2.14-11.el6 (x86_64) or laterunixODBC-devel-2.2.14-11.el6.i686 or later4 kernel参数编译/etc/sysctl.conf,增加以

8、下内容kernel.msgmnb = 65536kernel.msgmax = 65536kernel.msgmni = 2878kernel.sem = 250 320000 100 128kernel.shmmni = 4096kernel.shmmax = 42949672960kernel.shmall = 2097152net.core.rmem_default = 262144net.core.rmem_max = 4194304net.core.wmem_default = 262144net.core.wmem_max = 1048576fs.aio-max-nr = 1048

9、576fs.file-max = 6815744net.ipv4.ip_local_port_range = 9000 655005 用户限制编译/etc/security/limits.conf oracle hard nofile 65536oracle soft nofile 65536oracle soft stack 10240oracle hard nproc 16384oracle soft nproc 16384grid hard nofile 65536grid soft nofile 65536grid soft stack 10240grid hard nproc 163

10、84grid soft nproc 163846 环境变量 Oracle用户#FOr oracle envexport ORACLE_SID=NGDWATESTexport ORACLE_BASE=/oracleexport ORACLE_HOME=$ORACLE_BASE/dbexport LD_LIBRARY_PATH=$ORACLE_HOME/lib:$ORACLE_HOME/lib32:/usr/lib:/libexport PATH=$PATH:$ORACLE_HOME/bin:$ORACLE_HOME/OPatch#For command aliasalias ss=sqlplus

11、 / as sysdbaalias ls=ls -lFalias bdump=cd /oracle/diag/rdbms/dwatest/DWATEST/tracestty erase Hexport TMOUT=0grid用户#For grid envexport ORACLE_SID=+ASMexport ORACLE_BASE=/oracle export ORACLE_HOME=/grid #for ams homeexport GRID_HOME=/grid #for grid homeexport LD_LIBRARY_PATH=$ORACLE_HOME/lib:$ORACLE_H

12、OME/lib32:/usr/lib:/libexport PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$GRID_HOME/bin:$PATH#For command aliasalias ss=sqlplus / as sysasmalias ls=ls -lFalias bdump=cd /oracle/diag/asm/+asm/+ASM/tracestty erase Hexport TMOUT=0二 安装Grid Infrastructure 1 安装grid Grid用户执行runInstaller gridHA2-BI-CS01 gird

13、$ ./runInstaller 选择skip software updates 注: 此处可选择install oracle grid infrastructure software only或configure oracle grid infrastructure a standalone server,时选择后者时ocr必须放在ASM上。选择os group dba指定oracle_base,grid_home路径指定oraInventory路径检查包,参数配置等注:oracle restart不需要要使用dns,无需配置resove.conf 可忽略Root用户执行orainstRoo

14、t.sh ,root.sh脚本 说明: orainstRoot.sh 脚本是为了设置清单目录的权限 Root.sh 调用了一些其它脚本,主要包括clusterware和系统配置工作.rootHA2-BI-CS01 # /oracle/oraInventory/orainstRoot.sh Changing permissions of /oracle/oraInventory.Adding read,write permissions for group.Removing read,write,execute permissions for world.Changing groupname o

15、f /oracle/oraInventory to dba.The execution of the script is complete.rootHA2-BI-CS01 # /grid/root.shPerforming root user operation for Oracle 11g The following environment variables are set as: ORACLE_OWNER= grid ORACLE_HOME= /gridEnter the full pathname of the local bin directory: /usr/local/bin:

16、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 pro

17、duct-specific root actions will be performed.To configure Grid Infrastructure for a Stand-Alone Server run the following command as the root user:/grid/perl/bin/perl -I/grid/perl/lib -I/grid/crs/install /grid/crs/install/roothas.plTo configure Grid Infrastructure for a Cluster execute the following

18、command:/grid/crs/config/config.shThis command launches the Grid Infrastructure Configuration Wizard. The wizard also supports silent operation, and the parameters can be passed through the response file that is available in the installation media.2 配置StandalonerootHA2-BI-CS01 # /grid/perl/bin/perl

19、-I/grid/perl/lib -I/grid/crs/install /grid/crs/install/roothas.plUsing configuration parameter file: /grid/crs/install/crsconfig_paramsCreating trace directoryUser ignored Prerequisites during installationLOCAL ADD MODE Creating OCR keys for user grid, privgrp dba.Operation successful.LOCAL ONLY MOD

20、E Successfully accumulated necessary OCR keys.Creating OCR keys for user root, privgrp root.Operation successful.CRS-4664: Node ha2-bi-cs01 successfully pinned.Adding Clusterware entries to inittab ha2-bi-cs01 2013/10/22 10:10:12 /grid/cdata/ha2-bi-cs01/backup_20131022_101012.olrSuccessfully configu

21、red Oracle Grid Infrastructure for a Standalone Server执行完该脚本后会在/etc/inittab中添加ohasd启动信息rootHA2-BI-CS01 # cat /etc/inittab|tail -1h1:35:respawn:/etc/init.d/init.ohasd run /dev/null 2&1 /dev/null3 检查高可用服务rootHA2-BI-CS01 # /grid/bin/crsctl check hasCRS-4638: Oracle High Availability Services is onliner

22、ootHA2-BI-CS01 # /grid/bin/crsctl check cssCRS-4530: Communications failure contacting Cluster Synchronization Services daemonrootHA2-BI-CS01 # /grid/bin/crsctl check evmCRS-4533: Event Manager is online 注:对于standalone server来说,crsctl命令没有cluster,crs参数,只有has,css,evm参数.如果使用ASM作为存储,CSS服务会自动启动. 4 检查OCRr

23、ootHA2-BI-CS01 # cat /etc/oracle/olr.locolrconfig_loc=/grid/cdata/localhost/ha2-bi-cs01.olrcrs_home=/gridrootHA2-BI-CS01 # /grid/bin/ocrcheckStatus of Oracle Cluster Registry is as follows : Version : 3 Total space (kbytes) : 262120 Used space (kbytes) : 152 Available space (kbytes) : 261968 ID : 12

24、97398646 Device/File Name : /grid/cdata/localhost/local.ocr Device/File integrity check succeeded Device/File not configured Device/File not configured Device/File not configured Device/File not configured Cluster registry integrity check succeeded Logical corruption check succeeded三 安装Oracle Databa

25、se Oracle用户执行runInstaller oracleHA2-BI-CS01 database$./runInstaller 跳过mos支持跳过更新选择install database software only选择single instance database installation 选择english 选择enterprise edition 选择组件,除oracle lable security,oracle database vault option之外全选指定oracle_base,oracle_home路径指定os group dbaRoot用户执行root.sh脚本

26、 rootHA2-BI-CS01 db# /oracle/db/root.shPerforming root user operation for Oracle 11g The following environment variables are set as: ORACLE_OWNER= oracle ORACLE_HOME= /oracle/dbEnter the full pathname of the local bin directory: /usr/local/bin: The contents of dbhome have not changed. No need to ove

27、rwrite.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 pr

28、oduct-specific root actions will be performed.Finished product-specific root actions.四 创建ASM DiskGroup Gird用户执行asmca gridHA2-BI-CS01 $asmca指定asmsys用户密码创建磁盘组DGSYS,冗余级别external修改asm pfile参数创建磁盘组DGDATA, 冗余级别external五 创建Database Oracle用户执行dbcaoracleHA2-BI-CS01 $dbca选择create database 选择custom database 指定

29、oracle_sid禁止Oracle enterprise manager指定sys,system用户密码选择存储方式 ASM禁用FRA,归档(根据情况选择)选择组件,除Oracle XML DB之外其它都不选选择字符集ZHS16GBK修改max datafiles值配置数据文件,禁用自动扩展 附:手动建库脚本 六 创建Listener 用gird用户执行netca gridHA2-BI-CS01 $netca检查监听状态gridHA2-BI-CS01 $ srvctl status listener Listener LISTENER is enabledListener LISTENER

30、is running on node(s): ha2-bi-cs01查看has,database,listener状态gridHA2-BI-CS01 $ crsctl status resource -t-NAME TARGET STATE SERVER STATE_DETAILS -Local Resources-ora.DGDATA.dg ONLINE ONLINE ha2-bi-cs01 ora.DGSYS.dg ONLINE ONLINE ha2-bi-cs01 ora.LISTENER.lsnr ONLINE ONLINE ha2-bi-cs01 ora.asm ONLINE ONLINE ha2-bi-cs01 Started ora.ons OFFLINE OFFLINE ha2-bi-cs01 -Cluster Resources-ora.cssd 1 ONLINE ONLINE ha2-bi-cs01 ora.diskmon 1 OFFLINE OFFLINE ora.dwatest.db 1 ONLINE ONLINE ha2-bi-cs01 Open ora.evmd 1 ONLINE ONLINE ha2-bi-cs01

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 生活休闲 > 在线阅读


备案号:宁ICP备20000045号-2

经营许可证:宁B2-20210002

宁公网安备 64010402000987号