| | |
| | |
一、系统配置 1主机名:TKS001 2主机名:TKS002 IP:(hosts文件) IP: TKS001_SERVICE 172.86.0.1 TKS002_SERVICE 172.86.0.2 TKS001_BOOT 172.86.1.1 TKS002_BOOT 172.86.1.2 TKS001_STANDBY 129.9.0.1 TKS002_STANDBY 129.9.0.2 型号:IBM H85(P660) CPU数量:2 内存:1G 内置SCSI硬盘:18.2G*1 *作系统:AIX V4.3.3+Update Pack 集群软件: IBM HACMP V4.4.1 for AIX Enhanced Scalability CRM+Update Pack 编译环境:IBM C and C++ Compilers for AIX V3.6.6 数据备份软件: IBM Tivoli Storage Manager AIX Server V4.2.1
IBM Tivoli Storage Manager Desktop Backup/Archive Clients V4.2.1 IBM Tivoli Data Protection for Oracle V2.2
数据库: Oracle Database 8i Release 3(8.1.7)Enterprise Edition for AIX-Based System( 二、系统安装需求 A: C/C++ Compiler The following commands should point to the /usr/ccs/bin directory, If not ,you should install C/C++ compiler for IBM AIX。 Verify C/C++ compiler : make、ar 、ld、 nm B: 配置ORACLE用户对等 在ORACLE 用户目录下手工建文件.rhosts ,在文件里放入主机名和用户名 格式如下: tks001 oracle (tks001、tks002为两台主机名、oracle为用户) tks002 oracle 如果为了配CLUSTER 建了多个IP对应的主机名如: 172.86.0.1 tks001_service 172.86.1.1 tks001_standby 192.86.1.1 tks001_boot 这样可用别名区分 如: 172.86.0.1 tks001_service tks001 172.86.1.1 tks001_standby tks001 192.86.1.1 tks001_boot tks001 测试用户对等,rcp tks001:/oracle/xxxx tks002:/oracle/xxxx 如果成功则配置完成。 C:IBM CLUSTER(HACMP/ES)配置的校验 % lslpp ?l |grep rsct % lslpp ?l |grep ?i hacmp 最好在两个节点能用 netstat ?ni 看一下它的虚IP 用 lsvg ?o 查磁盘阵列的逻辑卷是否被接管。 D:Ensure that AIO is configured at system restart: # lsdev -Cc aio Verify that the status shown is "Available". If the status shown is "Defined", then change the "STATE to be configured at system restart" to "Available" after running the following command: # smit chaio E:最好有XTERM ,如果没有需要找一仿真软件 三、磁盘划分 1:文件系统 (主机) /oracle 4G oracle系统软件 /oradata 3G archived redo log oracle、文件备份、应用系统的备份, /tmp 1G 2:裸设备(磁盘阵列) 设 备 名 大 小 名 字 注 1 /dev/rsystem01 512M System tablespace 系统表空间 2 /dev/ruser01 256M User tablespace 用户表空间
3 /dev/rtemp01 512M Temp tablespace 临时表空间 4 /dev/rrbs01 1024M Rbs tablespace 回滚表空间
5 /dev/rindx01 512M Index tablespace 索引表空间 6 /dev/rtools01 256M Tools tablespace 工具表空间 7 /dev/roemrep01 256M OEM tablespace OEM表空间
8 /dev/rredolog01 256M Redolog(a) 日志文件 9 /dev/rredolog02 256M Redolog(a) 日志文件 10 /dev/rredolog11 256M Redolog(b) 日志文件 11 /dev/rredolog12 256M Redolog(b) 日志文件 12 /dev/rcontrol01 50M Control file 控制文件
13 /dev/rcontrol02 50M Control file 控制文件(最好在不同的物理硬盘上) 14 /dev/rbak01 256M 备用 15 /dev/rbak02 512M 备用 ….. …… 16 用户数据表空间根据用户应用具体定义 17 注意: 每一个r设备的权限都为 oracle :dba 四、系统的安装 A: Create a Software Owner and Group on all nodes: Create a Unix user and group that will own the Oracle software (user = oracle, group = dba) ? Use the "smit mkuser" command to add a new user. ? Use the "smit mkgroup" command to add a new group. ? This user must be local to the machine. 注意:两个节点建立的用户和组的ID都要一样。 B:Set up the Environment Variables on all nodes: Set the following environment variables in the .profile or .login file of the oracle user, (depending on the default shell for the oracle user), starting the Installer. The values in the examples are assuming that your software mount point is /oracle and you are installing 8.1.7. Parameter Value
---------- -------- ORACLE_HOME /oracle/app/oracle/product/8.1.7 ORACLE_BASE /oracle/app/oracle PATH /oracle/app/oracle/produ /usr/bin/X11:/bin:/usr/bin and whatever else you want to have set follows these three items in the PATH ORACLE_SID Set this to what you will call your database instance. 每一个节点SID不一样(如tkdb1、tkdb2),用dbassist建库时,SID fixpile 可以设为 DISPLAY :0.0 LD_LIBRARY_PATH $ORACLE_HOME/lib:/usr/ccs/lib:/usr/lib: $LD_LIBRARY_PATH NLS_LANG ‘simplified chinese’_china.zhs16gbk Or AMERICAN_AMERICA.ZHS16CGB231280 ORA_NLS33 $ORACLE_HOME/ocommon/nls/admin/data If installing 8.1.6 or higher, ensure that LINK_CNTRL is not set. ENSURE THAT 'CLASS_PATH' AND 'EXTSHM' ARE NOT SET IN THE ENVIORNMENT C: Verify the Environment Before attempting to run the Oracle Universal Installer, verify that you can successfully run the following command: % /usr/bin/X11/xclock D: 由于ORACLE817是两张系统盘,在安装过程中会要求换盘,往往光盘弹不出来,所以 先在ORADATA目录下建两目录DISK1、DISK2,把两张盘用下列命令分别CP到两目录。 # cp -r /cdrom/. /oradata/disk1 注:AIX下MOUNT 光盘:mount ?rv cdrfs /dev/cd0 /cdrom E:Start the Oracle Universal Installer and install the Oracle software: % cd /oradata/disk1 % ./runInstaller will start the Oracle Universal Installer F: 当选择ORACLE安装节点时,执行安装的节点会被自动选择,你需要从列表中选中你要 G:下面的安装步骤和单机的安装一样。 H:当软件拷贝完成后,在系统自动启动NET8配置和建库以前,ORACLE 会自动把安装在 节点上的相应软件拷贝到第二个节点,这会花很长的时间,要耐心等待。 I:开始进行NET8配置时,系统会报错: Error loading native library: libnjni8.so.
java.lang.UnsatisfiedLinkError: jniGetOracleHome at oracle.net.common.NetGetEnv.getOracleHome(NetGetEnv.java) at oracle.net.asst.container.NetUtils.getImageDirectory(NetUtils.java) at oracle.net.asst.container.NetApplication.init(NetApplication.java) at oracle.sysman.emSDK.client.appContainer.WebApplicatio 不要着急,可先STOP,往下建库,等建库脚本生成完以后,再用NETASST手工来配 。在运行NETASST 前 ,用下面命令连接 ORACLE EXTENSION KERNEL FOR AIX。 Log on as "root" and perform the following: 1) a. %cd /etc b. Confirm the existance of the /etc/pw-syscall file: %ls -l pw-syscall If this exists, continue with step 2. If not: %cp $ORACLE_HOME/lib/pw-syscall.exp /etc/pw-syscall 注意:ORACLE第一张盘上有loadext 命令 2) %/etc/loadext -l /etc/pw-syscall 3) 重新运行NETASST 4) 整个系统重新启动后,listener可能会启不来,可重复上面的*作 J:建库 注意:建库最好是生成脚本,手工建库。 运行脚本时,会报下面错误: ORA-01501:Create database failed ORA-29704: error occurred in cluster group service operation 用如下方法可解决: 1、Check if the Oracle software owner is able to create and write files in the following directory: $ORACLE_HOME/rdbms/.gs_log/ You can check it with the following commands:
$ cd $ORACLE_HOME/rdbms $ ls -ld .gs_log The output of the last command should be something like: drwxr-sr-x 1 oracle dba 512 May 21 16:23 .gs_log If the directory is not there, test if you can create it manually: $ mkdir .gs_log If you cannot create it, you may lack write permission in the current directory. This is because the Cluster Group Service tries to create and write in the following directory: instance_NNNN where NNNN is the instance number. This directory is needed for internal bookkeeping when running Oracle ParallelServer. Oracle stores Unix Process IDs and socket files there. 2、In order to configure High Availability Group Services (HAGS), you need to connected as root. Do the following on all nodes that form the cluster: 1). Create the "hagsuser" group and place "oracle" into the "hagsuser" group: Verify the group does not exists:
# grep hagsuser /etc/group If this returns nothing do the following:
# smitty groups Select "Add a Group" and fill in the following:
You can take the defaults for the other settings. Also note that after the group is created you will have to log out and log back i as "oracle" to be sure "oracle" is part of the "hagsuser" group. 2). Change the permissions on the "cldomain" executable: # chmod a+x /usr/sbin/cluster/utilities/cldomain 3). Change the group to "hagsuser" for the "svcsdsocket." socket: # chgrp hagsuser /var/ha/soc/grpsvcsdsocket.`/usr/sbin/cl cldomain`
4). Change the group permissions for the "grpsvcsdsocket." socket: # chmod g+w /var/ha/soc/grpsvcsdsocket.`/usr/sbin/cluster/utilities/ cldomain` 5)、 重新运行脚本,建库
| |
|
|
| |
| |
|