Oracle,HA在Unix上双机环境的安装指南.doc_第1页
Oracle,HA在Unix上双机环境的安装指南.doc_第2页
Oracle,HA在Unix上双机环境的安装指南.doc_第3页
Oracle,HA在Unix上双机环境的安装指南.doc_第4页
Oracle,HA在Unix上双机环境的安装指南.doc_第5页
已阅读5页,还剩16页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

将我们最近在6000上安装oracle和ha的东西整理了一下,希望对大家有帮助。一、环境1、硬件环境ibm m85 2台ibm 7133-d40 ssa 磁盘阵列 2、软件环境aix 4.3.3hacmp oracle3、软件安装规划:软件类别 软件名称 软件状态 备注操作系统 aix4.3.3 已安装 操作系统补丁 aix patch 已安装 补丁10,以及安装oracle需要的iy30886、iy30927、iy31003补丁。热备软件 hacmp4.4.1 已安装 数据库 oracle9.2 已安装 4、磁盘规划:物理硬盘pdisk0 pdisk1以raid1方式做成hdisk2,逻辑硬盘hdisk2放在vg01卷组上,正常工作时为m851服务;物理硬盘pdisk2 pdisk3 pdisk4 pdisk5 pdisk6 pdisk7以raid1+0方式做成hdisk3,逻辑硬盘hdisk3放在vg02卷组上,正常工作时为m852服务;物理硬盘 pdisk8 作 hot spares;m851上的rootvg使用逻辑硬盘hdisk0与hdisk1做成镜像;m852上的rootvg使用逻辑硬盘hdisk0与hdisk1做成镜像;5、ip地址规划:主机名 启动地址 服务地址 等待地址m851 1 m852 2 二、操作系统安装(1)安装基本操作系统1.将aix安装盘第一张放入光驱2.打开计算机或在开机状态下重新启动(#reboot) 3.当系统自检 keyboard 通过后,按f5(从光驱引导) 4.系统提示:please define the system console后,按1(确认终端) 5.系统提示:type a 1 and press enter to use this terminal as the system console后按1(选择英语为安装语言) 6.进入安装程序,按系统提示操作:选择 2 chang/show installation settings and install 其它选项不需改变,只需改以下两项: a.将安装方式改为new and complete installation b.选择所要安装系统的disk 7.开始install。8.root登录,接着出现系统设置(时间,密码等),设置完毕退出(2)选择安装基本软件包执行smit update_all命令,按f4选择/dev/cd0光驱进入 software to install选择所需安装的软件开头有符即已安装过开头有+符即未安装过需要安装以下部分:bos.adtbos.perf bos.dosutil java.*perfagent.tools(3)操作系统补丁安装1、基本补丁(aix update cd)需要将补丁版本升级至9或10。执行smit update_all命令,按f4选择/dev/cd0光驱。升级后可以使用 instfix -i | grep ml 命令查看补丁版本情况,示例:all filesets for _aix_ml were found.all filesets for _aix_ml were found.all filesets for _aix_ml were found.all filesets for 4320-02_aix_ml were found.not all filesets for _aix_ml were found.all filesets for 4330-01_aix_ml were found.all filesets for 4330-02_aix_ml were found.all filesets for 4330-03_aix_ml were found.all filesets for 4330-04_aix_ml were found.all filesets for 4330-05_aix_ml were found.all filesets for 4330-06_aix_ml were found.all filesets for 4330-07_aix_ml were found.all filesets for 4330-08_aix_ml were found.all filesets for 4330-09_aix_ml were found.all filesets for aix43ml were found.此系统的补丁版本是9 2、特殊补丁(oracle 安装需要)jre 1.1.8-build 2002-05-09、bos、java 131三个补丁包,在如下iy30886、iy30927、iy31003三个文件夹中。1.将补丁包解包后文件拷贝至 /usr/sys/inst.images 目录下;2.运行如下命令: installp -acgxd /usr/sys/inst.images bos.rte.install 生成安装文件包;3.执行 smit update_all命令,按f4选择/usr/sys/inst.images光驱。三、oracle安装(1)系统要求1、oracle 9i server的硬件要求ram = 512。使用此命令检查物理内存情况:lsattr -el sys0 -a realmempaging space 一般来说等于 2*ram,最小400mb。使用此命令查看:lsps -a 例:page space physical volume volume group size %used active auto typehd6 hdisk0 rootvg 480mb 10 yes yes lv使用smit lvm(逻辑卷册系统管理员管理)改变大小 paging space change / show characteristics of a paging space 修改number of additional logical partitions 这里每增加1个代表增加16mbtemporary disk space:/tmp目录下需要 500mb;使用此命令查看:df -k安装目录磁盘空间:4g。2、oracle 9i server的软件要求操作系统aix 4.3.3的补丁要求参见 2.2操作系统补丁安装部分3、创建oracle用户及dba组首先创建dba 组:smit groups - add a group - 在 group name 栏输入 dba 。创建oracle用户:smit user - add a user - 在 user name 栏输入 oracle;在primary group 栏选择(f4) system;在 group set 栏选择 system和dba;在home directory 栏输入/home/oracle。(2)单机安装步骤实际操作是4个以cpio为扩展名的压缩包aix64_server_92010_disk14.cpio的安装介质。先创建一个临时的文件系统,将安装包拷贝并释放到临时文件系统中,安装完毕后删除临时文件系统,步骤如下:1、创建一个新的文件系统并mount该文件系统smittysystem storage management (physical & logical storage)file systemsadd / change / show / delete file systemsjournaled file systemsadd a journaled file systemadd a standard journaled file systemvolume group name 选择默认项即可在设置界面中 size = 6000000(3g)、mount point = /install 回车创建完毕smit(图形界面中)system storage management (physical & logical storage)file systemsmount a file system 设置界面中 file system name = /dev/lv01(可选)、directory over which to mount = / install、type of file system = jfs(可选)ok2、将压缩包拷至临时文件系统上并解压缩将安装包光盘放入光驱mount光驱:mount -rv cdrfs /dev/cd0 /cdrom拷贝文件到硬盘 /oracle 目录下:cd /oracle、cp /cdrom/aix64_server_92010_disk14.cpio . cpio -idcmv 取出光盘 -下一个文件删除aix64_server_92010_disk14.cpio:rm aix64_server_92010_disk14.cpio3、安装以oracle身份登录,cd /install/disk1目录,运行 ./runinstaller 脚本,提示 按y后弹出安装界面同时另启一个窗口,以root 身份登录,cd /install/disk1目录,执行./rootpre.sh同时另启一个窗口,以root 身份登录,在安装过程中需要执行 /tmp/orainstroot.sh、/home/oracle/orahome1/root.sh两个脚本 需要输入oracle home的名字和路径,如下 oracle_home、/home/oracle/ora9installation types 选择 enterprise edition - transaction processingglobal database name :ora、sid :oradirectory for database files:/home/oracle/ora9/oradatacharacter set :simplified chinese zhs16gbk(可选择)jdk home:usr/jdk_baseroot 登录执行 /home/oracle/orahome1/root.sh脚本enter the full pathname of the local bin dir :/usr/local/bin:回车4、oracle server 启动步骤更新oracle用户的.profile和.dtprofile文件(用于设置环境变量)以oracle身份登录.profile 文件和.dtprofile 文件示例:oracle_base=/home/oracleoracle_home=$oracle_base/ora9oracle_sid=orcla(a机/b机)oracle_owner=oracleora_nls33=$oracle_home/ocommon/nls/admin/datashlib_path=$oracle_home/libld_library_path=$oracle_home/libln_cntrl=l_pthreads_d7oracle_term=ansipath=$oracle_home/bin:$oracle_home/network/bin:$pathexport path oracle_base oracle_home oracle_sid oracle_termexport oracle_ownerexport nls_lang ora_nls33 shlib_path ld_library_path ln_cntrl5、数据库实例的启动与关闭启动数据库实例sqlplus /nologconn / as sysdbastartup关闭数据库实例sqlplus /nologconn / as sysdbashutdown immediate这里启动与关闭的实例的对象是由环境变量中 oracle_sid 指定的,可以通过export 命令来改变它的值。例如: export oracle_sid=orcla6、数据库监听服务的启动与关闭启动监听器lsnrctl start关闭监听器lsnrctl stop这里可以在命令的末尾加上监听服务的名字(在 oracle_home/network/admin/listener.ora中配置),例如:lsnrctl start lsnr_ta(3)在双机热备系统中oracle的安装1、磁盘状况描述a机与b机的本地各有两块硬盘作镜像;磁盘阵列划分成分别为ta和直销服务的两个物理卷;正常情况下:a机接管为ta服务的物理卷;b机接管为直销服务的物理卷。2、安装方法1.在a机和b机上创建dba组和oracle用户,两台机器的id需要保持一致,使用id命令看用户属性: id oracleuid=203(oracle) gid=0(system) groups=202(dba)2.在a机和b机上同时开始安装数据库,在a机指定数据库实例名时,指定ta的实例名,例如:sid=orcla;在b机指定数据库实例名时,指定直销的实例名,例如:sid=orclb;3.在a机指定数据库文件的路径时,指定ta在磁盘阵列上的路径,例如:directory for database files:/adata/orcla;在b机指定数据库文件的路径时,指定直销在磁盘阵列上的路径,例如:directory for database files:/bdata/orclb;4.oracle安装结束后,使a机接管直销的物理卷、b机接管ta的物理卷。操作步骤如下:在a机上unmount a机的文件系统 unmount /adata;在a机上deactivate smitty vg - deactivate a volume group - 在 volume group name 栏内选择 adatavg;在b机上unmount b机的文件系统 /bdata命令: unmount /bdata;在b机上smitty vg - deactivate a volume group - 在 volume group name 栏内选择 bdatavg;在a机上激活直销卷组smitty vg - activate a volume group - 在 volume group name 栏内选择 bdatavg;在a机上装配文件系统 mount /bdata;在b机上激活ta卷组smitty vg - activate a volume group - 在 volume group name 栏内选择 adatavg;在b机上装配文件系统 mount /adata;5.运行 dbca 创建数据库实例,在a机上创建直销的实例,在指定数据库文件的路径时,指定直销在磁盘阵列上的路径,覆盖原来在b机创建的数据库文件,例如:directory for database files:/bdata/orclb;在b机上创建ta的实例,在指定数据库文件的路径时,指定ta在磁盘阵列上的路径,覆盖原来在a机创建的数据库文件,例如:directory for database files:/bdata/orcla;注意创建的实例名和指定的数据库文件路径要和前面创建的实例保持一致。(在指定数据库文件路径时,所有.ctl、.log、.dbf、.ora的文件路径均需要手工指定到同一文件路径下)。6.把b机 $oracle_home/dbs/目录下 orapworcla和spfileorcla.ora两个文件拷贝到a机上$oracle_home/dbs/目录下;把a机 $oracle_home/dbs/目录下 orapworclb和spfileorclb.ora两个文件拷贝到b机上$oracle_home/dbs/目录下;7.修改两台机器$oracle_home/network/admin/目录下 listener.ora和tnsnames.ora两个文件并保持一致,示例:listener.oralsnr_a =(description_list =(description =(address_list =(address = (protocol = ipc)(key = extproc)(address_list =(address = (protocol = tcp)(host = )(port = 1521)lsnr_b =(description_list =(address = (protocol = tcp)(host = )(port = 1522)sid_list_lsnr_a =(sid_list =(sid_desc =(program = extproc)(sid_name = plsextproc)(oracle_home = /home/oracle/ora9)(sid_desc =(global_dbname = orcla)(oracle_home = /home/oracle/ora9)(sid_name = orcla)sid_list_lsnr_b =(sid_list =(sid_desc =(global_dbname = orclb)(oracle_home = /home/oracle/ora9)(sid_name = orclb) tnsnames.oraorcla =(description =(address_list =(address = (protocol = tcp)(host = )(port = 1521)(connect_data =(service_name = orcla)orclb =(description =(address_list =(address = (protocol = tcp)(host = )(port = 1522)(connect_data =(service_name = orclb)8.在a机上oracle环境变量的oracle_sid指定ta的实例名,例如:oracle_sid=orcla;在b机上oracle环境变量的oracle_sid指定直销的实例名,例如:oracle_sid=orclb;四、hacmp的安装与配置(1)安装hacmp软件的安装与aix基本*作系统选项软件的安装相同,用户可以根据需要选择安装hacmp软件,一般hacmp软件光盘上的内容全选。smit update_all选择光驱默认安装光盘上所有软件(2)配置1、/.rhosts在两台主机上用vi建立 .rhosts文件,内容为:m851_svcm851_stbm851_bootm852_svcm852_stbm852_boot在两台机器上分别改变 .rhosts文件的属性:chmod 644 .rhosts2、/etc/hosts在两台主机上的/etc/hosts文件中用vi编辑,内容为: m851_svc1 m851_stb m851_boot m852_svc 2 m852_stb m852_boot3、配置网络拓扑结构smit hacmp:屏幕显示hacmp菜单:hacmpcluster configurationcluster servicescluster system managementcluster recovery aidsras support- end of screen -选择cluster configuration,cluster configurationcluster topologycluster securitycluster resourcescluster snapshotscluster verificationcluster custom modificationrestore system default configuration from active configurationadvanced performance tuning parameters- end of screen -选择cluster topologycluster topologyconfigure clusterconfigure nodesconfigure networksconfigure adaptersconfigure sitesconfigure global networksconfigure network modulesconfigure topology services and group servicesshow cluster topologysynchronize cluster topology- end of screen -选择configure clusterconfigure cluster add a cluster definitionchange / show cluster definitionremove cluster definition- end of screen -选择add a cluster definition,并进行配置:add a cluster definitionentry fields*note: cluster manager must be restartedin order for changes to be acknowledged.* cluster id 188(输入) #* cluster name test(输入)- end of screen -添加成功后返回到cluster topologycluster topologyconfigure clusterconfigure nodesconfigure networksconfigure adaptersconfigure sitesconfigure global networksconfigure network modulesconfigure topology services and group servicesshow cluster topologysynchronize cluster topology- end of screen -选择configure nodesconfigure nodesadd cluster nodeschange / show cluster node nameremove a cluster node- end of screen -选择add cluster nodes,并进行配置(添加两个node,m851、m852):add cluster nodesentry fieldsnode names m851(输入 node name)- end of screen -add cluster nodesentry fieldsnode names m852(输入 node name)- end of screen -添加成功后,返回到cluster topologycluster topologyconfigure clusterconfigure nodesconfigure networksconfigure adaptersconfigure sitesconfigure global networksconfigure network modulesconfigure topology services and group servicesshow cluster topologysynchronize cluster topology- end of screen -选择configure adaptersconfigure adaptersadapters on ip-based networkadapters on non ip-based network- end of screen -选择adapters on ip-based networkadapters on ip-based network discover current network configurationadd an adapterchange / show an adapterremove an adapter- end of screen -选择add an adapter,配置m851_bootadd an ip-based adapterentry fieldsadapter ip label m851_bootnew adapter ip label +* network type ether +* network name test_eth +* network attribute public +* adapter function boot +adapter ip address 1 adapter hardware address node name m851 +netmask +- end of screen -配置m851_stbadd an ip-based adapterentry fieldsadapter ip label m851_stbnew adapter ip label +* network type ether +* network name test_eth +* network attribute public +* adapter function standby +adapter ip address adapter hardware address node name m851 +netmask +- end of screen -配置m851_svcadd an ip-based adapterentry fieldsadapter ip label m851_svcnew adapter ip label +* network type ether +* network name test_eth +* network attribute public +* adapter function service +adapter ip address adapter hardware address 0x0002556affff node name m851 +netmask +- end of screen -配置m852_bootadd an ip-based adapterentry fieldsadapter ip label m852_bootnew adapter ip label +* network type ether +* network name test_eth +* network attribute public +* adapter function boot +adapter ip address 2 adapter hardware address node name m852 +netmask +- end of screen -配置m852_stbadd an ip-based adapterentry fieldsadapter ip label m852_stbnew adapter ip label +* network type ether +* network name test_eth +* network attribute public +* adapter function standby +adapter ip address adapter hardware address node name m852 +netmask +- end of screen -配置m852_svcadd an ip-based adapterentry fieldsadapter ip label m852_svcnew adapter ip label +* network type ether +* network name test_eth +* network attribute public +* adapter function service +adapter ip address adapter hardware address 0x0002556ad9ff node name m852 +netmask +- end of screen -(4)分别增加tty在两台主机上:smit tty选择:add a ttyadd a ttytype or select values in entry fields.press enter after making all desired changes.top entry fieldstty tty2tty type ttytty interface rs232description asynchronous terminalstatus availablelocation 01-s4-00-00parent adapter sa3 port number 0 +enable login disable +baud rate 9600 +parity none +bits per character 8 +number of stop bits 1 +more.35 在第二台主机上同样方法配置一个tty。(5)配置心跳线ttycluster topologyconfigure clusterconfigure nodesconfigure networksconfigure adaptersconfigure sitesconfigure global networksconfigure network modulesconfigure topology services and group servicesshow cluster topologysynchronize cluster topology- end of screen -选择configure adaptersconfigure adaptersadapters on ip-based networkadapters on non ip-based network- end of screen -选择adapters on non ip-based networkadapters on non ip-based networkadd an adapter change / show an adapter remove an adapter - end of screen -选择add an adapter,并进行配置add an adapterentry fieldsadapter label m851_ttynew adapter label network type rs232 +* network name test_tty +* device name /dev/tty2* node name m851 +- end of screen -add an adapterentry fieldsadapter label m852_ttynew adapter label network type rs232 +* network name test_tty +* device name /dev/tty3* node name m852 +- end of screen -(6)配置资源组:smit hacmp:屏幕显示hacmp菜单:hacmpcluster configurationcluster servicescluster system managementcluster recovery aidsras support- end of screen -选择cluster configuration,cluster configurationcluster topologycluster securitycluster resourcescluster snapshotscluster verificationcluster custom modificationrestore system default configuration from active configurationadvanced performance tuning parameters- end of screen -选择cluster resourcescluster resourcesdefine resource groupsdefine application serversconfigure application monitoringdefine tape resourcesdefine highly available communication linksdiscover current volume group configurationconfigure dynamic node priority policieschange/show resources/attributes for a resource groupcluster eventschange/show run time parameterschange/show cluster lock manager resource allocationshow cluster resourcessynchronize cluster resources- end of screen -(7)配置应用服务器选择define application serversdefine application serversadd an application serverchange / show an application server remove an application server - end of screen -1.选择add an application server,并进行配置add an application serverentry fieldsserver name adata_appstart script /usr/sbin/cluster/appserver/startapp1stop script /usr/sbin/cluster/appserver/stopapp1- end of screen -add an application serverentry fieldsserver name bdata_appstart script /usr/sbin/cluster/appserver/startapp2stop script /usr/sbin/cluster/appserver/stopapp2- end of screen -2.增加资源组选择define resource groupsdefine resource groupsadd a resource groupchange / show a resource groupremove a resource group- end of screen -选择add a resource group,并配置两个资源组add a resource groupentry fieldsresource group name resource1node relationship cascading +participating node names / default node priority m851 m852 +- end of screen -add a resource groupentry fieldsresource group name resource2node relationship cascading +participating node names / default node priority m852 m851 +- end of screen -3.配置资源组选择change/show resources/attributes for a resource group,配置resource1和resource2配置resource1change/show resources/attributes for a resource grouptop entry fieldsresource group name resource1node relationship cascadingparticipating node names / default node priority m851 m852dynami

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

最新文档

评论

0/150

提交评论