In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article is to share with you the content of a sample analysis of Oracle RAC environment preparation. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
VMmare Workstation 10.0.1 is selected for this installation to create four virtual machines. As follows:
Openfiler (openfileresa-2.99.1-x86_64)
Machine name IP address openfiler.localdomain.com192.168.199.219
RAC node (OracleLinux-R6-U4-Server-x86_64)
Machine name Public-IPPrivate-IPVIP11grac1192.168.199.10192.168.10.10192.168.199.2011grac2192.168.199.11192.168.10.11192.168.199.2111grac3192.168.199.12192.168.10.12192.168.199.22
All three machines are configured with / etc/hosts, as follows
# node1192.168.199.10 11grac1.localdomain.com 11grac1192.168.199.20 11grac1-vip.localdomain.com 11grac1-vip192.168.10.10 11grac1-priv.localdomain.com 11grac1-priv#node2192.168.199.11 11grac2.localdomain.com 11grac2192.168.199.21 11grac2-vip.localdomain.com 11grac2-vip192.168.10.11 11grac2- Priv.localdomain.com 11grac2-priv#node3192.168.199.12 11grac3.localdomain.com 11grac3192.168.199.22 11grac3-vip.localdomain.com 11grac3-vip192.168.10.12 11grac3-priv.localdomain.com 11grac3-priv#scanip192.168.199.30 scan-cluster.localdomain.com scan-cluster
two。 All three machines turn off the firewall
Chkconfig iptables offservice iptables stop
3. Close SeLinux
Change vi / etc/sysconfig/selinuxSELINUX=enforcing to SELINUX=disabled
4. Configure the DNS server (on the 11grac3 server)
4.1 install the RPM package
[root@localhost Packages] # rpm-ivh bind-9.8.2-0.17.rc1.0.2.el6.x86_64.rpm warning: bind-9.8.2-0.17.rc1.0.2.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID ec551f03: NOKEYPreparing... # [100%] 1:bind #
4.2 Edit / etc/named.conf and replace it with the following
Options {directory "/ var/named";}; zone "." IN {type hint; file "named.ca";}; zone "localhost" IN {type master; file "named.loopback";}; zone "0.0.127.in-addr.apra" IN {type master; file "named.localhost";}; zone "localdomain.com" IN {type master; file "localdomain.com.zone";}
4.3 create a new localdomain.com.zone file in the / var/named/ directory as follows
$TTL 1D$ORIGIN localdomain.com.@ IN SOA ns.localdomain.com. Admin (0; serial 1D; refresh 1H; retry 1W; expire 3H) Minimum IN NS nsns IN A 172.168.199.1211grac3 IN A 192.168.199.1211grac1 IN A 192.168.199.1011grac2 IN A 192.168.199.11scan-cluster IN A 192.168.199.30
4.4 start the DNS server
[root@11grac3 etc] # chkconfig named on [root@localhost named] # service named restartStopping named: [OK] Starting named: [OK]
If an error occurs, try the following command
[root@localhost named] # rndc-confgen-r / dev/urandom-awrote key file "/ etc/rndc.key"
4.5 modify the dns direction of each server
[root@localhost named] # vi / etc/resolv.conf
Add the following
Search localdomain.comnameserver 192.168.199.12
Note: after setting up DNS in this way, the network will fail after restarting. Use the following methods
Vi / etc/sysconfig/network-scripts/ifcfg-eth0 # add the following two lines of DNS1=192.168.199.12 DOMAIN=localdomain.com
Restart the network and / etc/resolv.conf will automatically complete the setting of DNS.
4.6 verify dns
[root@localhost named] # nslookup 11grac1Server: 192.168.199.12Address: 192.168.199.12#53Name: 11grac1.localdomain.comAddress: 192.168.199.10 [root@localhost named] # nslookup 11grac2Server: 192.168.199.12Address: 192.168.199.12#53Name: 11grac2.localdomain.comAddress: 192.168.199.11 [root@localhost named] # nslookup 11grac3Server: 192.168.199. 12Address: 192.168.199.12#53Name: 11grac3.localdomain.comAddress: 192.168.199.12 [root@localhost named] # nslookup scan-clusterServer: 192.168.199.12Address: 192.168.199.12#53Name: scan-cluster.localdomain.comAddress: 192.168.199.30
5. Set up users, create directories, modify parameter files, etc. (see attachment for script)
[root@localhost scripts] #. / 1preusers.sh [root@localhost scripts] #. / 2predir.sh [root@localhost scripts] #. / 3prelimits.sh [root@localhost scripts] #. / 4prelogin.sh [root@localhost scripts] #. / 5preprofile.sh [root@localhost scripts] #. / 6presysctl.sh
6. Establish password-free login for grid and oracle users
6.1 execute the following commands on all three machines
[root@11grac1 scripts] # su-oracle11grac1- > ssh-keygen-t rsa # all directly enter Generating public/private rsa key pair.Enter file in which to save the key (/ home/oracle/.ssh/id_rsa): Created directory'/ home/oracle/.ssh'.Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in / home/oracle/.ssh/id_rsa.Your public key has been saved in / home/oracle/.ssh/id_rsa.pub Key fingerprint is:31:43:2d:7e:30:bb:c9:d9:d9:8a:01:a2:51:bc:8b:2d oracle@11grac1.localdomain.comThe key's randomart p_w_picpath is:+-- [RSA 2048]-+ |. .. | | o. +. | |. . . + = | |. O. Ooze. | | = o oS* o | | E o * o. | |. O. | |. . | +-+ |
6.2 execute the following commands on three machines
11grac1-> ssh-copy-id-I. ssh / id_rsa.pub 11grac1The authenticity of host '11grac1 (192.168.199.10)' can't be established.RSA key fingerprint is cc:d0:c3:de:37:33:a7:cb:91:40:c5:5f:18:07:06:9f.Are you sure you want to continue connecting (yes/no)? YesWarning: Permanently added '11grac1192.168.199.10' (RSA) to the list of known hosts.oracle@11grac1's password: Now try logging into the machine, with "ssh' 11grac1'" And check in: .ssh / authorized_keysto make sure we haven't added extra keys that you weren't expecting.11grac2- > ssh-copy-id-I. ssh / id_rsa.pub 11grac1 The authenticity of host '11grac1 (192.168.199.10)' can't be established.RSA key fingerprint is cc:d0:c3:de:37:33:a7:cb:91:40:c5:5f:18:07:06:9f.Are you sure you want to continue connecting (yes/no)? YesWarning: Permanently added '11grac1192.168.199.10' (RSA) to the list of known hosts.oracle@11grac1's password: Now try logging into the machine, with "ssh' 11grac1'" And check in: .ssh / authorized_keysto make sure we haven't added extra keys that you weren't expecting.11grac3- > ssh-copy-id-I. ssh / id_rsa.pub 11grac1The authenticity of host '11grac1 (192.168.199.10)' can't be established.RSA key fingerprint is cc:d0:c3:de:37:33:a7:cb:91:40:c5:5f:18:07:06:9f.Are you sure you want to continue connecting (yes/no)? YesWarning: Permanently added '11grac1192.168.199.10' (RSA) to the list of known hosts.oracle@11grac1's password: Now try logging into the machine, with "ssh' 11grac1'", and check in: .ssh / authorized_keysto make sure we haven't added extra keys that you weren't expecting.
The above command will generate authorized_keys in the / home/oracle/.ssh directory of 11grac1 and copy the file to the other two machines
11grac1-> scp authorized_keys 11grac2lGRAC2GRANCHALE.sshUnix 11grac1-> scp authorized_keys 11grac3:/home/oracle/.ssh/
6.4 repeat the steps of 6.1 to 6.3 to generate password-free authentication for grid users.
7. Verify that each node must directly log in without a password
Ssh 11grac1 date ssh 11grac2 date ssh 11grac3 date ssh 11grac3-priv date ssh 11grac2-priv date ssh 11grac1-priv date ssh 11grac1.localdomain.com date ssh 11grac2.localdomain.com date ssh 11grac3.localdomain.com date ssh 11grac3-priv.localdomain.com date ssh 11grac2-priv.localdomain.com date ssh 11grac1-priv.localdomain.com date
8. Mount the iscsi hard drive (executed on every machine)
8.1 find the iscsi hard drive
[root@11grac1 scripts] # iscsiadm-m discovery-t sendtargets-p 192.168.199.2192.168.199.21919 discovery 3260 iqn.2006 1 iqn.2006-01.com.openfilervell fastening recovery versionarea01192.168.199.219 sendtargets 3260 iqn.2006-01.com.openfilerlace racist oradata01192.168.199.21919purl 3260ref 1 iqn.2006-01.com.openfilerrace racing disk03192.168.199.219 Fringe racially disk02192.168.199.193260Men1 iqn.2006-01.com.openfiler
8.2 set the iscsi disk to be mounted automatically on boot
Iscsiadm-m node-T iqn.2006-01.com.openfiler:rac_oradata01-p 192.168.199.219-- op update-n node.startup-v automaticiscsiadm-m node-T iqn.2006-01.com.openfiler:fast_recover_area01-p 192.168.199.219-- op update-n node.startup-v automaticiscsiadm-m node-T iqn.2006-01.com.openfiler:rac_ocrdisk01-p 192.168.199.219-op update-n node.startup-v automaticiscsiadm -m node-T iqn.2006-01.com.openfiler:rac_ocrdisk02-p 192.168.199.219-- op update-n node.startup-v automaticiscsiadm-m node-T iqn.2006-01.com.openfiler:rac_ocrdisk03-p 192.168.199.219-- op update-n node.startup-v automatic
9. Create an asm disk
Install oracleasm-support and oracleasmlib (execute on all three machines)
Note: because oracle linux already has oracleasm built into the kernel, there is no need to install the rpm package for oracleasm. If you use a non-oracle Linux operating system. Please press to install the kmod-oracleasm-2.0.6.rh2-2.el6.x86_64.rpm package.
[root@11grac2 /] # rpm-ivh oracleasm-support-2.1.8-1.el6.x86_64.rpm warning: oracleasm-support-2.1.8-1.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID ec551f03: NOKEYPreparing... # 1:oracleasm-support # [root@11grac2 /] # rpm-ivh oracleasmlib-2.0 .4-1.el6.x86_64.rpm warning: oracleasmlib-2.0.4-1.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature Key ID ec551f03: NOKEYPreparing... # 1:oracleasmlib # [root@11grac1 Packages] # oracleasm configure-iConfiguring the Oracle ASM library Driver.This will configure the on-boot properties of the Oracle ASM librarydriver. The following questions will determine whether the driver isloaded on boot and what permissions it will have. The current valueswill be shown in brackets ('[]'). Hitting without typing ananswer will keep that current value. Ctrl-C will abort.Default user to own the driver interface []: gridDefault group to own the driver interface []: asmdbaStart Oracle ASM library driver on boot (YPAPO) [n]: yScan for Oracle ASM disks on boot (YPEA) [y]: yWriting Oracle ASM library driver configuration: done
9.2 partition the disk (only need to be executed by a single node)
9.3 create asm disk
[root@11grac1 ~] # ll / dev/disk/by-path/ip-192.168.199.219:3260-iscsi-iqn.2006-01.com.openfilerFastener recoverables 01Murlunmur0->.. /.. / sdeip-192.168.199.219:3260-iscsi-iqn.2006-01.com.openfiler:fast_recover_area01-lun-0-part1->.. /.. / sde1ip-192.168.199.219:3260-iscsi-iqn.2006-01 .com.openfiler: rac_ocrdisk01-lun-0- >.. /.. / sdbip-192.168.199.219:3260-iscsi-iqn.2006-01.com.openfiler:rac_ocrdisk01-lun-0-part1->.. /.. / sdb1ip-192.168.199.219:3260-iscsi-iqn.2006-01.com.openfiler:rac_ocrdisk02-lun-0->.. /.. / sddip-192.168.199.219:3260-iscsi-iqn.2006-01. Com.openfiler:rac_ocrdisk02-lun-0-part1->.. /.. / sdd1ip-192.168.199.219:3260-iscsi-iqn.2006-01.com.openfilerPartition racially disk03Murlunly0->.. /.. / sdcip-192.168.199.219:3260-iscsi-iqn.2006-01.com.openfiler:rac_ocrdisk03-lun-0-part1->.. /.. / sdc1ip-192.168.199.219:3260-iscsi-iqn.2006-01 .com.openfiler: rac_oradata01-lun-0- >.. / sdfip-192.168.199.219:3260-iscsi-iqn.2006-01.com.openfiler:rac_oradata01-lun-0-part1->.. /.. / sdf1
Note the correspondence between the above iscsi disk and / dev/sd*.
[root@11grac1 ~] # oracleasm createdisk oradata / dev/sdf1 Writing disk header: doneInstantiating disk: done [root@11grac1 ~] # oracleasm createdisk fra / dev/sde1 Writing disk header: doneInstantiating disk: done [root@11grac1 ~] # oracleasm createdisk ocr01 / dev/sdb1 Writing disk header: doneInstantiating disk: done [root@11grac1 ~] # oracleasm createdisk ocr02 / dev/sdd1 Writing disk header: doneInstantiating disk: done [root@11grac1 ~] # oracleasm createdisk ocr03 / dev/sdc1
View disk
[root@11grac1 ~] # oracleasm listdisksFRAOCR01OCR02OCR03ORADATA [root@11grac1 ~] #
Perform a disk scan on the other two machines
[root@11grac3] # oracleasm scandisksReloading disk partitions: doneCleaning any stale ASM disks...Scanning system for ASM disks...Instantiating disk "OCR01" Instantiating disk "OCR03" Instantiating disk "OCR02" Instantiating disk "FRA" Instantiating disk "ORADATA"
10. Disable the ntp time synchronization service
Because the time synchronization service is already available in 11g Clusterware, the ntp service needs to be disabled.
[root@11grac3] # cd / etc/ [root@11grac3 etc] # mv ntp.conf ntp.conf.bak Thank you for reading! This is the end of the article on "sample Analysis of Oracle RAC Environment preparation". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it for more people to see!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.