广东电视台项目
SunCluster for OracleRAC &Oracle9i
安装调试手册
广州分公司
广州市天河北路183号大都会广场2809室
2006年9月
版本说明
发布日期 说明
2006-9-20
V1.0(20060920)
包含Solaris 9的安装、SunCluster3.1的安装、Veritas Volume Maneger4.1的安装、RAC配置
作者 单前版本
项利 A/1
版本说明.................................................................................................................................................1 安装准备.................................................................................................................................................3
1.系统的安装配置:......................................................................................................................3 2.软件要求:...............................................................................................................................3 3.硬件要求:...............................................................................................................................3 4、配置阵列3310:......................................................................................................................4 第一部分 安装Solaris 8操作系统、相应的补丁及修改相关配置文件............................................4
第一节 SUN8操作系统的安装..................................................................................................4 第二节、安装操作系统的补丁.....................................................................................................4 第三节、安装3310的驱动和补丁...............................................................................................5 第四节 配置/etc/hosts文件,/.rhosts文件....................................................................................8 第二部分 安装Sun Cluster 3.1及Sun Cluster 3.1的补丁...................................................................8
第一节 安装Sun Cluster 3.1........................................................................................................8 第二节 安装Sun Cluster 3.1的补丁.........................................................................................17 第三节Sun Cluster 3.1安装后的配置.........................................................................................23 第四节、安装后的集群状态校验...............................................................................................26 第三部分 安装Veritas VxVM 4.1.......................................................................................................26 第四部分 在DBSERVER1和DBSERVER2上建立dba组和oracle用户,oracle用户的主组是dba...............................................................................................................................................................39 第五部分 安装 Sun Cluster 3.1 for Oracle RAC的支持包、安装Oracle 9i RAC的分布式文件锁的包..........................................................................................................................................................39
第一节 安装Sun Cluster 3.1 for Oracle RAC的支持包..............................................................39 第二节、安装Oracle 9i RAC的分布式文件锁的包...................................................................42 第六部分 Oracle9i数据库安装前的准备...........................................................................................51
第一节 修改Solaris关于安装oracle的内核参数........................................................................51 第二节、准备VxVM Disk...........................................................................................................52 第三节、创建Verista Volume Manager 共享卷组和共享逻辑卷............................................55 第四节、建立Oracle用户的环境文件........................................................................................58 第五节、设置oracle用户的命令环境.......................................................................................59 第七部分 Oracle 9i的安装配置..........................................................................................................60
第一节 oracle 数据库安装.........................................................................................................60 第二节 oracle 数据库监听配置.................................................................................................67 第三节 oracle建库.......................................................................................................................83
安装准备
1.系统的安装配置:
0 / 10240 1 swap 10240 3 /oracle 30720 4 /opt 10240 5
6 /globaldevices 512 7 空 0
.
注意事项: 在设置主网卡为ce0,即主机自带的.
设置Configure Kerbers Security:No V内置控制器C0开始,E内置控制器C1开始
2.软件要求:
Solaris 8
Solaris 8 最新补丁
Sun Cluster 3.1 update4、相关补丁
Veritas VxVM 4.1(需要VxVM的License和Cluster Volume Manager(CVM)的License ) Oracle 9i Enterprise Edition Sun 3310阵列驱动、补丁
3.硬件要求:
Sun 440 2台 Sun 四口网卡 2块 Sun SCSI卡X6758A 2块 Sun 3310阵列 1台
4、配置阵列3310:
3310 9块硬盘做成8(raid5)+1(hotspare)模式
第一部分 安装Solaris 8操作系统、相应的补丁及修改相关配置文件
第一节 SUN8操作系统的安装
以Sun 440 72G硬盘为例,分区如下: # df -k
Filesystem kbytes used avail capacity Mounted on /dev/dsk/c1t0d0s0 10327372 1235063 036 13% / /proc 0 0 0 0% /proc fd 0 0 0 0% /dev/fd mnttab 0 0 0 0% /etc/mnttab swap 11817304 16 11817288 1% /var/run swap 11817688 400 11817288 1% /tmp /dev/dsk/c1t0d0s4 10327372 202679 10021420 2% /opt
/dev/dsk/c1t0d0s6 498039 9 448227 1% /globaldevices /dev/dsk/c1t0d0s3 30983686 9 30673841 1% /oracle
第二节、安装操作系统的补丁
建议:采用SUN最新的补丁盘
# cd /cdrom/eis-cd/sun/install
# ./setup-standard.sh (y/y/y/y/y/E/n/n)
第5个y是SAN需要,SUN为存储局域网,如果不需要SAN架构则可以不选。E表示可以在PC和串口中使用Ctrl+break键进入OK状态
ACT为n,表示不用连接到phone收集信息远程服务。这要买服务。 # . /.profile 如果上部同意terms会自动运行,这里手动 # cd /cdrom/eis-cd/sun/patch/8 # unpack_patches # cd /tmp/8 # eject cdrom
# ./install_all_patches
#sync
#sync #sync #reboot
第三节、安装3310的驱动和补丁
# ls
112697-02 SUNWqus SUNWqusu SUNWqusux SUNWqusx
112697-02位于/cdrom/eis-cd/sun/progs/SUNWqus/8/112697-02.zip SUNW*位于/cdrom/eis-cd/sun/progs/SUNWqus/8/SUNWqus_8_all.tar.gz # pkgadd -d . all
Processing package instance QLogic Ultra3 Scsi, (Root) (sparc) 11.8.0,REV=2001.11.29.10.46 Copyright 2001 Sun Microsystems, Inc. All rights reserved. Using > as the package base directory. ## Processing package information. ## Processing system information. 2 package pathnames are already properly installed. ## Verifying package dependencies. ## Verifying disk space requirements. ## Checking for conflicts with packages already installed. ## Checking for setuid/setgid programs. This package contains scripts which will be executed with super-user permission during the process of installing this package. Do you want to continue with the installation of Installing QLogic Ultra3 Scsi, (Root) as ## Installing part 1 of 1. /kernel/drv/qus [ verifying class ## Executing postinstall script. Reboot client to install driver. Installation of Processing package instance QLogic Ultra3 Scsi, (Usr) (sparc) 11.8.0,REV=2001.11.29.10.46 Copyright 2001 Sun Microsystems, Inc. All rights reserved. Using > as the package base directory. ## Processing package information. ## Processing system information. 3 package pathnames are already properly installed. ## Verifying package dependencies. ## Verifying disk space requirements. ## Checking for conflicts with packages already installed. ## Checking for setuid/setgid programs. Installing QLogic Ultra3 Scsi, (Usr) as ## Installing part 1 of 1. /usr/lib/adb/qus_isp [ verifying class Installation of Processing package instance QLogic Ultra3 Scsi, (Usr) (-bit) (sparc) 11.8.0,REV=2001.11.29.10.46 Copyright 2001 Sun Microsystems, Inc. All rights reserved. Using > as the package base directory. ## Processing package information. ## Processing system information. 4 package pathnames are already properly installed. ## Verifying package dependencies. WARNING: The Do you want to continue with the installation of ## Checking for conflicts with packages already installed. ## Checking for setuid/setgid programs. Installing QLogic Ultra3 Scsi, (Usr) (-bit) as ## Installing part 1 of 1. /usr/lib/adb/sparcv9/qus_isp [ verifying class Installation of Processing package instance QLogic Ultra3 Scsi, (Root) (-bit) (sparc) 11.8.0,REV=2001.11.29.10.46 Copyright 2001 Sun Microsystems, Inc. All rights reserved. Using > as the package base directory. ## Processing package information. ## Processing system information. 3 package pathnames are already properly installed. ## Verifying package dependencies. ## Verifying disk space requirements. ## Checking for conflicts with packages already installed. ## Checking for setuid/setgid programs. Installing QLogic Ultra3 Scsi, (Root) (-bit) as ## Installing part 1 of 1. /kernel/drv/sparcv9/qus [ verifying class Installation of # patchadd 112697-02 Checking installed patches... Verifying sufficient filesystem capacity (dry run method)... Installing patch packages... Patch number 112697-02 has been successfully installed. See /var/sadm/patch/112697-02/log for details Patch packages installed: SUNWqus SUNWqusu SUNWqusux SUNWqusx 在文件/etc/kernel/sd.conf文件中加入如下几行: name=\"sd\" class=\"scsi\" target=5 lun=0; name=\"sd\" class=\"scsi\" target=5 lun=1; name=\"sd\" class=\"scsi\" target=5 lun=2; name=\"sd\" class=\"scsi\" target=5 lun=3; name=\"sd\" class=\"scsi\" target=5 lun=4; name=\"sd\" class=\"scsi\" target=5 lun=5; name=\"sd\" class=\"scsi\" target=5 lun=6; name=\"sd\" class=\"scsi\" target=5 lun=7; 3310阵列要求加入到lun等于7,3310出厂target=5,可以更改。 # reboot 重起后,使用format命令检查磁盘阵列的配置是否正确。 # format 查看是否找到新硬盘。 第四节 配置/etc/hosts文件,/.rhosts文件 DBSERVER1: root@DBSERVER1 # cat /etc/hosts # # Internet host table # 127.0.0.1 localhost 192.168.1.17 DBSERVER1 loghost 192.168.1.19 DBSERVER2 DBSERVER2: root@DBSERVER2 # cat /etc/hosts # # Internet host table # 127.0.0.1 localhost 192.168.1.19 DBSERVER2 loghost 192.168.1.17 DBSERVER1 在DBSERVER1,DBSERVER2中/etc/system文件中加入以下内容: set ce:ce_taskq_disable=1 还有建立/.rhosts文件内容为+ 第二部分 安装Sun Cluster 3.1及Sun Cluster 3.1的补丁 第一节 安装Sun Cluster 3.1 建立主节点: # cd /opt/zqf/suncluster_3_1/SunCluster_3.1/Sol_8/Tools 这个目录就是Sun Cluster3.1光盘 # ./scinstall *** Main Menu *** Please select from one of the following (*) options: * 1) Install a cluster or cluster node 2) Configure a cluster to be JumpStarted from this install server 3) Add support for new data services to this cluster node 4) Upgrade this cluster node 5) Print release information for this cluster node * ?) Help with menu options * q) Quit Option: 1 *** Install Menu *** Please select from any one of the following options: 1) Install all nodes of a new cluster 2) Install just this machine as the first node of a new cluster 3) Add this machine as a node in an existing cluster ?) Help with menu options q) Return to the Main Menu Option: 1 *** Installing all Nodes of a New Cluster *** This option is used to install and configure a new cluster. If either remote shell (see rsh(1)) or secure shell (see ssh(1)) root access is enabled to all of the new member nodes from this node, the Sun Cluster framework software will be installed on each node. Otherwise, the Sun Cluster software must already be pre-installed on each node with the \"remote configuration\" option enabled. The Java Enterprise System installer can be used to install the Sun Cluster framework software with the \"remote configuration\" option enabled. Since the installation wizard does not yet include support for cluster configuration, you must still use scinstall to complete the configuration process. Press Control-d at any time to return to the Main Menu. Do you want to continue (yes/no) [yes]? . >>> Type of Installation <<< There are two options for proceeding with cluster installation. For most clusters, a Typical installation is recommended. However, you might need to select the Custom option if not all of the Typical defaults can be applied to your cluster. For more information about the differences between the Typical and Custom installation methods, select the Help option from the menu. Please select from one of the following options: 1) Typical 2) Custom ?) Help q) Return to the Main Menu Option [1]: 2 >>> Cluster Name <<< Each cluster has a name assigned to it. The name can be made up of any characters other than whitespace. Each cluster name should be unique within the namespace of your enterprise. What is the name of the cluster you want to establish? suncluster >>> Cluster Nodes <<< This Sun Cluster release supports a total of up to 16 nodes. Please list the names of the other nodes planned for the initial cluster configuration. List one node name per line. When finished, type Control-D: Node name (Control-D to finish): DBSERVER1 Node name (Control-D to finish): DBSERVER2 Node name (Control-D to finish): ^D This is the complete list of nodes: DBSERVER1 DBSERVER2 Is it correct (yes/no) [yes]? Attempting to contact \"DBSERVER2\" ... done Searching for a remote install method ... done The Sun Cluster framework software is already installed on each of the new nodes of this cluster. And, it is able to complete the configuration process without remote shell access. Press Enter to continue: >>> Authenticating Requests to Add Nodes <<< Once the first node establishes itself as a single node cluster, other nodes attempting to add themselves to the cluster configuration must be found on the list of nodes you just provided. You can modify this list using scconf(1M) or other tools once the cluster has been established. By default, nodes are not securely authenticated as they attempt to add themselves to the cluster configuration. This is generally considered adequate, since nodes which are not physically connected to the private cluster interconnect will never be able to actually join the cluster. However, DES authentication is available. If DES authentication is selected, you must configure all necessary encryption keys before any node will be allowed to join the cluster (see keyserv(1M), publickey(4)). Do you need to use DES authentication (yes/no) [no]? >>> Network Address for the Cluster Transport <<< The private cluster transport uses a default network address of 172.16.0.0. But, if this network address is already in use elsewhere within your enterprise, you may need to select another address from the range of recommended private addresses (see RFC 1918 for details). If you do select another network address, bear in mind that the Sun Cluster software requires that the rightmost two octets always be zero. The default netmask is 255.255.0.0. You can select another netmask, as long as it minimally masks all bits given in the network address. Is it okay to accept the default network address (yes/no) [yes]? Is it okay to accept the default netmask (yes/no) [yes]? >>> Point-to-Point Cables <<< The two nodes of a two-node cluster may use a directly-connected interconnect. That is, no cluster transport junctions are configured. However, when there are greater than two nodes, this interactive form of scinstall assumes that there will be exactly two cluster transport junctions. Does this two-node cluster use transport junctions (yes/no) [yes]? No >>> Cluster Transport Adapters and Cables <<< You must configure at least two cluster transport adapters for each node in the cluster. These are the adapters which attach to the private cluster interconnect. Select the first cluster transport adapter for \"DBSERVER1\": 1) ce1 2) ce2 3) ce3 4) ce4 5) ce5 6) Other Option: 1 Adapter \"ce1\" is an Ethernet adapter. Searching for any unexpected network traffic on \"ce1\" ... done Verification completed. No traffic was detected over a 10 second sample period. The \"dlpi\" transport type will be set for this cluster. Name of adapter on \"DBSERVER2\" to which \"ce1\" is connected? ce1 Select the second cluster transport adapter for \"DBSERVER1\": 1) ce1 2) ce2 3) ce3 4) ce4 5) ce5 6) Other Option: 2 Adapter \"ce2\" is an Ethernet adapter. Searching for any unexpected network traffic on \"ce2\" ... done Verification completed. No traffic was detected over a 10 second sample period. Name of adapter on \"DBSERVER2\" to which \"ce2\" is connected? ce2 >>> Quorum Configuration <<< Every two-node cluster requires at least one quorum device. By default, scinstall will select and configure a shared SCSI quorum disk device for you. This screen allows you to disable the automatic selection and configuration of a quorum device. The only time that you must disable this feature is when ANY of the shared storage in your cluster is not qualified for use as a Sun Cluster quorum device. If your storage was purchased with your cluster, it is qualified. Otherwise, check with your storage vendor to determine whether your storage device is supported as Sun Cluster quorum device. If you disable automatic quorum device selection now, or if you intend to use a quorum device that is not a shared SCSI disk, you must instead use scsetup(1M) to manually configure quorum once both nodes have joined the cluster for the first time. Do you want to disable automatic quorum device selection (yes/no) [no]? [H[J[H[J >>> Global Devices File System <<< Each node in the cluster must have a local file system mounted on /global/.devices/node@ You must supply the name of either an already-mounted file system or raw disk partition which scinstall can use to create the global devices file system. This file system or partition should be at least 512 MB in size. If an already-mounted file system is used, the file system must be empty. If a raw disk partition is used, a new file system will be created for you. The default is to use /globaldevices. For node \"DBSERVER1\ Is it okay to use this default (yes/no) [yes]? Testing for \"/globaldevices\" on \"DBSERVER1\" ... done For node \"DBSERVER2\ Is it okay to use this default (yes/no) [yes]? Testing for \"/globaldevices\" on \"DBSERVER2\" ... done Is it okay to begin the installation (yes/no) [yes]? During the installation process, sccheck(1M) is run on each of the new cluster nodes. If sccheck(1M) detects problems, you can either interrupt the installation process or check the log files after installation has completed. Interrupt the installation for sccheck errors (yes/no) [no]? yes Installation and Configuration Log file - /var/cluster/logs/install/scinstall.log.903 Started sccheck on \"DBSERVER1\". Started sccheck on \"DBSERVER2\". Running sccheck ... done All sccheck tests passed. ** Installing SunCluster 3.1 framework ** SUNWscr.....done SUNWscu.....done SUNWscnm....done SUNWscdev...done SUNWscgds...done SUNWscman...done SUNWscsal...done SUNWscsam...done SUNWscvm....done SUNWmdm.....done SUNWscva....done SUNWscvr....done SUNWscvw....done SUNWfsc.....done SUNWfscvw...done SUNWjsc.....done SUNWjscman..done SUNWjscvw...done SUNWkscvw...done SUNWcsc.....done SUNWcscvw...done SUNWhscvw...done Hit ENTER to continue: >>> Automatic Reboot <<< Once scinstall has successfully installed and initialized the Sun Cluster software for this machine, it will be necessary to reboot. After the reboot, this machine will be established as the first node in the new cluster. Do you want scinstall to reboot for you (yes/no) [yes]?yes You will need to manually reboot this node in \"cluster mode\" after scinstall successfully completes. Hit ENTER to continue: >>> Confirmation <<< Your responses indicate the following options to scinstall: scinstall -ik \\ -C suncluster \\ -F \\ -T node=DBSERVER1,node=DBSERVER2,authtype=sys \\ -A trtype=dlpi,name=ce2 -A trtype=dlpi,name=ce3 \\ -B trtype=dlpi,name=ce2 -A trtype=dlpi,name=ce3 \\ Are these the options you want to use (yes/no) [yes]? Do you want to continue with the install (yes/no) [yes]? Checking device to use for global devices file system ... done Initializing cluster name to \"suncluster\" ... done Initializing authentication options ... done Initializing configuration for adapter \"ce2\" ... done Initializing configuration for adapter \"ce3\" ... done Initializing configuration for cable ... done Initializing configuration for cable ... done Setting the node ID for \"DBSERVER1\" ... done (id=1) Setting the major number for the \"did\" driver ... done \"did\" driver major number set to 300 Checking for global devices global file system ... done Updating vfstab ... done Verifying that NTP is configured ... done Installing a default NTP configuration ... done Please complete the NTP configuration after scinstall has finished. Verifying that \"cluster\" is set for \"hosts\" in nsswitch.conf ... done Adding the \"cluster\" switch to \"hosts\" in nsswitch.conf ... done Verifying that \"cluster\" is set for \"netmasks\" in nsswitch.conf ... done Adding the \"cluster\" switch to \"netmasks\" in nsswitch.conf ... done Verifying that power management is NOT configured ... done Unconfiguring power management ... done /etc/power.conf has been renamed to /etc/power.conf.0804031108 Power management is incompatible with the HA goals of the cluster. Please do not attempt to re-configure power management. Ensure that the EEPROM parameter \"local-mac-address?\" is set to \"true\" ... done The \"local-mac-address?\" parameter setting has been changed to \"true\". Ensure network routing is disabled ... done Network routing has been disabled on this node by creating /etc/notrouter. Having a cluster node act as a router is not supported by Sun Cluster. Please do not re-enable network routing. Hit ENTER to continue: *** Main Menu *** Please select from one of the following (*) options: 1) Establish a new cluster using this machine as the first node 2) Add this machine as a node in an established cluster 3) Configure a cluster to be JumpStarted from this install server * 4) Add support for new data services to this cluster node * 5) Print release information for this cluster node * ?) Help with menu options * q) Quit Option: q Log file - /var/cluster/logs/install/scinstall.log.4 第二节 安装Sun Cluster 3.1的补丁 cd /oracle/EIS/SunCluster3.1Patch/8 sun cluster 3.1新版本存在于EIS-CD中/cdrom/SUN/PATCH/SUNCLUST/3.x/3.1/8解压缩即可 root@DBSERVER1 # unpack-patches Are you ready to unpack patches into /tmp/8? [y/n]: y Cleaning out /tmp/8... Unpacking..... Patch 111488-08 Patch 113800-12 Patch 114492-02 Patch 1150-01 Patch 115058-08 Patch 115062-11 Patch 115807-01 Patch 115952-06 Patch 1161-04 Patch 117950-24 Patch 118626-08 You should run: cd /tmp/8; ./install_patches ***************************************** * Special Information for these patches * ***************************************** Patch 115952 (sccheck) has been excluded due to its size. root@DBSERVER1 # cd /tmp/8 root@DBSERVER1 # ls 111488-08 1150-01 115807-01 117950-24 install_patches 113800-12 115058-08 115952-06 118626-08 patch_order 114492-02 115062-11 1161-04 README root@DBSERVER1 # ./intstall_patches Patch cluster install script for Patches for SC 3.1 under Solaris 8 *WARNING* SYSTEMS WITH LIMITED DISK SPACE SHOULD *NOT* INSTALL PATCHES: With or without using the save option, the patch installation process will still require some amount of disk space for installation and administrative tasks in the /, /usr, /var, or /opt partitions where patches are typically installed. The exact amount of space will depend on the machine's architecture, software packages already installed, and the difference in the patched objects size. To be safe, it is not recommended that a patch cluster be installed on a system with less than 4 MBytes of available space in each of these partitions. Running out of disk space during installation may result in only partially loaded patches. Check and be sure adequate disk space is available before continuing. Are you ready to continue with install? [y/n]: y Determining if sufficient save space exists... Sufficient save space exists, continuing... Installing patches located in /tmp/8 Using patch_order file for patch installation sequence Skipping 111488-08... Skipping 113800-12... Installing 114492-02... Installation of 114492-02 failed. Return code 8 - Attempting to patch a package that is not installed Skipping 1150-01... Installing 115058-08... Installation of 115058-08 failed. Return code 8 - Attempting to patch a package that is not installed Installing 115807-01... Installation of 115807-01 failed. Return code 8 - Attempting to patch a package that is not installed Installing 1161-04... Installation of 1161-04 failed. Return code 8 - Attempting to patch a package that is not installed Installing 117950-24... Installing 118626-08... Installing 115062-11... Installation of 115062-11 failed. Return code 8 - Attempting to patch a package that is not installed Installing 115952-06... The following patches were not able to be installed: 114492-02 115058-08 115807-01 1161-04 115062-11 For more installation messages refer to the installation logfile: /var/sadm/install_data/Patches_for_SC_3.1_under_Solaris_8_log Use '/usr/bin/showrev -p' to verify installed patch-ids. Refer to individual patch README files for more patch detail. Rebooting the system is usually necessary after installation. 等待主节点启动后,登录到第二个节点进行安装: # cd /oracle/EIS/suncluster_3_1/SunCluster_3.1/Sol_8/Tools # ./scinstall *** Main Menu *** Please select from one of the following (*) options: * 1) Establish a new cluster using this machine as the first node * 2) Add this machine as a node in an established cluster 3) Configure a cluster to be JumpStarted from this install server 4) Add support for new data services to this cluster node 5) Print release information for this cluster node * ?) Help with menu options * q) Quit Option:2 *** Adding a Node to an Established Cluster *** This option is used to add this machine as a node in an already established cluster. If this is an initial cluster install, there may only be a single node which has established itself in the new cluster. Once the cluster framework software is installed, you will be asked to provide both the name of the cluster and the name of one of the nodes already in the cluster. Then, sccheck(1M) is run to test this machine for basic Sun Cluster pre-configuration requirements. After sccheck(1M) passes, you may be asked to provide certain cluster transport configuration information. Press Ctrl-d at any time to return to the Main Menu. Do you want to continue (yes/no) [yes]? >>> Software Package Installation <<< Installation of the Sun Cluster framework software packages will take a few minutes to complete. Is it okay to continue (yes/no) [yes]? ** Installing SunCluster 3.1 framework ** SUNWscr.....done SUNWscu.....done SUNWscnm....done SUNWscdev...done SUNWscgds...done SUNWscman...done SUNWscsal...done SUNWscsam...done SUNWscvm....done SUNWmdm.....done SUNWscva....done SUNWscvr....done SUNWscvw....done SUNWfsc.....done SUNWfscvw...done SUNWjsc.....done SUNWjscman..done SUNWjscvw...done SUNWkscvw...done SUNWcsc.....done SUNWcscvw...done SUNWhscvw...done Hit ENTER to continue: >>> Autodiscovery of Cluster Transport <<< If you are using ethernet adapters as your cluster transport adapters, autodiscovery is the best method for configuring the cluster transport. Do you want to use autodiscovery (yes/no) [yes]? Probing ....... The following connections were discovered: DBSERVER1:ce2 DBSERVER2:ce2 DBSERVER1:ce3 DBSERVER2:ce3 Is it okay to add these connections to the configuration (yes/no) [yes]? >>> Global Devices File System <<< Each node in the cluster must have a local file system mounted on /global/.devices/node@ already-mounted file system or raw disk partition at this time. This file system or partition should be at least 512 MB in size. If an already-mounted file system is used, the file system must be empty. If a raw disk partition is used, a new file system will be created for you. The default is to use /globaldevices. Is it okay to use this default (yes/no) [yes]? >>> Automatic Reboot <<< Once scinstall has successfully installed and initialized the Sun Cluster software for this machine, it will be necessary to reboot. The reboot will cause this machine to join the cluster for the first time. Do you want scinstall to reboot for you (yes/no) [yes]? >>> Confirmation <<< Your responses indicate the following options to scinstall: scinstall -ik \\ -C suncluster \\ -N DBSERVER1 \\ -A trtype=dlpi,name=ce2 -A trtype=dlpi,name=ce3 \\ -m endpoint=:ce2 -m endpoint=:ce3 Are these the options you want to use (yes/no) [yes]? Do you want to continue with the install (yes/no) [yes]? Checking device to use for global devices file system ... done Adding node \"DBSERVER2\" to the cluster configuration ... done Adding adapter \"ce2\" to the cluster configuration ... done Adding adapter \"ce3\" to the cluster configuration ... done Adding cable to the cluster configuration ... done Adding cable to the cluster configuration ... done Copying the config from \"DBSERVER1\" ... done Setting the node ID for \"DBSERVER2\" ... done (id=2) Setting the major number for the \"did\" driver ... Obtaining the major number for the \"did\" driver from \"DBSERVER1\" ... done \"did\" driver major number set to 300 Checking for global devices global file system ... done Updating vfstab ... done Verifying that NTP is configured ... done Installing a default NTP configuration ... done Please complete the NTP configuration after scinstall has finished. Verifying that \"cluster\" is set for \"hosts\" in nsswitch.conf ... done Adding the \"cluster\" switch to \"hosts\" in nsswitch.conf ... done Verifying that \"cluster\" is set for \"netmasks\" in nsswitch.conf ... done Adding the \"cluster\" switch to \"netmasks\" in nsswitch.conf ... done Verifying that power management is NOT configured ... done Unconfiguring power management ... done /etc/power.conf has been renamed to /etc/power.conf.080403112852 Power management is incompatible with the HA goals of the cluster. Please do not attempt to re-configure power management. Ensure that the EEPROM parameter \"local-mac-address?\" is set to \"true\" ... done The \"local-mac-address?\" parameter setting has been changed to \"true\". Ensure network routing is disabled ... done Network routing has been disabled on this node by creating /etc/notrouter. Having a cluster node act as a router is not supported by Sun Cluster. Please do not re-enable network routing. Hit ENTER to continue: *** Main Menu *** Please select from one of the following (*) options: 1) Establish a new cluster using this machine as the first node 2) Add this machine as a node in an established cluster 3) Configure a cluster to be JumpStarted from this install server * 4) Add support for new data services to this cluster node * 5) Print release information for this cluster node * ?) Help with menu options * q) Quit Option: q Log file - /var/cluster/logs/install/scinstall.log.457 在DBSERVER2上安装SunClusster 3.1最新补丁。安装方式同DBSERVER1 第三节Sun Cluster 3.1安装后的配置 清除安装模式和加Quorum盘,配置NTP协议 查看Sun Cluster中的DID设备名: root@DBSERVER1 # scdidadm -L 1 DBSERVER1:/dev/rdsk/c1t0d0 /dev/did/rdsk/d1 2 DBSERVER1:/dev/rdsk/c1t1d0 /dev/did/rdsk/d2 3 DBSERVER1:/dev/rdsk/c1t2d0 /dev/did/rdsk/d3 3 DBSERVER1:/dev/rdsk/c1t3d0 /dev/did/rdsk/d4 4 DBSERVER1:/dev/rdsk/c3t0d0 /dev/did/rdsk/d5 4 DBSERVER2:/dev/rdsk/c3t0d0 /dev/did/rdsk/d5 3 DBSERVER2:/dev/rdsk/c1t0d0 /dev/did/rdsk/d6 3 DBSERVER2:/dev/rdsk/c1t1d0 /dev/did/rdsk/d7 3 DBSERVER2:/dev/rdsk/c1t2d0 /dev/did/rdsk/d8 3 DBSERVER2:/dev/rdsk/c1t3d0 /dev/did/rdsk/d9 选择d4作为Quorum盘。 DBSERVER1# scsetup >>> Initial Cluster Setup <<< This program has detected that the cluster \"installmode\" attribute is still enabled. As such, certain initial cluster setup steps will be performed at this time. This includes adding any necessary quorum devices, then resetting both the quorum vote counts and the \"installmode\" property. Please do not proceed if any additional nodes have yet to join the cluster. Is it okay to continue (yes/no) [yes] Do you want to add any quorum disks (yes/no) [yes]? Dual-ported SCSI-2 disks may be used as quorum devices in two-node clusters. However, clusters with more than two nodes require that SCSI-3 PGR disks be used for all disks with more than two node-to-disk paths. You can use a disk containing user data or one that is a member of a device group as a quorum device. Each quorum disk must be connected to at least two nodes. Please refer to the Sun Cluster documentation for more information on supported quorum device topologies. Which global device do you want to use (d scconf -a -q globaldev=d5 命令行的操作方法 Command completed successfully. Hit ENTER to continue: Do you want to add another quorum disk (yes/no)? no Once the \"installmode\" property has been reset, this program will skip \"Initial Cluster Setup\" each time it is run again in the future. However, quorum devices can always be added to the cluster using the regular menu options. Resetting this property fully activates quorum settings and is necessary for the normal and safe operation of the cluster. Is it okay to reset \"installmode\" (yes/no) [yes]? scconf -c -q reset 命令行的操作方法 scconf -a -T node=. 命令行的操作方法 Cluster initialization is complete. Type ENTER to proceed to the main menu: *** Main Menu *** Please select from one of the following options: 1) Quorum 2) Resource groups 3) Cluster interconnect 4) Device groups and volumes 5) Private hostnames 6) New nodes 7) Other cluster properties a) Help with menu options q) Quit Option:q root@DBSERVER1 # 配置NTP协议 root@DBSERVER1 # cd /etc/inet root@DBSERVER1 # ls datemsk.ndpd mipagent.conf.fa-sample ntp.server hosts mipagent.conf.ha-sample protocols ike netmasks secret inetd.conf networks services ipnodes ntp.client slp.conf.example ipsecinit.sample ntp.cluster sock2path mipagent.conf-sample ntp.conf.cluster root@DBSERVER1 # vi ntp.conf.cluster 对于两节点集群,只保留以下这两行 peer clusternode1-priv prefer peer clusternode2-priv root@DBSERVER2 # cd /etc/inet root@DBSERVER2 # ls datemsk.ndpd mipagent.conf.fa-sample ntp.server hosts mipagent.conf.ha-sample protocols ike netmasks secret inetd.conf networks services ipnodes ntp.client slp.conf.example ipsecinit.sample ntp.cluster sock2path mipagent.conf-sample ntp.conf.cluster root@DBSERVER2 # vi ntp.conf.cluster 对于两节点集群,只保留以下这两行 peer clusternode1-priv prefer peer clusternode2-priv 在以上步骤中会在重启时报很多错误,都不用理它。照常进行到此步骤之后多reboot几次就好了。 第四节、安装后的集群状态校验 集群状态校验 # scdidadm -L # scstat –q cluster3.1 # scconf -p 重起机器 root@DBSERVER1 # scshutdown -y -g 30 在DBSERVER1: OK boot DBSERVER1启动后,在DBSERVER2 OK boot 集群状态测试 可以在本机浏览器中输入:http://DBSERVER1:3000 第三部分 安装Veritas VxVM 4.1 两个节点都要安装VxVM 进入VxVM安装目录 cd /cdrom/cdrom0/volume_manager root@DBSERVER1 #./installvm VERITAS VOLUME MANAGER 4.1 INSTALLATION PROGRAM Copyright (c) 2005 VERITAS Software Corporation. All rights reserved. VERITAS, the VERITAS Logo and all other VERITAS product names and slogans are trademarks or registered trademarks of VERITAS Software Corporation. VERITAS and the VERITAS Logo Reg. U.S. Pat. & Tm. Off. Other product names and/or slogans mentioned herein may be trademarks or registered trademarks of their respective companies. Enter the system names separated by spaces on which to install VxVM:DBSERVER1 DBSERVER2 Checking system communication: Checking OS version on DBSERVER1 ........................................................... SunOS 5.8 Checking VRTSvxvm package .............................................................. not installed Verifying communication with DBSERVER2 ............................................... ping successful Attempting rsh with DBSERVER2 ......................................................... rsh successful Attempting rcp with DBSERVER2 ......................................................... rcp successful Checking OS version on DBSERVER2 ........................................................... SunOS 5.8 Checking VRTSvxvm package .............................................................. not installed Creating log directory on DBSERVER2 ............................................................. Done Logs for installvm are being created in /var/tmp/installvm913135345. Using /usr/bin/rsh and /usr/bin/rcp to communicate with remote systems. Initial system check completed successfully. Press [Return] to continue: VERITAS VOLUME MANAGER 4.1 INSTALLATION PROGRAM VERITAS Infrastructure package installation: Installing VERITAS Infrastructure packages on DBSERVER1: Checking VRTScpi package ............................................................... not installed Checking VRTSvlic package .............................................................. not installed Checking file system space ............................................... required space is available Installing VRTScpi 4.1.0.92 on DBSERVER1........................................................ Done Installing VRTSvlic 3.02.005k on DBSERVER1...................................................... Done Installing VERITAS Infrastructure packages on DBSERVER2: Checking VRTScpi package ............................................................... not installed Checking VRTSvlic package .............................................................. not installed Checking file system space ............................................... required space is available Copying VRTScpi package to DBSERVER2............................................................ Done Installing VRTScpi 4.1.0.92 on DBSERVER2........................................................ Done Copying VRTSvlic.tar.gz to DBSERVER2............................................................ Done Installing VRTSvlic 3.02.005k on DBSERVER2...................................................... Done VERITAS Infrastructure packages installed successfully. Press [Return] to continue: VERITAS VOLUME MANAGER 4.1 INSTALLATION PROGRAM installvm can install the following optional VxVM packages: VRTSobgui VERITAS Enterprise Administrator VRTSvmman VERITAS Volume Manager Manual Pages VRTSvmdoc VERITAS Volume Manager Documentation VRTSvrw VERITAS Volume Replicator Web Console VRTSvrdoc VERITAS Volume Replicator Documentation VRTSap VERITAS Action Provider VRTStep VERITAS Task Provider Install all of the optional packages Install none of the optional packages View package descriptions and select optional packages Select the optional packages to be installed on all systems? [1-3,q,?] 1 VERITAS Enterprise Administrator is an infrastructure that provides the runtime environment for graphical user interfaces Do you want to install the VRTSobgui package on all systems? [y,n,q] (y) The VRTSvmman package provides man pages for Volume Manager and its licensable features. Do you want to install the VRTSvmman package on all systems? [y,n,q] (y) The VRTSvmdoc package provides the following VM documentation components: VM Administrator's Guide VM Installation Guide VM Troubleshooting Guide FlashSnap Point-in-Time Copy Solutions Administrator's Guide VM Hardware Notes VM Storage Allocator Administrator's Guide VM Cross-Platform Data Sharing Administrator's Guide Do you want to install the VRTSvmdoc package on all systems? [y,n,q] (y) The VRTSvrw package is a Web-based graphical user interface replication tool, that enables you to create, manage, and administer VVR configurations using a Web browser. Do you want to install the VRTSvrw package on all systems? [y,n,q] (y) The VRTSvrdoc package contains the following VVR documentation components: VERITAS Cluster Server Agents for VERITAS Volume Replicator : Configuration Guide VERITAS Volume Replicator Advisor : User's Guide VERITAS Volume Replicator Web Console : Administrator's Guide. Do you want to install the VRTSvrdoc package on all systems? [y,n,q] (y) The VRTSap package contains VERITAS Action Provider, which provides rules engine add-on for VERITAS Object Bus. Installing VRTSap enables support for SNMP Trap notifications and e-mails on alerts. Do you want to install the VRTSap package on all systems? [y,n,q] (y) The VRTStep package contains VERITAS Task Exec Provider, which provides command execution add-on for VERITAS Object Bus. Installing VRTStep and VRTSap enables support of command execution in response to an alert. Do you want to install the VRTStep package on all systems? [y,n,q] (y) VERITAS VOLUME MANAGER 4.1 INSTALLATION PROGRAM installvm will install the following VxVM packages: VRTSperl VERITAS Perl 5.8.0 Redistribution VRTSob VERITAS Enterprise Administrator Service VRTSobgui VERITAS Enterprise Administrator VRTSvxvm VERITAS Volume Manager Binaries VRTSvmman VERITAS Volume Manager Manual Pages VRTSvmpro VERITAS Volume Manager Management Services Provider VRTSfspro VERITAS File System Management Services Provider VRTSalloc VERITAS Volume Manager Intelligent Storage Provisioning VRTSddlpr VERITAS Device Discovery Layer Services Provider VRTSvrpro VERITAS Volume Replicator Client Extension and Provider for VERITAS Enterprise Administrator VRTSvcsvr VERITAS Cluster Server Agents for VVR Press [Return] to continue: VERITAS VOLUME MANAGER 4.1 INSTALLATION PROGRAM Checking system installation requirements: Checking VxVM installation requirements on DBSERVER1: Checking VRTSperl package .............................................................. not installed Checking VRTSob package ................................................................ not installed Checking VRTSobgui package ............................................................. not installed Checking VRTSvxvm package .............................................................. not installed Checking VRTSvmman package ............................................................. not installed Checking VRTSvmpro package ............................................................. not installed Checking VRTSfspro package ............................................................. not installed Checking VRTSalloc package ............................................................. not installed Checking VRTSddlpr package ............................................................. not installed Checking VRTSvrpro package ............................................................. not installed Checking VRTSvcsvr package ............................................................. not installed Checking required SunOS patch 111413-06 ................................................ not installed Checking required SunOS patch 1093-18 .......................................... 1093-57 installed Checking required SunOS patch 108528-18 .......................................... 108528-29 installed The following required OS patches were not found on DBSERVER1: 111413-06 It is strongly recommended these patches be installed on systems before installing Volume Manager Installation of Volume Manager without required patches should only be performed if you are certain that a superceded version of the patch is already installed on this system [1mDo you want to continue installation of Volume Manager on these systems? [y,n,q] (n) [0my Checking VERITAS patch 115209 .......................................................... not installed Checking VERITAS patch 115210 .......................................................... not installed Checking for any Solaris patch issues ........................................................... None Checking file system space ............................................... required space is available Checking for any AP driver issues ............................................................... None Stopping VVR processes on host DBSERVER1 ........................................................ Done Checking vxsvc process ................................................................... not running [1mChecking VxVM installation requirements on DBSERVER2: [0m Checking VRTSperl package .............................................................. not installed Checking VRTSob package ................................................................ not installed Checking VRTSobgui package ............................................................. not installed Checking VRTSvxvm package .............................................................. not installed Checking VRTSvmman package ............................................................. not installed Checking VRTSvmpro package ............................................................. not installed Checking VRTSfspro package ............................................................. not installed Checking VRTSalloc package ............................................................. not installed Checking VRTSddlpr package ............................................................. not installed Checking VRTSvrpro package ............................................................. not installed Checking VRTSvcsvr package ............................................................. not installed Checking required SunOS patch 111413-06 ................................................ not installed Checking required SunOS patch 1093-18 .......................................... 1093-57 installed Checking required SunOS patch 108528-18 .......................................... 108528-29 installed The following required OS patches were not found on DBSERVER2: 111413-06 It is strongly recommended these patches be installed on systems before installing Volume Manager Installation of Volume Manager without required patches should only be performed if you are certain that a superceded version of the patch is already installed on this system Do you want to continue installation of Volume Manager on these systems? [y,n,q] (n) y Checking VERITAS patch 115209 .......................................................... not installed Checking VERITAS patch 115210 .......................................................... not installed Checking for any Solaris patch issues ........................................................... None Checking file system space ............................................... required space is available Checking for any AP driver issues ............................................................... None Stopping VVR processes on host DBSERVER2 ........................................................ Done Checking vxsvc process ................................................................... not running Installation requirement checks completed successfully. Press [Return] to continue: VERITAS VOLUME MANAGER 4.1 INSTALLATION PROGRAM VERITAS VOLUME MANAGER 4.1 INSTALLATION PROGRAM VxVM can be installed on systems consecutively or simultaneously. Installing on systems consecutively takes more time but allows for better error handling. Would you like to install Volume Manager on all systems simultaneously? [y,n,q,?] (y) [1mInstalling Volume Manager 4.1 on all systems simultaneously: [0m / Copying VRTSperl.tar.gz to DBSERVER2 .............................................. Done 1 of 39 steps Installing VRTSperl 4.0.12 on DBSERVER1 ........................................... Done 2 of 39 steps Installing VRTSperl 4.0.12 on DBSERVER2 ........................................... Done 3 of 39 steps Copying VRTSob.tar.gz to DBSERVER2 ................................................ Done 4 of 39 steps Installing VRTSob 3.2.514.0 on DBSERVER1 .......................................... Done 5 of 39 steps Adding patch 115209-16 on DBSERVER1 ............................................... Done 6 of 39 steps Installing VRTSob 3.2.514.0 on DBSERVER2 .......................................... Done 7 of 39 steps Copying 115209-16.tar.gz to DBSERVER2 ............................................. Done 8 of 39 steps Installing VRTSobgui 3.2.514.0 on DBSERVER1 ....................................... Done 9 of 39 steps Adding patch 115210-16 on DBSERVER1 .............................................. Done 10 of 39 steps Adding patch 115209-16 on DBSERVER2 .............................................. Done 11 of 39 steps Copying VRTSobgui.tar.gz to DBSERVER2 ............................................ Done 12 of 39 steps Installing VRTSobgui 3.2.514.0 on DBSERVER2 ...................................... Done 13 of 39 steps Copying 115210-16.tar.gz to DBSERVER2 ............................................ Done 14 of 39 steps Installing VRTSvxvm 4.1 on DBSERVER1 ............................................. Done 15 of 39 steps Adding patch 115210-16 on DBSERVER2 .............................................. Done 16 of 39 steps Installing VRTSvmman 4.1 on DBSERVER1 ............................................ Done 17 of 39 steps Copying VRTSvxvm.tar.gz to DBSERVER2 ............................................. Done 18 of 39 steps Installing VRTSvmpro 4.1 on DBSERVER1 ............................................ Done 19 of 39 steps Installing VRTSfspro 4.1 on DBSERVER1 ............................................ Done 20 of 39 steps Installing VRTSalloc 4.1 on DBSERVER1 ............................................ Done 21 of 39 steps Installing VRTSddlpr 4.1 on DBSERVER1 ............................................ Done 22 of 39 steps Installing VRTSvrpro 4.1 on DBSERVER1 ............................................ Done 23 of 39 steps Installing VRTSvcsvr 4.1 on DBSERVER1 ............................................ Done 24 of 39 steps Installing VRTSvxvm 4.1 on DBSERVER2 ............................................. Done 25 of 39 steps Copying VRTSvmman.tar.gz to DBSERVER2 ............................................ Done 26 of 39 steps Installing VRTSvmman 4.1 on DBSERVER2 ............................................ Done 27 of 39 steps Copying VRTSvmpro.tar.gz to DBSERVER2 ............................................ Done 28 of 39 steps Installing VRTSvmpro 4.1 on DBSERVER2 ............................................ Done 29 of 39 steps Copying VRTSfspro.tar.gz to DBSERVER2 ............................................ Done 30 of 39 steps Installing VRTSfspro 4.1 on DBSERVER2 ............................................ Done 31 of 39 steps Copying VRTSalloc.tar.gz to DBSERVER2 ............................................ Done 32 of 39 steps Installing VRTSalloc 4.1 on DBSERVER2 ............................................ Done 33 of 39 steps Copying VRTSddlpr.tar.gz to DBSERVER2 ............................................ Done 34 of 39 steps Installing VRTSddlpr 4.1 on DBSERVER2 ............................................ Done 35 of 39 steps Copying VRTSvrpro.tar.gz to DBSERVER2 ............................................ Done 36 of 39 steps Installing VRTSvrpro 4.1 on DBSERVER2 ............................................ Done 37 of 39 steps Copying VRTSvcsvr.tar.gz to DBSERVER2 ............................................ Done 38 of 39 steps Installing VRTSvcsvr 4.1 on DBSERVER2 ............................................ Done 39 of 39 steps Volume Manager installation completed successfully. Press [Return] to continue: VERITAS VOLUME MANAGER 4.1 INSTALLATION PROGRAM Each system requires a VxVM product license before installation. License keys for additional product features should also be added at this time. Some license keys are node locked and are unique per system. Other license keys, such as demo keys and site license keys, are registered on all systems and must be entered on the first system. VxVM Licensing Verification: Checking VxVM license key on DBSERVER1 .................................................. not licensed Enter a VxVM license key for DBSERVER1: [?] 8EPU-6ND6-N3ON-B4O4-K6PP-P6NC-XPPC-P Registering VERITAS Volume Manager DEMO key on DBSERVER1 Do you want to enter another license key for DBSERVER1? [y,n,q,?] (n) 这里加入volume manager,cvm的license Registering 8EPU-6ND6-N3ON-B4O4-K6PP-P6NC-XPPC-P on DBSERVER2 Checking VxVM license key on DBSERVER2 ........................................... Volume Manager Demo Do you want to enter another license key for DBSERVER2? [y,n,q,?] (n) VxVM licensing completed successfully. Press [Return] to continue: VERITAS VOLUME MANAGER 4.1 INSTALLATION PROGRAM It is optional to configure VxVM now. If you choose to configure VxVM later, you can either do so manually or run the installvm -configure command. [1mAre you ready to configure VxVM? [y,n,q] (y) The enclosure-based naming scheme is a feature of Volume Manager. It allows one to reference disks using a symbolic name that is more meaningful than the operating system's normal device access name. This symbolic name is typically derived from the array name. Do you want to set up the enclosure-based naming scheme? [y,n,q,?] (n) VERITAS VOLUME MANAGER 4.1 INSTALLATION PROGRAM Configuring Volume Manager: Volume Manager configured successfully. Press [Return] to continue: VERITAS VOLUME MANAGER 4.1 INSTALLATION PROGRAM Note: The vxconfigd daemon will be started, which can take a while depending upon the hardware configuration. Disabling enclosure-based naming on DBSERVER1 ................................................... Done Starting vxconfigd for VxVM on DBSERVER1 ..................................................... Started Disabling enclosure-based naming on DBSERVER2 ................................................... Done Starting vxconfigd for VxVM on DBSERVER2 ..................................................... Started Volume Manager default disk group configuration: Many Volume Manager commands affect the contents or configuration of a disk group. Such commands require that the user specify a disk group. This is accomplished by using the -g option of a command or setting the VXVM_DEFAULTDG environment variable. An alternative to these two methods is to configure the default disk group of a system. Do you want to set up the default disk group for each system? [y,n,q,?] (y) Will you specify one disk group name for all eligible systems? [y,n,q,?] (y) Specify a default disk group for all systems or type 'l' to display a listing of existing disk group(s). [?]datadg You have decided to specify the default disk groups as follows: Host: DBSERVER1 ................................................................... Disk group: datadg Host: DBSERVER2 ................................................................... Disk group: datadg Note: If 'nodg' is displayed, then the host will be configured to have no default disk group. Is this correct? [y,n,q] (y) Volume Manager default disk group setup and daemon startup Setting default disk group to datadg on DBSERVER1 ............................................... Done Starting vxcached on DBSERVER1 ............................................................... Started Setting default disk group to datadg on DBSERVER2 ............................................... Done Starting vxcached on DBSERVER2 ................................................................ Failed Volume Manager was started successfully. Press [Return] to continue: VERITAS VOLUME MANAGER 4.1 INSTALLATION PROGRAM Installation of Volume Manager 4.1 has completed successfully. The installation summary is saved at: /opt/VRTS/install/logs/installvm913135345.summary The installvm log is saved at: /opt/VRTS/install/logs/installvm913135345.log The installation response file is saved at: /opt/VRTS/install/logs/installvm913135345.response 第四部分 在DBSERVER1和DBSERVER2上建立dba组和oracle用户,oracle用户的主组是dba. root@DBSERVER1 # groupadd –g 7777 dba root@DBSERVER1 # useradd –g dba –u 7777 –d /oracle/app –m –s /bin/ksh oracle 第五部分 安装 Sun Cluster 3.1 for Oracle RAC的支持包、安装Oracle 9i RAC的分布式文件锁的包 第一节 安装Sun Cluster 3.1 for Oracle RAC的支持包 root@DBSERVER1 # cd /oracle/EIS/suncluster_3_1/SunCluster_3.1/Sol_9/Packages 就是Sun Cluster agent光盘中能找到 root@DBSERVER1 # pkgadd -d . SUNWudlm 支持并行 Processing package instance Sun Cluster Support for Oracle Parallel Server UDLM, (opt) (sparc) 3.1.0,REV=2003.03.25.13.14 Copyright 2003 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Using as the package base directory. ## Processing package information. ## Processing system information. ## Verifying package dependencies. ## Verifying disk space requirements. ## Checking for conflicts with packages already installed. ## Checking for setuid/setgid programs. This package contains scripts which will be executed with super-user permission during the process of installing this package. Do you want to continue with the installation of Installing Sun Cluster Support for Oracle Parallel Server UDLM, (opt) as ## Installing part 1 of 1. 204 blocks Installation of root@DBSERVER1 # pkgadd -d . SUNWscucm SUNWudlmr SUNWcvmr SUNWcvm 在光盘同一目录下 Processing package instance Sun Cluster UCMM reconfiguration interface (sparc) 3.1.0,REV=2003.03.25.13.14 Copyright 2003 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Using > as the package base directory. ## Processing package information. ## Processing system information. 8 package pathnames are already properly installed. ## Verifying package dependencies. ## Verifying disk space requirements. ## Checking for conflicts with packages already installed. ## Checking for setuid/setgid programs. This package contains scripts which will be executed with super-user permission during the process of installing this package. Do you want to continue with the installation of ## Installing part 1 of 1. 520 blocks ## Executing postinstall script. Installation of Processing package instance Sun Cluster Support for Oracle Parallel Server UDLM, (root) (sparc) 3.1.0,REV=2003.03.25.13.14 Copyright 2003 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Using > as the package base directory. ## Processing package information. ## Processing system information. 13 package pathnames are already properly installed. ## Verifying package dependencies. ## Verifying disk space requirements. ## Checking for conflicts with packages already installed. ## Checking for setuid/setgid programs. Installing Sun Cluster Support for Oracle Parallel Server UDLM, (root) as ## Installing part 1 of 1. /usr/cluster/lib/ucmm/reconf.d/rc2.d/05_udlm Installation of Processing package instance Sun Cluster Support for Veritas CVM, (root) (sparc) 3.1.0,REV=2003.03.25.13.14 Copyright 2003 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Using > as the package base directory. ## Processing package information. ## Processing system information. 15 package pathnames are already properly installed. ## Verifying package dependencies. ## Verifying disk space requirements. ## Checking for conflicts with packages already installed. ## Checking for setuid/setgid programs. Installing Sun Cluster Support for Veritas CVM, (root) as ## Installing part 1 of 1. /usr/cluster/lib/ucmm/reconf.d/rc1.d/05_cvm /usr/cluster/lib/ucmm/reconf.d/rc9.d/05_cvm Installation of Processing package instance Sun Cluster Support for Veritas CVM, (opt) (sparc) 3.1.0,REV=2003.03.25.13.14 Copyright 2003 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Using as the package base directory. ## Processing package information. ## Processing system information. ## Verifying package dependencies. ## Verifying disk space requirements. ## Checking for conflicts with packages already installed. ## Checking for setuid/setgid programs. This package contains scripts which will be executed with super-user permission during the process of installing this package. Do you want to continue with the installation of Installing Sun Cluster Support for Veritas CVM, (opt) as ## Installing part 1 of 1. 21 blocks Installation of 第二节、安装Oracle 9i RAC的分布式文件锁的包 root@DBSERVER1 #cd /oracle/EIS/racpatch 在oracle disk1的racpatch目录下 root@DBSERVER1 # pkgadd -d . ORCLudlm Oracle RAC锁 Processing package instance Oracle UNIX Distributed Lock Manager (sparc) Dev Release 02/02/02, 3.3.4.5 Copyright (C) Oracle Corporation 1993, 1994, 1995, 1996, 1997 This software/documentation contains proprietary information of Oracle Corporation; it is provided under a license agreement containing restrictions on use and disclosure and is also protected by copyright law. Reverse engineering of the software is prohibited. If this software/documentation is delivered to a U.S. Government Agency of the Department of Defense, then it is delivered with Restricted Rights and the following legend is applicable: RESTRICTED RIGHTS LEGEND: Use, duplication, or disclosure by the Government is subject to restrictions as set forth in subparagraph (c)(1)(ii) of DFARS 252.227-7013, Rights in Technical Data and Computer Software (October 1988). If this software/documentation is delivered to a U.S. Government Agency not within the Department of Defense, then it is delivered with \"Restricted Rights,\" as defined in FAR 52.227-14, Rights in Data - General, including Alternate III (June 1987). Oracle Corporation, 500 Oracle Parkway, Redwood City, CA 94065. The information in this document is subject to change without notice. If you find any problems in the documentation, please report them to us in writing. Oracle Corporation does not warrant that this document is error free. Oracle, CASE*Dictionary, Pro*Ada, Pro*COBOL, Pro*FORTRAN, Pro*Pascal, Pro*PL/I, SQL*Connect, SQL*Forms, SQL*Loader, SQL*Net, and SQL*Plus are registered trademarks of Oracle Corporation. CASE*Designer, CASE*Method, Oracle7, Oracle Parallel Server, PL/SQL, Pro*C/C++, SQL*Module, Oracle Server Manager and Trusted Oracle7 are trademarks of Oracle Corporation. All trade names referenced are the service mark, trademark, or registered trademark of the respective manufacturer. Installation of ORCLudlm on Solaris 2.9 You will now be prompted for the name of the group which will be used by Oracle. - You will need to create this group before attempting to bringup pdb - Oracle install will ask you for this information as well. Be sure to give the same response for the group name. Please enter the group which should be able to act as the DBA of the database (dba): [?] Sun Cluster release: 3.0 - no udlm_shmem_addr_file.txt file found - /opt/SUNWcluster/lib/udlm_shmem_addr_file.txt will be created - with 0x12000000 as the shmem attach address for udlm Package classes: none sol_2.8 sc30 cpusaf Using as the package base directory. ## Processing package information. ## Processing system information. 3 package pathnames are already properly installed. ## Verifying package dependencies. ## Verifying disk space requirements. ## Checking for conflicts with packages already installed. ## Checking for setuid/setgid programs. This package contains scripts which will be executed with super-user permission during the process of installing this package. Do you want to continue with the installation of Installing Oracle UNIX Distributed Lock Manager as ## Installing part 1 of 1. /opt/ORCLcluster/lib/libskgxn2.so /opt/SUNWcluster/TEMPLATE.conf [ verifying class /opt/SUNWcluster/lib/sparcv9/libudlm.so /opt/SUNWcluster/lib/sparcv9 /opt/SUNWcluster/lib/libcdb.so /opt/SUNWcluster/lib/sparcv9/libcluster.so /opt/SUNWcluster/lib/udlm_shmem_addr_file.txt [ verifying class /etc/opt/SUNWcluster/conf/udlm.conf NOT found. It will be created with the values in the /etc/opt/SUNWcluster/conf/udlm.conf.template file. /opt/SUNWcluster/TEMPLATE.conf Installation of root@DBSERVER2 # pkgadd -d . SUNWudlm Sun Cluster光盘 Processing package instance Sun Cluster Support for Oracle Parallel Server UDLM, (opt) (sparc) 3.1.0,REV=2003.03.25.13.14 Copyright 2003 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Using as the package base directory. ## Processing package information. ## Processing system information. ## Verifying package dependencies. ## Verifying disk space requirements. ## Checking for conflicts with packages already installed. ## Checking for setuid/setgid programs. This package contains scripts which will be executed with super-user permission during the process of installing this package. Do you want to continue with the installation of Installing Sun Cluster Support for Oracle Parallel Server UDLM, (opt) as ## Installing part 1 of 1. 204 blocks Installation of root@DBSERVER2 # pkgadd -d . SUNWscucm SUNWudlmr SUNWcvmr SUNWcvm Processing package instance Sun Cluster UCMM reconfiguration interface (sparc) 3.1.0,REV=2003.03.25.13.14 Copyright 2003 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Using > as the package base directory. ## Processing package information. ## Processing system information. 8 package pathnames are already properly installed. ## Verifying package dependencies. ## Verifying disk space requirements. ## Checking for conflicts with packages already installed. ## Checking for setuid/setgid programs. This package contains scripts which will be executed with super-user permission during the process of installing this package. Do you want to continue with the installation of Installing Sun Cluster UCMM reconfiguration interface as ## Installing part 1 of 1. 520 blocks ## Executing postinstall script. Installation of Processing package instance Sun Cluster Support for Oracle Parallel Server UDLM, (root) (sparc) 3.1.0,REV=2003.03.25.13.14 Copyright 2003 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Using > as the package base directory. ## Processing package information. ## Processing system information. 13 package pathnames are already properly installed. ## Verifying package dependencies. ## Verifying disk space requirements. ## Checking for conflicts with packages already installed. ## Checking for setuid/setgid programs. Installing Sun Cluster Support for Oracle Parallel Server UDLM, (root) as ## Installing part 1 of 1. /usr/cluster/lib/ucmm/reconf.d/rc2.d/05_udlm Installation of Processing package instance Sun Cluster Support for Veritas CVM, (root) (sparc) 3.1.0,REV=2003.03.25.13.14 Copyright 2003 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Using > as the package base directory. ## Processing package information. ## Processing system information. 15 package pathnames are already properly installed. ## Verifying package dependencies. ## Verifying disk space requirements. ## Checking for conflicts with packages already installed. ## Checking for setuid/setgid programs. Installing Sun Cluster Support for Veritas CVM, (root) as ## Installing part 1 of 1. /usr/cluster/lib/ucmm/reconf.d/rc1.d/05_cvm /usr/cluster/lib/ucmm/reconf.d/rcK.d/05_cvm Installation of Processing package instance Sun Cluster Support for Veritas CVM, (opt) (sparc) 3.1.0,REV=2003.03.25.13.14 Copyright 2003 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Using as the package base directory. ## Processing package information. ## Processing system information. ## Verifying package dependencies. ## Verifying disk space requirements. ## Checking for conflicts with packages already installed. ## Checking for setuid/setgid programs. This package contains scripts which will be executed with super-user permission during the process of installing this package. Do you want to continue with the installation of Installing Sun Cluster Support for Veritas CVM, (opt) as ## Installing part 1 of 1. 21 blocks Installation of root@DBSERVER2 # cd /opt/zqf/racpatch root@DBSERVER2 # pkgadd -d . ORCLudlm Processing package instance Oracle UNIX Distributed Lock Manager (sparc) Dev Release 02/02/02, 3.3.4.5 Copyright (C) Oracle Corporation 1993, 1994, 1995, 1996, 1997 This software/documentation contains proprietary information of Oracle Corporation; it is provided under a license agreement containing restrictions on use and disclosure and is also protected by copyright law. Reverse engineering of the software is prohibited. If this software/documentation is delivered to a U.S. Government Agency of the Department of Defense, then it is delivered with Restricted Rights and the following legend is applicable: RESTRICTED RIGHTS LEGEND: Use, duplication, or disclosure by the Government is subject to restrictions as set forth in subparagraph (c)(1)(ii) of DFARS 252.227-7013, Rights in Technical Data and Computer Software (October 1988). If this software/documentation is delivered to a U.S. Government Agency not within the Department of Defense, then it is delivered with \"Restricted Rights,\" as defined in FAR 52.227-14, Rights in Data - General, including Alternate III (June 1987). Oracle Corporation, 500 Oracle Parkway, Redwood City, CA 94065. The information in this document is subject to change without notice. If you find any problems in the documentation, please report them to us in writing. Oracle Corporation does not warrant that this document is error free. Oracle, CASE*Dictionary, Pro*Ada, Pro*COBOL, Pro*FORTRAN, Pro*Pascal, Pro*PL/I, SQL*Connect, SQL*Forms, SQL*Loader, SQL*Net, and SQL*Plus are registered trademarks of Oracle Corporation. CASE*Designer, CASE*Method, Oracle7, Oracle Parallel Server, PL/SQL, Pro*C/C++, SQL*Module, Oracle Server Manager and Trusted Oracle7 are trademarks of Oracle Corporation. All trade names referenced are the service mark, trademark, or registered trademark of the respective manufacturer. Installation of ORCLudlm on Solaris 2.9 You will now be prompted for the name of the group which will be used by Oracle. - You will need to create this group before attempting to bringup pdb - Oracle install will ask you for this information as well. Be sure to give the same response for the group name. Please enter the group which should be able to act as the DBA of the database (dba): [?] Sun Cluster release: 3.0 - no udlm_shmem_addr_file.txt file found - /opt/SUNWcluster/lib/udlm_shmem_addr_file.txt will be created - with 0x12000000 as the shmem attach address for udlm Package classes: none sol_2.8 sc30 cpusaf Using as the package base directory. ## Processing package information. ## Processing system information. 3 package pathnames are already properly installed. ## Verifying package dependencies. ## Verifying disk space requirements. ## Checking for conflicts with packages already installed. ## Checking for setuid/setgid programs. This package contains scripts which will be executed with super-user permission during the process of installing this package. Do you want to continue with the installation of Installing Oracle UNIX Distributed Lock Manager as ## Installing part 1 of 1. /opt/ORCLcluster/lib/libskgxn2.so /opt/SUNWcluster/TEMPLATE.conf [ verifying class /opt/SUNWcluster/lib/sparcv9/libudlm.so /opt/SUNWcluster/lib/sparcv9 /opt/SUNWcluster/lib/libcdb.so /opt/SUNWcluster/lib/sparcv9/libhaops.so /opt/SUNWcluster/lib/udlm_shmem_addr_file.txt [ verifying class /etc/opt/SUNWcluster/conf/udlm.conf NOT found. It will be created with the values in the /etc/opt/SUNWcluster/conf/udlm.conf.template file. /opt/SUNWcluster/TEMPLATE.conf Installation of 第六部分 Oracle9i数据库安装前的准备 第一节 修改Solaris关于安装oracle的内核参数 在两个节点的/etc/system加入如下内容: set shmsys:shminfo_shmmax=21474838 4096*0.5*1024*1024*1024 set shmsys:shminfo_shmmin=200 set shmsys:shminfo_shmmni=100 set shmsys:shminfo_shmseg=10 set semsys:seminfo_semmap=1024 set semsys:seminfo_semmns=410 set semsys:seminfo_semmni=100 set semsys:seminfo_semmsl=210 set semsys:seminfo_semmnu=2048 set semsys:seminfo_semume=200 set semsys:seminfo_semopm=100 set semsys:seminfo_semvmx=32767 forceload: sys/shmsys forceload: sys/semsys forceload: sys/msgsys 十六、重起机器 root@DBSERVER1 # scshutdown -y -g 30 在DBSERVER1: OK boot DBSERVER1启动后,在DBSERVER2 OK boot 第二节、准备VxVM Disk root@DBSERVER1 # vxdiskadm Volume Manager Support Operations Menu: VolumeManager/Disk 1 Add or initialize one or more disks 2 Encapsulate one or more disks 3 Remove a disk 4 Remove a disk for replacement 5 Replace a failed or removed disk 6 Mirror volumes on a disk 7 Move volumes from a disk 8 Enable access to (import) a disk group 9 Remove access to (deport) a disk group 10 Enable (online) a disk device 11 Disable (offline) a disk device 12 Mark a disk as a spare for a disk group 13 Turn off the spare flag on a disk 14 Unrelocate subdisks back to a disk 15 Exclude a disk from hot-relocation use 16 Make a disk available for hot-relocation use 17 Prevent multipathing/Suppress devices from VxVM's view 18 Allow multipathing/Unsuppress devices from VxVM's view 19 List currently suppressed/non-multipathed devices 20 Change the disk naming scheme 21 Get the newly connected/zoned disks in VxVM view list List disk information ? Display help about menu ?? Display help about the menuing system q Exit from menus Select an operation to perform:1 Add or initialize disks Menu: VolumeManager/Disk/AddDisks Use this operation to add one or more disks to a disk group. You can add the selected disks to an existing disk group or to a new disk group that will be created as a part of the operation. The selected disks may also be added to a disk group as spares. Or they may be added as nohotuses to be excluded from hot-relocation use. The selected disks may also be initialized without adding them to a disk group leaving the disks available for use as replacement disks. More than one disk or pattern may be entered at the prompt. Here are some disk selection examples: all: all disks c3 c4t2: all disks on both controller 3 and controller 4, target 2 c3t4d2: a single disk (in the c#t#d# naming scheme) xyz_0 : a single disk (in the enclosure based naming scheme) xyz_ : all disks on the enclosure whose name is xyz Select disk devices to add: [ Here are the disks selected. Output format: [Device_Name] c3t0d0 Continue operation? [y,n,q,?] (default: y) You can choose to add these disks to an existing disk group, a new disk group, or you can leave these disks available for use by future add or replacement operations. To create a new disk group, select a disk group name that does not yet exist. To leave the disks available for future use, specify a disk group name of \"none\". Which disk group [ Continue with operation? [y,n,q,?] (default: y) Initializing device c3t0d0. Use a default private region length for this disk? [y,n,q,?] (default: y) Initializing device c3t0d0. Use a default private region length for this disk? [y,n,q,?] (default: y) Add or initialize other disks? [y,n,q,?] (default: n) Volume Manager Support Operations Menu: VolumeManager/Disk 1 Add or initialize one or more disks 2 Encapsulate one or more disks 3 Remove a disk 4 Remove a disk for replacement 5 Replace a failed or removed disk 6 Mirror volumes on a disk 7 Move volumes from a disk 8 Enable access to (import) a disk group 9 Remove access to (deport) a disk group 10 Enable (online) a disk device 11 Disable (offline) a disk device 12 Mark a disk as a spare for a disk group 13 Turn off the spare flag on a disk 14 Unrelocate subdisks back to a disk 15 Exclude a disk from hot-relocation use 16 Make a disk available for hot-relocation use 17 Prevent multipathing/Suppress devices from VxVM's view 18 Allow multipathing/Unsuppress devices from VxVM's view 19 List currently suppressed/non-multipathed devices 20 Change the disk naming scheme 21 Get the newly connected/zoned disks in VxVM view list List disk information ? Display help about menu ?? Display help about the menuing system q Exit from menus Select an operation to perform:q Goodbye. root@DBSERVER1 # vxdisk list DEVICE TYPE DISK GROUP STATUS c1t0d0s2 auto:none - - online invalid c1t1d0s2 auto:none - - online invalid c1t2d0s2 auto:none - - online invalid c1t3d0s2 auto:none - - online invalid c3t0d0s2 auto:cdsdisk datadg01 datadg online 重起机器 root@DBSERVER1 # scshutdown -y -g 30 在DBSERVER1: OK boot DBSERVER1启动后,在DBSERVER2 OK boot 第三节、创建Verista Volume Manager 共享卷组和共享逻辑卷 检查RAC环境是否成功 root@DBSERVER1 # vxclustadm –v nodestate root@DBSERVER1 # vxdctl -c mode mode: enabled: cluster active - MASTER root@DBSERVER1 # vxdg list NAME STATE ID rootdg enabled 1084441146.1025.DBSERVER1 datadg enabled,shared 1084506177.1214.DBSERVER1 root@DBSERVER1 # telnet DBSERVER2 Trying 192.168.1.19... Connected to DBSERVER2. Escape character is '^]'. SunOS 5.8 login: root Password: Last login: Mon Aug 4 15:50:14 from 192.168.0.177 Sun Microsystems Inc. SunOS 5.8 Generic May 2002 Sourcing //.profile-EIS..... root@DBSERVER2 # vxdg list NAME STATE ID rootdg enabled 1084441146.1025.DBSERVER1 dagadg enabled,shared 1084506177.1214.DBSERVER1 root@DBSERVER2 # exit Connection to DBSERVER2 closed by foreign host. root@DBSERVER1 # cat makevol vxassist -g datadg make control1 111m vxassist -g datadg make control2 111m vxassist -g datadg make control3 111m vxassist -g datadb make cwmlite 102m vxassist -g datadg make drsys 92m vxassist -g datadg make example 162m vxassist -g datadg make gztv01 2002m vxassist -g datadg make gztv02 2002m vxassist -g datadg make gztv03 2002m vxassist -g datadg make gztv04 2002m vxassist -g datadg make gztv05 2002m vxassist -g datadg make gztv06 2002m vxassist -g datadg make gztv07 2002m vxassist -g datadg make gztv08 2002m vxassist -g datadg make gztv09 2002m vxassist -g datadg make gztv10 2002m vxassist -g datadg make indx 72m vxassist -g datadg make oemrepo 22m vxassist -g datadg make raw_srvmconf 102m vxassist -g datadg make redologA11 121m vxassist -g datadg make redologA12 121m vxassist -g datadg make redologA13 121m vxassist -g datadg make redologB11 121m vxassist -g datadg make redologB12 121m vxassist -g datadg make redologB13 121m vxassist -g datadg make spfile 12m vxassist -g datadg make system 602m vxassist -g datadg make temp1 2002m vxassist -g datadg make temp2 2002m vxassist -g datadg make tools 22m vxassist -g datadg make undotbs1 2002m vxassist -g datadg make undotbs2 2002m root@DBSERVER1 # sh –x makevol root@DBSERVER1 # cat chmodRacVol vxedit -g datadg set user=oracle group=dba control1 vxedit -g datadg set user=oracle group=dba control2 vxedit -g datadg set user=oracle group=dba control3 vxedit -g datadg set user=oracle group=dba cwmlite vxedit -g datadg set user=oracle group=dba drsys vxedit -g datadg set user=oracle group=dba example vxedit -g datadg set user=oracle group=dba gztv01 vxedit -g datadg set user=oracle group=dba gztv02 vxedit -g datadg set user=oracle group=dba gztv03 vxedit -g datadg set user=oracle group=dba gztv04 vxedit -g datadg set user=oracle group=dba gztv05 vxedit -g datadg set user=oracle group=dba gztv06 vxedit -g datadg set user=oracle group=dba gztv07 vxedit -g datadg set user=oracle group=dba gztv08 vxedit -g datadg set user=oracle group=dba gztv09 vxedit -g datadg set user=oracle group=dba gztv10 vxedit -g datadg set user=oracle group=dba index vxedit -g datadg set user=oracle group=dba oemrepo vxedit -g datadg set user=oracle group=dba raw_srvmconf vxedit -g datadg set user=oracle group=dba redologA11 vxedit -g datadg set user=oracle group=dba redologA12 vxedit -g datadg set user=oracle group=dba redologA13 vxedit -g datadg set user=oracle group=dba redologB11 vxedit -g datadg set user=oracle group=dba redologB12 vxedit -g datadg set user=oracle group=dba redologB13 vxedit -g datadg set user=oracle group=dba spfile vxedit -g datadg set user=oracle group=dba system vxedit -g datadg set user=oracle group=dba temp1 vxedit -g datadg set user=oracle group=dba temp2 vxedit -g datadg set user=oracle group=dba tools vxedit -g datadg set user=oracle group=dba undotbs1 vxedit -g datadg set user=oracle group=dba undotbs2 root@DBSERVER1 # sh -x chmodRacVol 这里有可能因为名字有问题可以手工更改权限在/dev/vx的dsk和rdsk中都要改动。 二十、重起机器 root@DBSERVER1 # scshutdown -y -g 30 在DBSERVER1: OK boot DBSERVER1启动后,在DBSERVER2 OK boot 启动后验证共享卷及共享卷组是否工作正常: 第四节、建立Oracle用户的环境文件 文件 /oracle/app/.profile的内容如下: DBSERVER1机器中的设置 # @(#)local.profile 1.8 99/03/26 SMI stty istrip PATH=/usr/bin:/usr/ccs/bin:/usr/ucb:/etc:. export PATH PATH=/usr/bin:/etc:/usr/sbin:/usr/ccs/bin:/usr/ucb:$HOME/bin:/sbin:. export PATH ORACLE_BASE=/oracle/app/oracle ORACLE_HOME=/oracle/app/oracle/product/9.2.0 ORACLE_TERM=xterm ORACLE_SID=tvdb1; export ORACLE_SID NLS_LANG=american_america.ZHS16GBK ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data PATH=$PATH:$ORACLE_HOME/bin:$PATH:. CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib:$ORACLE_HOME/network/jlib export ORACLE_BASE ORACLE_HOME ORACLE_TERM ORACLE_SID NLS_LANG ORA_NLS33 PATH CLASSPATH DBCA_RAW_CONFIG=/dev/vx/rdsk/datadg/raw_srvmconf export DBCA_RAW_CONFIG PS1=`uname -n`$ export PS1 # # If possible, start the windows system # if [ \"`tty`\" = \"/dev/console\" ] ; then if [ \"$TERM\" = \"sun\" -o \"$TERM\" = \"sun-color\" -o \"$TERM\" = \"AT386\" ] then if [ ${OPENWINHOME:-\"\ OPENWINHOME=/usr/openwin export OPENWINHOME fi echo \"\" echo \"Starting OpenWindows in 5 seconds (type Control-C to interrupt)\" sleep 5 echo \"\" $OPENWINHOME/bin/openwin clear # get rid of annoying cursor rectangle exit # logout after leaving windows system fi fi DBSERVER2机器中的设置 # @(#)local.profile 1.8 99/03/26 SMI stty istrip PATH=/usr/bin:/usr/ccs/bin:/usr/ucb:/etc:. export PATH PATH=/usr/bin:/etc:/usr/sbin:/usr/ccs/bin:/usr/ucb:$HOME/bin:/sbin:. export PATH ORACLE_BASE=/oracle/app/oracle ORACLE_HOME=/oracle/app/oracle/product/9.2.0 ORACLE_TERM=xterm ORACLE_SID=tvdb2; export ORACLE_SID NLS_LANG=american_america.ZHS16GBK ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data PATH=$PATH:$ORACLE_HOME/bin:/usr/java131/bin:$PATH:. CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib:$ORACLE_HOME/network/jlib export ORACLE_BASE ORACLE_HOME ORACLE_TERM ORACLE_SID NLS_LANG ORA_NLS33 PATH CLASSPATH DBCA_RAW_CONFIG=/dev/vx/rdsk/datadg/raw_srvmconf export DBCA_RAW_CONFIG PS1=`uname -n`$ export PS1 # # If possible, start the windows system # if [ \"`tty`\" = \"/dev/console\" ] ; then if [ \"$TERM\" = \"sun\" -o \"$TERM\" = \"sun-color\" -o \"$TERM\" = \"AT386\" ] then if [ ${OPENWINHOME:-\"\ OPENWINHOME=/usr/openwin export OPENWINHOME fi echo \"\" echo \"Starting OpenWindows in 5 seconds (type Control-C to interrupt)\" sleep 5 echo \"\" $OPENWINHOME/bin/openwin clear # get rid of annoying cursor rectangle exit # logout after leaving windows system fi fi 第五节、设置oracle用户的命令环境 在oracle用户的主目录下添加文件 .rhosts vi /oracle/app/.rhosts DBSERVER1 DBSERVER2 DBSERVER1和DBSERVER2都要以root运行:xhost + #mkdir /var/oracle/app #chown oracle:dba /var/oracle/app #chmod 755 /var/oracle/app 在DBSERVER1机器上运行 #mkdir –p /archivelog/oradata #chown –R oracle:dba /archivelog 在DBSERVER2机器上运行 #mkdir –p /archivelog/oradata #chown –R oracle:dba /archivelog 第七部分 Oracle 9i的安装配置 第一节 oracle 数据库安装 下面开始安装Oracle 软件介质 通过CD安装ORACLE. 1.放入ORACLE CD1 2.以oracle用户登录进入console界面 3. DBSERVER1$/cdrom/cdrom0/runInstaller 这样换盘方便 出现图形的安装界面, Cluster Node Selection: 选中两个节点 Database Configuration->Select a database suited to your needs: Software Only 安装界面 当提示: run /oracle/app/product/9i/root.sh as root on DBSERVER1,DBSERVER2 时,在每个节点以root身份执行 第二节 oracle 数据库监听配置 配置监听 root@DBSERVER1 # vxdctl -c mode mode: enabled: cluster active - MASTER DBSERVER1$ lsnodes DBSERVER1 DBSERVER2 DBSERVER1$ srvconfig -init -f DBSERVER1$ gsdctl start DBSERVER2$ gsdctl start ---------------------------------- 开始配置监听: DBSERVER1$ netca 1. choice Cluster configuration 2. 选中两个节点 DBSERVER1 DBSERVER2 3. Listner configuration->Add->Listener name:(LISTENER)->TCP->Use the standard port number of 1521->NO->Listener configuration complete. 4. Naming methods configuration->Local->Naming methods configuration complete. 5. Local Net Service Name configuration->Add->Oracle8i or later database or service->oradb1->TCP->DBSERVER1->No,do not test->oradb1->yes(configure another net service name) ->Oracle8i or later database or service->oradb2->TCP->DBSERVER2->No,do not test->oradb2->No->Net service name Configuration complete.->Finish 后台命令提示符: 注释: listener.ora tnsnames.ora 所在的位置: /oracle/app/product/9i/network/admin 第三节 oracle建库 DBCAFILE位置: $ pwd /oracle/app/InstallOracle DBCAFILE内容: $ cat dbcafile system=/dev/vx/rdsk/datadg/system spfile=/dev/vx/rdsk/datadg/spfile users=/dev/vx/rdsk/datadg/users temp1=/dev/vx/rdsk/datadg/temp1 temp2=/dev/vx/rdsk/datadg/temp2 undotbs1=/dev/vx/rdsk/datadg/undotbs1 undotbs2=/dev/vx/rdsk/datadg/undotbs2 example=/dev/vx/rdsk/datadg/example cwmlite=/dev/vx/rdsk/datadg/cwmlite odm=/dev/vx/rdsk/datadg/odm indx=/dev/vx/rdsk/datadg/indx tools=/dev/vx/rdsk/datadg/tools drsys=/dev/vx/rdsk/datadg/drsys control1=/dev/vx/rdsk/datadg/controlfile1 control2=/dev/vx/rdsk/datadg/controlfile2 control3=/dev/vx/rdsk/datadg/controlfile3 xdb=/dev/vx/rdsk/datadg/xdb redo1_1=/dev/vx/rdsk/datadg/redologA11 redo1_2=/dev/vx/rdsk/datadg/redologA12 redo2_1=/dev/vx/rdsk/datadg/redologB11 redo2_2=/dev/vx/rdsk/datadg/redologB12 注意不加入archivelog和dyexplore内容,安装完成后手工加入即可。 DBSERVER1$ DBCA_RAW_CONFIG=/oracle/app/dbcafile DBSERVER1$ export DBCA_RAW_CONFIG DBSERVER1$ dbca 1. create a database->select all->New Database->Database Identification->Database Features->Database Connection Options->Initialization Parameters->Database Storage *在对 Datafile中的自动扩展去掉,手工指定大小.实际容量是前面的数字减2即可,比如:2=256-2 启动数据库 $ sqlplus '/ as sysdba' SQL> startup SQL> exit $ lsnrctl start 客户端的Oracle网络配置文件 $ORACLE_HOME/network/admin/tnsnames.ora # TNSNAMES.ORA Network Configuration File: /oracle/app/product/9i/network/admin/tnsnames.ora # Generated by Oracle configuration tools. ORADB2 = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = DBSERVER2)(PORT = 1521)) (CONNECT_DATA = (SERVICE_NAME = oradb) (INSTANCE_NAME = oradb2) ) ) ORADB1 = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = DBSERVER1)(PORT = 1521)) (CONNECT_DATA = (SERVICE_NAME = oradb) (INSTANCE_NAME = oradb1) ) ) ORADB = (DESCRIPTION = # 以下两行是自己新添加的 (load_balance=on) (failover=on) (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = DBSERVER1)(PORT = 1521)) (ADDRESS = (PROTOCOL = TCP)(HOST = DBSERVER2)(PORT = 1521)) (LOAD_BALANCE = yes) ) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = oradb) #以下6行是自己新添加的 (failover_mode= (type=session) (method=basic) (retries=20) (delay=15) ) ) ) LISTENERS_ORADB = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = DBSERVER1)(PORT = 1521)) (ADDRESS = (PROTOCOL = TCP)(HOST = DBSERVER2)(PORT = 1521)) ) LISTENER_ORADB2 = (ADDRESS = (PROTOCOL = TCP)(HOST = DBSERVER2)(PORT = 1521)) LISTENER_ORADB1 = (ADDRESS = (PROTOCOL = TCP)(HOST = DBSERVER1)(PORT = 1521)) INST1_HTTP = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = DBSERVER1)(PORT = 1521)) ) (CONNECT_DATA = (SERVER = SHARED) (SERVICE_NAME = MODOSE) (PRESENTATION = http://HRService) ) ) 在客户端连接Oracle 服务器 C:\\>sqlplus scott/tiger@oradb SQL*Plus: Release 9.2.0.1.0 - Production on 星期一 2月 23 09:46:07 2004 Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved. 连接到: Oracle9i Enterprise Edition Release 9.2.0.1.0 - bit Production With the Partitioning, Real Application Clusters, OLAP and Oracle Data Mining opt JServer Release 9.2.0.1.0 - Production SQL> 因篇幅问题不能全部显示,请点此查看更多更全内容
Copyright © 2019- igat.cn 版权所有 赣ICP备2024042791号-1
违法及侵权请联系:TEL:199 1889 7713 E-MAIL:2724546146@qq.com
本站由北京市万商天勤律师事务所王兴未律师提供法律服务