位置: 编程技术 - 正文
推荐整理分享Solaris9系统上安装Oracle10g RAC(solaris安装软件包),希望有所帮助,仅作参考,欢迎阅读内容。
文章相关热门搜索词:安装solaris11,安装solaris11,solaris安装软件,solaris11.4安装教程,solaris10安装,solaris 11.4,solaris11.4安装教程,solaris11.4安装教程,内容如对您有帮助,希望把文章链接给更多的朋友!
1.Oracle 官方安装文档中(下文中的doc 2,doc 3),有多处错误。最新的 Release Notes (August ) 更正了一些,但还有不少未得到更正。2.文中的三个脚本,在使用之前请仔阅读。如不当使用导致系统损坏与本文作者无关。3.本文所用的安装步骤尽可能依照Oracle 的官方安装文档。但有一处“Configuring UDP parameters” 不得不改用其他 方法,因为 Oracle 官方安装文档中讲的方法不起作用。Part1 Do the Pre-installation TasksThis is a guide for installing Oracle g RAC with Oracle clusterware on Solaris9 SPARC -BitEnterprise Edition.Followed intrusions in these doc:1. Oracle Database Release Notes g Release 2 (.2) for Solaris Operating System (SPARC -Bit) Part Number B-. Oracle Clusterware and Oracle Real Application Clusters Installation Guide g Release 2 (.2) for Solaris Operating System Part Number B-. Oracle Database Installation Guide g Release 2 (.2) for Solaris Operating System (SPARC -Bit) Part Number B-The Hardware:Two Ultra-2 Enterprise servers. cpu:MHz x 2, memory:mb. storage:Sun A disk arrayA Sun fiber channel host adapter(XA) is installed on each node to connect to the Awith a fiber cable. A Sun multi-pack is connected to one of the Ultra-2 servers.A BT network card is installed on each node for the private network.A crossover network cable connects the two BT network cards.(Oracle does not support the crossover network cable, according to doc 2)A SBUS Frame Buffer (XA) is installed on both nodes.Because the hardware is barely meet the requirement, it is only good for testing.The OS:Install Solaris9 4/(-Bit) on both nodes, and install the latest patch cluster.Configure Tcpwrappers and NTP the two nodes. Solaris9 includes these two packages.Install openssh-4.3p2-sol9-sparc-local on the two nodes.Secure and harden the systems by following some procedures in the docSANS Solaris Security Step by Step Version 2.0: ... actices/solaris.pdfThe Media for Installation: Oracle Database g Release2 .2.0.1.0 for Solaris SPARC -bit Enterprise EditionIf possible, download .2.0.2 and up, so you will install less patches afterwards.I have to copy the two DVDs to local hard disks, since the Ultra-2 does not have a DVD drive.You might want to configure a NFS server on node1 and an auto client on node2,so you can run the Cluster Verification Utility on node2 as well.The steps of the installation/configuration:1. Do the pre-installation tasks2. Install Oracle clusterweare3. Test/verify the clusterware4. Install Oracle Database software only with RAC.5. Configure ASM and make sure it is running on both nodes.6. Create a RAC database with DBCA.Disk & shared storage configuration:----------------------------------------------------------------------------------------------------------packages required real type mount point partition----------------------------------------------------------------------------------------------------------DB software 4GB 4GB UFS /u/app/oracle c0t1d0s0 (not shared)DB datafiles 1.2GB GB ASM c3t0d2s7,c3t1d2s7,c3t3d2s7OCR MB MB raw c3t0d4s6,c3t2d4s6,c3t4d4s6Voting disk MB MB raw c3t0d4s7,c3t2d4s7,c3t4d4s7swap MB 1GB c0t0d0s1----------------------------------------------------------------------------------------------------------The clusterware will be installed in it's own home directory on node1.The redundancy level of OCR and voting disk will be "normal".Because this is for testing only, no space allocated for flash recovery and log archiving.
Pre-Installation TasksA.Network configurationThis part is done manually. Here is the files on node1 as an example:/etc/hosts.0.0.1 localhost # node..1. rac1 rac1.abc.com loghost...1 rac1-priv rac1-priv.abc.com..1. rac1-vip rac1-vip.abc.com# node..1. rac2 rac2.abc.com...2 rac2-priv rac2-priv.abc.com..1. rac2-vip rac2-vip.abc.com/etc/inet/netmasks..0.0 ......0 ...0/etc/hostname.hme0rac1/etc/hostname.le...1/etc/defaultrouter..1.1/etc/hosts.allowALL: ..1. .0.0.1 . Run these commands to bring up the network interface le0 and test it.# chown root:root /etc/hostname.le0# ifconfig le0 plumb# ifconfig le0 ...1 netmask ...0 up# ifconfig -alo0: flags=<UP,LOOPBACK,RUNNING,MULTICAST,IPv4> mtu index 1 inet .0.0.1 netmask ffhme0: flags=<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu index 2 inet ..1. netmask ffffff broadcast ..1. ether 8:0::::d4le0: flags=<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu index 3 inet ...1 netmask ffffff broadcast ... ether 8:0::::d4#To check the network setup, run the CVU now or run it after all tasks is done.The command is:/ora.dvd2/clusterware/cluvfy/runcluvfy.sh comp nodecon -n rac1,rac2 -verboseB.Other pre-installation tasks except Configuring SSHA shell script is created for doing most of the tasks: pre.install.ora.conf.shThe script will do the pre-installation tasks of the clusterware and most of thepre-installation tasks of the Oracle database. It is only to run on a new installationof a Solaris 9 system. Run this script on both nodes as root.pre.install.ora.conf.sh------------------------------------------------------------#!/bin/sh# Pre-installation conf. on Solaris9 for installing Oracle g R2 with RAC.# Written by susbin@chinaunix.net sc_name=pre.install.ora.conf.shORACLE_BASE=/u/app/oracle; export ORACLE_BASECRS_BASE=/u/crs/oracle/product/; export CRS_BASEORACLE_HOME=${CRS_BASE}/app; export ORACLE_HOMEPATH=$PATH:/usr/ccs/bin:/usr/local/bin; export PATHecho ===============================================================echo $sc_name started at `date`.echo " "echo " "echo "=============================================="echo "Creating Required Operating System Groups and Users"echo " "echo "Creating groups: dba, osdba, and oinstall."groupadd -g dbagroupadd -g oinstallgroupadd -g osdbaecho "Check them with the command: grep /etc/group"grep /etc/groupecho " "echo "Check if "nobody" exists on the system with: id nobody"echo ""id -a nobodyecho " "echo "Creating the directory "ORACLE_BASE", which is set to $ORACLE_BASE"mkdir -p $ORACLE_BASEecho "Check it with the command: ls -l /u/app "echo ""ls -l /u/appecho " "echo "Creating a user account "oracle" and set the password of it:"useradd -u -g -G , -d $ORACLE_BASE -m -s /bin/ksh oracleecho "Check the line in /etc/passwd with: grep oracle /etc/passwd"grep oracle /etc/passwdecho "Set the password of account oracle:"passwd -r files oraclechown -R oracle install ${ORACLE_BASE}chmod -R $ORACLE_BASEecho " "echo "Check if the oracle account has required groups with: id -a oracle "echo " "id -a oracleecho " "echo " "echo "=============================================="echo "Configuring Kernel Parameters"echo " "echo "Save a copy of /etc/system and append eleven lines to it."echo "Need to reboot the system so the new parameters can take effect."cp -p /etc/system /etc/system.origchmod /etc/system/bin/cat << EOF >> /etc/systemset noexec_user_stack=1set semsys:seminfo_semmni=set semsys:seminfo_semmns=set semsys:seminfo_semmsl=set semsys:seminfo_semvmx=set shmsys:shminfo_shmmax=set shmsys:shminfo_shmmin=1set shmsys:shminfo_shmmni=set shmsys:shminfo_shmseg=EOFecho " "echo "Check /etc/system with the command: tail - /etc/system"tail - /etc/systemecho " "echo " "echo "=============================================="echo "Identifying Required Software Directories"echo "ORACLE_BASE is set to $ORACLE_BASE, and the size of it should be 3GB or bigger."echo "Check it with the command: $ df -h $ORACLE_BASE"echo " "mount /dev/dsk/c0t1d0s0 $ORACLE_BASEdf -h $ORACLE_BASEecho " "echo " "echo "=============================================="echo "Configuring the Oracle User's Environment"/bin/cat << EOF > ${ORACLE_BASE}/.profileif [ -t 0 ]; then stty intr ^Cfiumask ORACLE_BASE=/u/app/oracle; export ORACLE_BASE# for crsCRS_BASE=/u/crs/oracle/product/; export CRS_BASEORACLE_HOME=${CRS_BASE}/app; export ORACLE_HOMEPATH=$PATH:/usr/local/bin:.:/bin:/usr/sbin:/usr/ucb; export PATH# end of crs# for oraDB#ORACLE_SID=rac1; export ORACLE_SID# end of oraDBEDITOR=vi; export EDITOREXINIT='set nu showmode'; export EXINITEOFchown -R oracle install ${ORACLE_BASE}echo " "echo " "echo "=============================================="echo "Configuring oracle clusterware home directory, which is set to"echo " ${CRS_BASE}/crs "mkdir -p ${CRS_BASE}/crs chown -R root install /u/crschmod -R /u/crs/oracleecho " "ls -l $CRS_BASEecho ""echo "=============================================="echo "Configuring UDP parameters by creating a Sndd and put it under"echo "/etc/rc2.d to set the two values of ndd to ."echo " "/bin/cat << EOF > /etc/rc2.d/Sndd#!/sbin/shPATH=/usr/sbin;export PATHndd -set /dev/udp udp_recv_hiwat ndd -set /dev/udp udp_xmit_hiwat exit 0EOFchown root:sys /etc/rc2.d/Snddchmod /etc/rc2.d/Snddecho "Check the Sndd with "ls -l Sndd" and "cat Sndd" "echo " "ls -l /etc/rc2.d/Snddecho " "cat /etc/rc2.d/Snddecho " "echo "=============================================="echo "Verify that the /etc/hosts file is used for name resolution"echo "with the command: grep hosts: /etc/nsswitch.conf | grep files "echo " "grep hosts: /etc/nsswitch.conf | grep filesecho ""echo "=============================================="echo "Verify that the host name has been set with: hostname"echo " "hostnameecho ""echo "=============================================="echo "Verify that the domain name has NOT been set with: domainname"echo " "domainnameecho ""echo "=============================================="echo "Verify that the hosts file contains the fully qualified host name"echo "with the command: grep `eval hostname` /etc/hosts "echo " "grep `eval hostname` /etc/hostsecho " "echo "The pre-installation configuring tasks is done on this node."echo "Reboot the system so the new parameters can take effect."echo " "echo $sc_name ended at `date`.echo ===============================================================------------------------------------------------------------Check the current values of Kernel Parameters after rebooted the system.Login as user oracle, and then run the commands on all nodes:/usr/sbin/sysdef | grep SEM/usr/sbin/sysdef | grep SHMCheck the env variables of oracle account for installing the Clusterware:$ env | grep ORACLEORACLE_BASE=/u/app/oracleORACLE_HOME=/u/crs/oracle/product//crs$C.Configuring SSH on All Cluster NodesThe ssh of Solaris9 is a Sun_SSH_1.1, which has a bug. Here is the discussion about it: instructions of configuring SSH in doc 2 is based on OpenSSH V.3.x. The doc 2 alsopoints out that Oracle NetCA and DBCA require scp and ssh to be located in the path/usr/local/bin. For these reasons, I choose to install openssh-4.3p2-sol9-sparc-localon the two nodes. Also need to set the value of "StrictModes" to "no" in/usr/local/etc/sshd_config, or the ssh will prompt for a pasword even all configurationtasks of shh has done.Two scripts are created for configuring ssh. Here is the instruction on how to run them:1. Put ssh.conf1.ksh under the home directory of user oracle on all nodes.2. Run ssh.conf1.ksh on node1.3. Make changes of ssh.conf1.ksh on node2 and then run it.4. Run ssh.conf2.ksh on node1.5. Run command on all nodes: chmod .ssh/authorized_keys6. Test the configuration on all nodes. The command is: ssh node1 [node2] datessh.conf1.ksh------------------------------------------------------------#!/bin/ksh# Run this script as user oracle on node1, and then on node2.# Make sure the package ssh is installed under /usr/local.# Written by susbin@chinaunix.net # Put the hostname of the two nodes belownode1=rac1node2=rac2sc_name=ssh.conf1.kshhome_dir=/u/app/oraclekey_dir=${home_dir}/.sshssh_base=/usr/local/binecho ================================================================echo $sc_name started at `date`.echo " "echo "You need to run this script on $node1 and $node2."echo "Make changes on this script before you run it on $node2."echo " "/bin/rm -r $key_dir/bin/mkdir $key_dir/bin/chmod $key_dir${ssh_base}/ssh-keygen -t rsaecho " "${ssh_base}/ssh-keygen -t dsa/bin/touch ${key_dir}/authorized_keysecho " "echo "Now save the keys into the file authorized_keys."echo " "## comment out the lines when you run it on node2.${ssh_base}/ssh $node1 cat ${key_dir}/id_rsa.pub >> ${key_dir}/authorized_keys${ssh_base}/ssh $node1 cat ${key_dir}/id_dsa.pub >> ${key_dir}/authorized_keys## end of the lines## uncomment the lines below when you run it on node2.#${ssh_base}/ssh $node2 cat ${key_dir}/id_rsa.pub >> ${key_dir}/authorized_keys#${ssh_base}/ssh $node2 cat ${key_dir}/id_dsa.pub >> ${key_dir}/authorized_keys#${ssh_base}/ssh $node1 cat ${key_dir}/id_rsa.pub >> ${key_dir}/authorized_keys#${ssh_base}/ssh $node1 cat ${key_dir}/id_dsa.pub >> ${key_dir}/authorized_keys#${ssh_base}/scp ${key_dir}/authorized_keys ${node1} {key_dir}## end of the linesecho " "echo "It is done."echo " "echo $sc_name ended at `date`.echo ==============================================================ssh.conf2.ksh------------------------------------------------------------#!/bin/ksh# Run this script after you have run ssh.conf1.ksh on both nodes.# Run this script as user oracle on node1 only.# Written by susbin@chinaunix.net # Put the hostname of the two nodes belownode1=rac1node2=rac2sc_name=ssh.conf2.kshhome_dir=/u/app/oraclekey_dir=${home_dir}/.sshssh_base=/usr/local/binecho ===========================================================echo $sc_name started at `date`.echo " "echo "You only need to run this script on $node1."echo " "${ssh_base}/ssh $node2 cat ${key_dir}/id_rsa.pub >> ${key_dir}/authorized_keys${ssh_base}/ssh $node2 cat ${key_dir}/id_dsa.pub >> ${key_dir}/authorized_keys${ssh_base}/scp ${key_dir}/authorized_keys ${node2} {key_dir}echo " "echo "You need to run command "/bin/chmod ${key_dir}/authorized_keys" "echo "on all nodes and then test the ssh configuration with command "echo " "ssh node1 [node2] date " "echo " "echo $sc_name ended at `date`.echo ============================================================echo " "exec ${ssh_base}/ssh-agent $SHELL${ssh_base}/ssh-add## The command "exec ${ssh_base}/ssh-agent $SHELL" will spawn a sub-shell.## and the rest of your login session will runs within this subshell.## end of ssh.conf2.ksh---------------------------------------------------------------D.Configuring clusterware and database storage (ASM installation)After installed the host adapter(XA) on both nodes, run command "format" on themto make sure the shared disks have the same controller number on both nodes.Format the disks on node1. For disks used by ASM, create a single whole-disk slice,starting at cylinder 1, or the ASM will NOT recognize these disks as ASM candidates.# format...selecting c3t0d2[disk formatted]format>...Free Hog partition[6]? 7Enter size of partition '0' [0b, 0c, 0.mb, 0.gb]: 1cEnter size of partition '1' [0b, 0c, 0.mb, 0.gb]: 0Enter size of partition '3' [0b, 0c, 0.mb, 0.gb]: 0Enter size of partition '4' [0b, 0c, 0.mb, 0.gb]: 0Enter size of partition '5' [0b, 0c, 0.mb, 0.gb]: 0Enter size of partition '6' [0b, 0c, 0.mb, 0.gb]: 0partition> pCurrent partition table (sun4g):Total disk cylinders available: + 2 (reserved cylinders)Part Tag Flag Cylinders Size Blocks 0 unassigned wm 0 - 0 1.MB (1/0/0) 1 unassigned wu 0 0 (0/0/0) 0 2 backup wu 0 - 4.GB (/0/0) 3 unassigned wu 0 0 (0/0/0) 0 4 unassigned wu 0 0 (0/0/0) 0 5 unassigned wu 0 0 (0/0/0) 0 6 unassigned wm 0 0 (0/0/0) 0 7 unassigned wu 1 - 4.GB (/0/0) partition>Okay to make this the current partition table[yes]? yes...#Copy the partition table from c3t0d2 to other disks.# for disks in c3t1d2s0 c3t3d2s0> do> prtvtoc /dev/rdsk/c3t0d2s0 | fmthard -s - /dev/rdsk/$disks> donefmthard: New volume table of contents now in place.fmthard: New volume table of contents now in place.#Format the disks for OCR and voting disks. It is a good idea to put them on sloce 3-7.The slice 0 is not a good candidate.# format...selecting c3t0d4[disk formatted]...partition> pCurrent partition table (sun2g):Total disk cylinders available: + 2 (reserved cylinders)Part Tag Flag Cylinders Size Blocks 0 unassigned wm 0 - 1.GB (/0/0) 1 unassigned wu 0 0 (0/0/0) 0 2 backup wu 0 - 1.GB (/0/0) 3 unassigned wu 0 0 (0/0/0) 0 4 unassigned wu 0 0 (0/0/0) 0 5 unassigned wu 0 0 (0/0/0) 0 6 unassigned wm - .MB (/0/0) 7 unassigned wu - .MB (/0/0) partition> q...## prtvtoc /dev/rdsk/c3t0d4s0 | fmthard -s - /dev/rdsk/c3t2d4s2fmthard: New volume table of contents now in place.# prtvtoc /dev/rdsk/c3t0d4s0 | fmthard -s - /dev/rdsk/c3t4d4s2fmthard: New volume table of contents now in place.#On all nodes, set the owner, group and permissions on the raw devices, which are theslices for ASM, OCR and voting disks.# cd /# for rawdevs in c3t0d2s7,c3t1d2s7,c3t3d2s7 > c3t0d4s6 c3t2d4s6 c3t4d4s6 c3t0d4s7 c3t2d4s7 c3t4d4s7> do> echo $rawdevs; chown oracle:dba /dev/rdsk/$rawdevs; chmod /dev/rdsk/$rawdevs> ls -l `ls -l /dev/rdsk/$rawdevs | awk -F" " '{ print $ }'`> donec3t0d2s7crw-rw---- 1 oracle dba , Jul : ../../devices/sbus@1f,0/SUNW,soc@0,0/SUNW,pln@a,ee9/ssd@1,2:h,rawc3t1d2s7crw-rw---- 1 oracle dba , Jul : ../../devices/sbus@1f,0/SUNW,soc@0,0/SUNW,pln@a,ee9/ssd@3,0:h,rawc3t3d2s7crw-rw---- 1 oracle dba , Jul : ../../devices/sbus@1f,0/SUNW,soc@0,0/SUNW,pln@a,ee9/ssd@3,2:h,rawc3t0d4s6crw-rw---- 1 oracle dba , Aug 9 : ../../devices/sbus@1f,0/SUNW,soc@0,0/SUNW,pln@a,ee9/ssd@0,4:g,rawc3t2d4s6crw-rw---- 1 oracle dba , Aug : ../../devices/sbus@1f,0/SUNW,soc@0,0/SUNW,pln@a,ee9/ssd@2,4:g,rawc3t4d4s6crw-rw---- 1 oracle dba , Jul : ../../devices/sbus@1f,0/SUNW,soc@0,0/SUNW,pln@a,ee9/ssd@4,4:g,rawc3t0d4s7crw-rw---- 1 oracle dba , Aug : ../../devices/sbus@1f,0/SUNW,soc@0,0/SUNW,pln@a,ee9/ssd@0,4:h,rawc3t2d4s7crw-rw---- 1 oracle dba , Aug : ../../devices/sbus@1f,0/SUNW,soc@0,0/SUNW,pln@a,ee9/ssd@2,4:h,rawc3t4d4s7crw-rw---- 1 oracle dba , Aug : ../../devices/sbus@1f,0/SUNW,soc@0,0/SUNW,pln@a,ee9/ssd@4,4:h,raw#On node1, run CVU to check if all shared disks are available across all nodes.$ cd /ora.dvd2/clusterware/cluvfy$ ./runcluvfy.sh comp ssa -n rac1,rac2 -s > /dev/rdsk/c3t0d2s7,/dev/rdsk/c3t1d2s7,/dev/rdsk/c3t3d2s7> /dev/rdsk/c3t0d4s6,/dev/rdsk/c3t2d4s6,/dev/rdsk/c3t4d4s6> /dev/rdsk/c3t0d4s7,/dev/rdsk/c3t2d4s7,/dev/rdsk/c3t4d4s7Verifying shared storage accessibilityChecking shared storage accessibility..."/dev/rdsk/c3t0d2s7" is shared."/dev/rdsk/c3t1d2s7" is shared."/dev/rdsk/c3t3d2s7" is shared."/dev/rdsk/c3t0d4s6" is shared."/dev/rdsk/c3t2d4s6" is shared."/dev/rdsk/c3t4d4s6" is shared."/dev/rdsk/c3t0d4s7" is shared."/dev/rdsk/c3t2d4s7" is shared."/dev/rdsk/c3t4d4s7" is shared.Shared storage check was successful on nodes "rac2,rac1".Verification of shared storage accessibility was successful.$Pre-installation tasks are done. The next step is to install Oracle clusterware.
solaris/linux 增加swap交换空间的方法 linux临时增加swap空间:step1:#ddif=/dev/zeroof=/home/swapbs=count=注释:of=/home/swap,放置swap的空间;count的大小就是增加的swap空间的大小,就是块大小,
Solaris系统上Mount(挂载) NTFS / FAT / FAT / EXT2 / EXT3文件系统 这是个在OpenSolaris的论坛中经常会被问到的问题。其解决方法如下。需要注意的是,Mount后NTFS/EXT2/EXT3只能读。下载并安装如下软件包FSWpart-打印分区表信
solaris系统配置文件说明 etc/bootparams从网络客户机的配置文件/etc/cron.d/cron.allow/etc/cron.d/cron.deny用于对crontab进行访问控制./etc/defaultdomainNIS域名设置文件/etc/default/cron对cron的log进行
标签: solaris安装软件包
本文链接地址:https://www.jiuchutong.com/biancheng/354246.html 转载请保留说明!友情链接: 武汉网站建设