资深Oracle数据库专家 OCM认证大师 10年数据库相关服务及开发经验 各类数据库相关方案的编写,管理及实施 数据中心数据库日常运维、大型项目割接、性能优化等方面有丰富的实战经验 客户包括: 电信,银行,保险,航空,国网,汽车,烟草等 想要一起学习探讨数据安全技术的请加qq群 256041954
全部博文(163)
分类: Oracle
2015-03-04 17:25:38
Oracle 12C RAC安装(4节点) --(Flex ASM、FLEX CLUSTER,GNS版)-- --包括DHCP和DNS安装(配置)-- --2013-09-11-- 注:匆匆整理出来的!!! 废话:Oracle12C推出不久,还是禁不住想尝试一下12C,于是网购了一台8G内存,把台式机的内存加到12G,构建了4个节点的集群,共用了5个虚拟机,还好,我的台式机兄弟勉强扛下来了,谢谢!!! 1.1 安装环境 数据库版本 :Oracle 12c release 1 操作系统版本:CentOS6(2.6.32) 虚拟机 :virtual Box 4.2.16 域名是:taryartar.com 子域名是:zero.taryartar.com 每台机器本地存储:/taryartar/12c,用于安装GI和数据库软件,空间要大,推荐30G以上。 注:/taryartar/12c不共享 数据的名字 :tar ASM实例的名字 :+ASM1,+ASM2,+ASM3,+ASM4 数据库实例的名字:tar1,tar2,tar3,tar4 本机IP用/etc/hosts进行解析 [root@rac4 12c]# cat/etc/hosts 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 192.168.0.51 rac1.taryartar.com rac1 192.168.0.52 rac2.taryartar.com rac2 192.168.0.53 rac3.taryartar.com rac3 192.168.0.54 rac4.taryartar.com rac4 1.2 DHCP配置(在192.168.0.88) [root@mydnsCentOS]# rpm -ivh dhcp* warning: dhcp-3.0.5-31.el5.x86_64.rpm:Header V3 DSA/SHA1 Signature, key ID e8562897: NOKEY Preparing... ########################################### [100%] 1:dhcp ########################################### [ 20%] 2:dhcpv6-client ########################################### [ 40%] 3:dhcpv6 ########################################### [ 60%] 4:dhcp-devel ########################################### [ 80%] 5:dhcp-devel ########################################### [100%] [root@mydns CentOS]# cp/usr/share/doc/dhcp*/dhcpd.conf.sample /etc/dhcpd.conf cp: overwrite `/etc/dhcpd.conf'? yes [root@mydns CentOS]# service dhcpdrestart Starting dhcpd: [ OK ] [root@mydns CentOS]# chkconfigdhcpd on [root@mydns CentOS]# chkconfig--list dhcpd dhcpd 0:off 1:off 2:on 3:on 4:on 5:on 6:off 修改DHCP配置文件,修改后的最终的配置文件如下所示: [root@mydnsnamed]# cat /etc/dhcpd.conf ddns-update-style interim; ignore client-updates; subnet 192.168.0.0 netmask 255.255.255.0 { # --- default gateway option routers 192.168.0.1; option subnet-mask 255.255.255.0; option nis-domain "zero.taryartar.com"; option domain-name "zero.taryartar.com"; option domain-name-servers 192.168.0.88; option time-offset -18000; # Eastern Standard Time # option ntp-servers 192.168.0.88; # option netbios-name-servers 192.168.0.1; # --- Selects point-to-point node (defaultis hybrid). Don't change this unless # -- you understand Netbios very well # option netbios-node-type 2; range dynamic-bootp 192.168.0.61 192.168.0.76; default-lease-time 21600; max-lease-time 43200; # we want the nameserver to appear at a fixed address host ns { next-server marvin.redhat.com; hardware ethernet12:34:56:78:AB:CD; fixed-address 207.175.42.254; } } 1.3 DNS(Bind)配置(在192.168.0.88) 安装DNS yum install bind-libs bindbind-utils 启动DNS SERVER # service named start Starting named: [ OK ] # 设置启动级别 chkconfig named on DNS的配置文件和区域文件如下: [root@mydns ~]# cat /etc/named.conf options { directory "/var/named"; // Base directory for named allow-transfer {"none";}; // Slave serves that can pull zone transfer. Ban everyone by default }; zone "." IN { typehint; file"named.ca"; }; include "/etc/named.rfc1912.zones"; zone "0.168.192.IN-ADDR.ARPA." IN { //Reverse zone. typemaster; notifyno; file"192.168.0.db"; }; zone "taryartar.com." IN { typemaster; notifyno; file"taryartar.com.db"; }; [root@mydns ~]# [root@mydns named]# cat /var/named/taryartar.com.db $TTL 1H ; Time to live $ORIGIN taryartar.com. @ IN SOA mydns root.taryartar.com. ( 2013011201 ; serial (todays date + todays serial #) 3H ; refresh 3 hours 1H ; retry 1 hour 1W ; expire 1 week 1D ) ; minimum 24 hour @ IN NS mydns ; IN A 192.168.0.88 mydns IN A 192.168.0.88 gnsvip IN A 192.168.0.89 rac1 IN A 192.168.0.51 rac2 IN A 192.168.0.52 rac3 IN A 192.168.0.53 rac4 IN A 192.168.0.54 rac1-priv1 IN A 10.0.10.1 rac1-priv2 IN A 10.0.10.2 rac2-priv1 IN A 10.0.10.3 rac2-priv2 IN A 10.0.10.4 rac3-priv1 IN A 10.0.10.5 rac3-priv2 IN A 10.0.10.6 rac4-priv1 IN A 10.0.10.7 rac4-priv2 IN A 10.0.10.8 ; $ORIGIN zero.taryartar.com. zero.taryartar.com. IN NS gnsvip.zero.taryartar.com. [root@mydns named]# cat /var/named/192.168.0.db $TTL 1H @ IN SOA mydns root.taryartar.com. ( 2013011201 ; serial (todays date + todays serial #) 3H ; refresh 3 hours 1H ; retry 1 hour 1W ; expire 1 week 1D ) ; minimum 24 hour ; NS mydns.taryartar.com. 88 IN PTR mydns.taryartar.com. 89 IN PTR gnsvip.taryartar.com. ; reverse mappingfor GNS 51 INPTR rac1.taryartar.com. 52 INPTR rac2.taryartar.com. 53 INPTR rac3.taryartar.com. 54 INPTR rac4.taryartar.com. 1 INPTR rac1-priv1.taryartar.com. 2 INPTR rac1-priv2.taryartar.com. 3 INPTR rac2-priv1.taryartar.com. 4 INPTR rac2-priv2.taryartar.com. 5 INPTR rac3-priv1.taryartar.com. 6 INPTR rac3-priv2.taryartar.com. 7 INPTR rac4-priv1.taryartar.com. 8 INPTR rac4-priv2.taryartar.com. 配置DNS客户端(每台机器) [oracle@rac4 db_home]$ cat /etc/resolv.conf options attempts: 2 options timeout: 1 search zero.taryartar.comtaryartar.com nameserver 192.168.0.88 nameserver 192.168.0.89 确保每个主机名(域名)都要能解析成正确的IP地址 [root@mydns named]# nslookup rac1.taryartar.com Server: 192.168.0.88 Address: 192.168.0.88#53 Name: rac1.taryartar.com Address: 192.168.0.51 1.4 创建用户和组,并创建相应目录 groupadd -g 1000 oinstall groupadd -g 1031 dba groupadd -g 1032 asmdba useradd -u 1101-g oinstall -G dba, asmdba oracle useradd -u 1100 -g oinstall -G asmdba grid mkdir -p/taryartar/12c/grid_base mkdir -p /taryartar/12c/grid_home mkdir -p /taryartar/12c/db_base/db_home chown -R grid:oinstall/taryartar/12c/grid_base chown -R grid:oinstall/taryartar/12c/grid_home chown -R oracle:oinstall /taryartar/12c/db_base chmod -R 775 /taryartar/12c/db_base chmod -R 775 /taryartar/12c/grid_base chmod -R 775 /taryartar/12c/grid_home 1.5 系统配置和准备 [root@mydns named]# uname -a Linux mydns.taryartar.com2.6.32-71.el6.x86_64 #1 SMP Fri May 20 03:51:51 BST 2011 x86_64 x86_64 x86_64GNU/Linux [root@mydns named]# [root@rac4 12c]# lsb_release -a LSB Version: :base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch Distributor ID:CentOS Description: CentOS release 6.4 (Final) Release: 6.4 Codename: Final 查看物理内存,物理内存要4G以上(只是Oracle的推荐而已,实验环境要求没那么高) [root@rac1 12c]# grep MemTotal/proc/meminfo MemTotal: 2225780 kB 查看内存文件系统 [root@rac1 ~]# df -h Filesystem Size Used Avail Use% Mounted on /dev/mapper/VolGroup00-LogVol00 5.8G 3.8G 1.7G 70% / /dev/sda1 99M 13M 81M 14% /boot tmpfs 1.1G 0 1.1G 0% /dev/shm /dev/sdb1 16G 173M 15G 2% /taryartar/12c [root@rac4 ~]# cat /etc/fstab # # /etc/fstab # Created byanaconda on Sat Jul 6 18:35:04 2013 # # Accessiblefilesystems, by reference, are maintained under '/dev/disk' # See man pagesfstab(5), findfs(8), mount(8) and/or blkid(8) for more info # /dev/mapper/VolGroup-lv_root/ ext4 defaults 1 1 UUID=dd4e5ea6-ce44-4a3b-af4c-dd8505d1800c/boot ext4 defaults 1 2 /dev/mapper/VolGroup-lv_swapswap swap defaults 0 0 devpts /dev/pts devpts gid=5,mode=620 0 0 sysfs /sys sysfs defaults 0 0 proc /proc proc defaults 0 0
tmpfs /dev/shm tmpfs defaults,size=1100m 0 0 /dev/sdb1 /taryartar/12c ext3 async,defaults 1 1 #/dev/sdd1 /ocfs1ocfs2 datavolume,nointr,_netdev,defaults 0 0 #/dev/sde1 /ocfs2ocfs2 datavolume,nointr,_netdev,defaults 0 0 /dev/cdrom /myCDROM/a iso9660 ro,user,auto 0 0 /dev/cdrom-hda /myCDROM/b iso9660 ro,user,auto 0 0 /dev/cdrom-hda /myCDROM/c iso9660 ro,user,auto 0 0 如果内存文件系统太小,需要进行修改 [root@rac1 ~]# umount /dev/shm [root@rac1 ~]# sed -i"s/1100m/1800m/" /etc/fstab [root@rac1 ~]# mount /dev/shm 修改后的内存文件系统大小 [root@rac1 ~]# df -h Filesystem Size Used Avail Use% Mounted on /dev/mapper/VolGroup00-LogVol00 5.8G 3.8G 1.7G 70% / /dev/sda1 99M 13M 81M 14% /boot /dev/sdb1 16G 173M 15G 2% /taryartar/12c tmpfs 1.8G 0 1.8G 0% /dev/shm [root@mydns ~]# free -g total used free shared buffers cached Mem: 2 0 2 0 0 0 -/+ buffers/cache: 0 2 Swap: 2 0 2 查看SWAP的大小 [root@rac1 ~]# grep SwapTotal/proc/meminfo SwapTotal: 2588664 kB swap space:要求是物理内存的2倍 至少要有1G的临时空间(最好大一些,不要太吝啬) [root@mydns ~]# df -h /tmp Filesystem Size Used Avail Use% Mounted on /dev/mapper/vg_nod1-lv_root 29G 13G 16G 44% / 查看并安装如下的包(当前版本或者更高版本): binutils-2.20.51.0.2-5.11.el6(x86_64) compat-libcap1-1.10-1(x86_64) compat-libstdc++-33-3.2.3-69.el6(x86_64) compat-libstdc++-33-3.2.3-69.el6.i686 gcc-4.4.4-13.el6(x86_64) gcc-c++-4.4.4-13.el6(x86_64) glibc-2.12-1.7.el6(i686) glibc-2.12-1.7.el6(x86_64) glibc-devel-2.12-1.7.el6(x86_64) glibc-devel-2.12-1.7.el6.i686 ksh libgcc-4.4.4-13.el6(i686) libgcc-4.4.4-13.el6(x86_64) libstdc++-4.4.4-13.el6(x86_64) libstdc++-4.4.4-13.el6.i686 libstdc++-devel-4.4.4-13.el6(x86_64) libstdc++-devel-4.4.4-13.el6.i686 libaio-0.3.107-10.el6(x86_64) libaio-0.3.107-10.el6.i686 libaio-devel-0.3.107-10.el6(x86_64) libaio-devel-0.3.107-10.el6.i686 libXext-1.1 (x86_64) libXext-1.1 (i686) libXtst-1.0.99.2 (x86_64) libXtst-1.0.99.2 (i686) libX11-1.3 (x86_64) libX11-1.3 (i686) libXau-1.0.5 (x86_64) libXau-1.0.5 (i686) libxcb-1.5 (x86_64) libxcb-1.5 (i686) libXi-1.3 (x86_64) libXi-1.3 (i686) make-3.81-19.el6 sysstat-9.0.4-11.el6 (x86_64) 注:最讨厌的事情莫过于安装RPM包,推荐使用YUM,否则........ 查看包是否安装 [root@rac1 ~]# rpm -q libX11-1.0.3 安装包 [root@rac1 ~]# rpm -UvhlibX11-1.0.3 如果使用NASdevices or NFS mounts, 要启用 Name Service Cache Daemon (nscd).这个服务能够更好地容忍网络失败 检查启动级别的设置 [root@rac1 yum.repos.d]# chkconfig--list nscd nscd 0:off 1:off 2:off 3:off 4:off 5:off 6:off 设置启动级别 [root@rac1 yum.repos.d]# chkconfig--level 35 nscd on 启动该进程 [root@rac1 yum.repos.d]# servicenscd start Starting nscd: [ OK ] 查看进程状态 [root@rac1 yum.repos.d]# servicenscd status nscd (pid 3317) is running... []# 关闭防火墙 root@rac4 ~]# service iptables stop [root@rac4 ~]# chkconfig iptablesoff root@rac4 ~]# service ip6tablesstop [root@rac4 ~]# chkconfig ip6tablesoff 对RAC来说,讨厌的防火墙! 有时候,远程节点会关闭SSH的连接,为了防止这种情况发生,需要修改配置文件sshd_config /etc/ssh/sshd_config LoginGraceTime 0 “LoginGraceTime”设置如果用户不能成功登录,在切断连接之前服务器需要等待的时间(以秒为单位) ====禁用安全的LINUX(secure linux,SELINUX) SELinux 的不正确配置会影响网络 Disable secure linux by editing the"/etc/selinux/config" file enforcing -SELinux security policy is enforced.代表记录警告且阻止可疑行为 permissive -SELinux prints warnings instead of 代表仅记录安全警告但不阻止可疑行为 disabled - SELinux is fullydisabled.SELinux 被禁用 SELINUXTYPE的设置 targeted 代表仅针对预制的几种网络服务和访问请求使用 SELinux 保护, strict 代表所有网络服务和访问请求都要经过 SELinux。 编辑文件/etc/selinux/config 设置 SELINUX=disabled 查看系统当前的安全策略 [grid@rac1 ~]$ sestatus SELinux status: disabled [grid@rac1 ~]$getenforce Disabled 动态改变SELinux运行状态 Enforcing=1 Permissive=0 [grid@rac1~]$setenforce [ Enforcing | Permissive | 1 | 0 ] ===设置环境变量==== 1.显示使用哪个SHELL [oracle@rac1 ~]$ echo $SHELL /bin/bash 2.修改启动文件,或者配置文件 Bash shell (bash): $ vi .bash_profile Bourne shell (sh) or Korn shell (ksh): $ vi .profile C shell (csh or tcsh): % vi .login sudo su - grid vi .bash_profile ##在节点1:为用户“grid”设置环境变量 [grid@rac1grid_home]$ cd [grid@rac1~]$ pwd /home/grid [grid@rac1 ~]$ cat .bash_profile # .bash_profile # Get the aliases and functions if [ -f ~/.bashrc ]; then . ~/.bashrc fi # User specific environment and startupprograms PATH=$PATH:$HOME/bin export PATH export ORACLE_SID=+ASM1 exportORACLE_BASE=/taryartar/12c/grid_base exportORACLE_HOME=/taryartar/12c/grid_home export GRID_HOME=$ORACLE_HOME export ORACLE_TERM=xterm export TMP=/tmp export TMPDIR=$TMP PATH=$PATH:$HOME/bin exportPATH=/usr/sbin:$PATH:$ORACLE_HOME/bin:$PATH exportLD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib exportCLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib export ORACLE_HOSTNAME=rac1.taryartar.com export DB_UNIQUE_NAME=tar export CVUQDISK_GRP=oinstall umask 022 cd $ORACLE_HOME ##在节点1:为用户“oracle”设置环境变量 [oracle@rac1~]$ cat .bash_profile # .bash_profile # Get the aliases and functions if [ -f ~/.bashrc ]; then . ~/.bashrc fi # User specific environment and startupprograms PATH=$PATH:$HOME/bin exportORACLE_BASE=/taryartar/12c/db_base exportORACLE_HOME=$ORACLE_BASE/db_home export ORACLE_SID=tar1 export ORACLE_OWNER=oracle export ORACLE_TERM=vt100 exportPATH=$PATH:$ORACLE_HOME/bin:$HOME/bin exportPATH=$ORACLE_HOME/bin:$ORACLE_HOME/Apache/Apache/bin:$PATH export BASE_PATH=/usr/sbin:$PATH; exportBASE_PATH export PATH=$ORACLE_HOME/bin:$BASE_PATH LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib:/usr/local/lib export LD_LIBRARY_PATH CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib CLASSPATH=$CLASSPATH:$ORACLE_HOME/network/jlib export CLASSPATH export ORACLE_HOSTNAME=rac1.taryartar.com export DB_UNIQUE_NAME=tar export CVUQDISK_GRP=oinstall umask 022 cd $ORACLE_HOME 请按照上面的规则设置其它节点上grid和oracle用户的环境变量。 在启动图形界面之前,请多花一点时间设置好环境变量!!! 注:有些命令要在root下执行,所以所有的安装结束后,最好也设置一下相应路径。 设置内核参数,设置后的结果如下 [root@rac1 ~]# cat /etc/sysctl.conf # Kernel sysctl configuration file for RedHat Linux # # For binary values, 0 is disabled, 1 isenabled. See sysctl(8) and # sysctl.conf(5) for more details. # Controls IP packet forwarding net.ipv4.ip_forward = 0 # Controls source route verification net.ipv4.conf.default.rp_filter = 1 # Do not accept source routing net.ipv4.conf.default.accept_source_route =0 # Controls the System Request debuggingfunctionality of the kernel kernel.sysrq = 0 # Controls whether core dumps will appendthe PID to the core filename. # Useful for debugging multi-threadedapplications. kernel.core_uses_pid = 1 # Controls the use of TCP syncookies net.ipv4.tcp_syncookies = 1 # Disable netfilter on bridges. net.bridge.bridge-nf-call-ip6tables = 0 net.bridge.bridge-nf-call-iptables = 0 net.bridge.bridge-nf-call-arptables = 0 # Controls the default maxmimum size of amesage queue kernel.msgmnb = 65536 # Controls the maximum size of a message,in bytes kernel.msgmax = 65536 # Controls the maximum shared segment size,in bytes kernel.shmmax = 68719476736 # Controls the maximum number of sharedmemory segments, in pages kernel.shmall = 4294967296 fs.aio-max-nr = 1048576 fs.file-max = 6815744 kernel.shmall = 2097152 kernel.shmmax = 1349242060 kernel.shmmni = 4096 # semaphores: semmsl, semmns, semopm,semmni kernel.sem = 250 32000 100 128 net.ipv4.ip_local_port_range = 9000 65500 net.core.rmem_default=262144 net.core.rmem_max=4194304 net.core.wmem_default=262144 net.core.wmem_max=1048586 让内核参数设置马上生效 [root@rac1 ~]#cat /etc/sysctl.conf shmmax=物理内存*80%*80% 单位是字节 kernel.shmmax:表示单个共享内存段的最大值,以字节为单位,此值一般为物理内存的一半,不过大一点也没关系,这里设定的为4GB,即“4294967295/1024/1024/1024=4G”。 kernel.shmmin:表示单个共享内存段的最小值,默认为1byte kernel.shmall:表示整个系统范围内可用共享内存页的总量,单位是页(page),在32位系统上一页等于4kB,也就是4096字节。计算公式是:shmmax/PAGE_SIZE kernel.shmmni:表示整个系统范围内内存段的最大数量,一般为4096.() fs.file-max :表示文件句柄的最大数量。文件句柄表示在Linux系统中可以打开的文 ip_local_port_range :表示端口的范围,。在监听器帮助客户端进程和服务器进程建立连接时,会用到指定范围内的端口。 kernel.sem :表示设置的信号量,这4个参数内容大小固定。 net.core.rmem_default :表示接收套接字缓冲区大小的缺省值(以字节为单位)。 net.core.rmem_max :表示接收套接字缓冲区大小的最大值(以字节为单位) net.core.wmem_default :表示发送套接字缓冲区大小的缺省值(以字节为单位)。 net.core.wmem_max :表示发送套接字缓冲区大小的最大值(以字节为单位)。 查看内核参数的当前值 /sbin/sysctl -a |grep sem /sbin/sysctl -a |grep shm /sbin/sysctl -a |grep file-max /sbin/sysctl -a | grep ip_local_port_range /sbin/sysctl -a | grep rmem_default /sbin/sysctl -a | grep rmem_max /sbin/sysctl -a | grep wmem_default /sbin/sysctl -a | grep wmem_max /sbin/sysctl -a | grep aio-max-nr 为用户设置资源限制,设置后的结果如下所示 [root@rac1 ~]# cat/etc/security/limits.conf # /etc/security/limits.conf # #Each line describes a limit for a user inthe form: #
# # #Where:
# # - an user name # - a group name, with @group syntax # - the wildcard *, for default entry # - the wildcard %, can be also used with %group syntax, # for maxlogin limit #
# # - "soft" for enforcing the soft limits # - "hard" for enforcing hard limits #
# # - core - limits the core file size (KB) # - data - max data size (KB) # - fsize - maximum filesize (KB) # - memlock - max locked-in-memory address space (KB) # - nofile - max number of openfiles # - rss - max resident set size (KB) # - stack - max stack size (KB) # - cpu - max CPU time (MIN) # - nproc - max number of processes # - as - address space limit (KB) # - maxlogins - max number of logins for this user # - maxsyslogins - max number of logins on the system # - priority - the priority to run user process with # - locks - max number of file locks the user can hold # - sigpending - max number of pending signals # - msgqueue - max memory used by POSIX message queues (bytes) # - nice - max nice priority allowed to raise to values: [-20, 19] # - rtprio - max realtime priority #
# # #* soft core 0 #* hard rss 10000 #@student hard nproc 20 #@faculty soft nproc 20 #@faculty hard nproc 50 #ftp hard nproc 0 #@student - maxlogins 4 # End of file oracle soft nproc 2047 oracle hard nproc 16384 oracle soft nofile 1024 oracle hard nofile 65536 grid soft nproc 16384 grid hard nproc 16384 grid soft nofile 65536 grid hard nofile 65536 grid soft stack 10240 grid hard stack 10240 nofile - 打开文件的最大数目,该值不能等于/proc/sys/fs/file-max,如果等于file-max且打开的文件句柄的数量达到file-max,用户将不能登陆操作系统。 1.6 准备共享存储 本文是以虚拟机为例 在虚拟机关闭的情况下,创建共享磁盘 注:VBoxManage是操作系统命令,在操作系统命令行(Windows)执行! 创建共享磁盘(将用于ASM) VBoxManage createhd --filenameK:\vm_12C_centOS64\shareDATA\taryartar77.vdi --size 12288 --format VDI--variant Fixed VBoxManage createhd --filenameK:\vm_12C_centOS64\shareDATA\taryartar88.vdi --size 12288 --format VDI--variant Fixed VBoxManage createhd --filenameK:\vm_12C_centOS64\shareDATA\taryartar99.vdi --size 12288 --format VDI--variant Fixed VBoxManage createhd --filenameK:\vm_12C_centOS64\shareDATA\taryartar100.vdi --size 12288 --format VDI--variant Fixed 把磁盘连接到虚拟机,在第一个节点(rac1_taryartar,rac1_taryartar是虚拟机中显示的名字)
--port设置端口号,随便设置,只要不被别人占用就行 VBoxManage storageattach rac1_taryartar --storagectl "SATA" --port 2--device 0 --type hdd --medium K:\vm_12C_centOS64\shareDATA\taryartar77.vdi--mtype shareable VBoxManage storageattach rac1_taryartar --storagectl "SATA" --port 3--device 0 --type hdd --medium K:\vm_12C_centOS64\shareDATA\taryartar88.vdi--mtype shareable VBoxManage storageattach rac1_taryartar --storagectl "SATA" --port 4--device 0 --type hdd --medium K:\vm_12C_centOS64\shareDATA\taryartar99.vdi--mtype shareable VBoxManage storageattach rac1_taryartar --storagectl "SATA" --port 5--device 0 --type hdd --medium K:\vm_12C_centOS64\shareDATA\taryartar100.vdi--mtype shareable 注:rac1_taryartar是虚拟机的名字,并不是集群中的节点名。 使磁盘可以被多个节点共享(所谓共享磁盘),在第一个节点(rac1_taryartar)上: VBoxManage modifyhdK:\vm_12C_centOS64\shareDATA\taryartar77.vdi --type shareable VBoxManage modifyhdK:\vm_12C_centOS64\shareDATA\taryartar88.vdi --type shareable VBoxManage modifyhdK:\vm_12C_centOS64\shareDATA\taryartar99.vdi --type shareable VBoxManage modifyhdK:\vm_12C_centOS64\shareDATA\taryartar100.vdi --type shareable ########把共享磁盘连接到节点2(rac2_taryartar) VBoxManage storageattach rac2_taryartar--storagectl "SATA" --port 2 --device 0 --type hdd --mediumK:\vm_12C_centOS64\shareDATA\taryartar77.vdi --mtype shareable VBoxManage storageattach rac2_taryartar--storagectl "SATA" --port 3 --device 0 --type hdd --mediumK:\vm_12C_centOS64\shareDATA\taryartar88.vdi --mtype shareable VBoxManage storageattach rac2_taryartar--storagectl "SATA" --port 4 --device 0 --type hdd --mediumK:\vm_12C_centOS64\shareDATA\taryartar99.vdi --mtype shareable VBoxManage storageattach rac2_taryartar--storagectl "SATA" --port 5 --device 0 --type hdd --mediumK:\vm_12C_centOS64\shareDATA\taryartar100.vdi --mtype shareable ########把共享磁盘连接到节点3(rac3_taryartar) VBoxManage storageattach rac3_taryartar--storagectl "SATA" --port 2 --device 0 --type hdd --mediumK:\vm_12C_centOS64\shareDATA\taryartar77.vdi --mtype shareable VBoxManage storageattach rac3_taryartar--storagectl "SATA" --port 3 --device 0 --type hdd --mediumK:\vm_12C_centOS64\shareDATA\taryartar88.vdi --mtype shareable VBoxManage storageattach rac3_taryartar--storagectl "SATA" --port 4 --device 0 --type hdd --mediumK:\vm_12C_centOS64\shareDATA\taryartar99.vdi --mtype shareable VBoxManage storageattach rac3_taryartar--storagectl "SATA" --port 5 --device 0 --type hdd --mediumK:\vm_12C_centOS64\shareDATA\taryartar100.vdi --mtype shareable ########把共享磁盘连接到节点4(rac4_taryartar) VBoxManage storageattach rac4_taryartar--storagectl "SATA" --port 2 --device 0 --type hdd --mediumK:\vm_12C_centOS64\shareDATA\taryartar77.vdi --mtype shareable VBoxManage storageattach rac4_taryartar--storagectl "SATA" --port 3 --device 0 --type hdd --mediumK:\vm_12C_centOS64\shareDATA\taryartar88.vdi --mtype shareable VBoxManage storageattach rac4_taryartar--storagectl "SATA" --port 4 --device 0 --type hdd --mediumK:\vm_12C_centOS64\shareDATA\taryartar99.vdi --mtype shareable VBoxManage storageattach rac4_taryartar--storagectl "SATA" --port 5 --device 0 --type hdd --mediumK:\vm_12C_centOS64\shareDATA\taryartar100.vdi --mtype shareable #######启动所有的节点 ########对新增加的共享磁盘进行格式化(在一个节点) [root@rac1 ~]# fdisk /dev/sdf ....... ...... 太多内容,请看附件install 12c RAC on linux 6.4PUB V2.part1.rar
install 12c RAC on linux 6.4PUB V2.part2.rar
|