SERVER NAME | LAN 1 (192.168.56.0/24) | LAN 2 (10.0.0.0/24) | LAN 3 (172.30.0.0/14) | |
dns-server | Device | eth0 | eth1 | |
IP Address | 192.168.56.101 | 172.30.201.101 * | ||
Network mask | 255.255.255.0 | 255.255.0.0 | ||
Gateway | 192.168.56.1 * | 172.30.0.1 ** | ||
DNS | 127.0.0.1 | 172.30.1.3 *** 172.30.1.8 *** | ||
rac1-node | Device | eth0 | eth1 | |
IP Address | 192.168.56.111 | 10.0.0.111 | ||
Network mask | 255.255.255.0 | 255.255.255.0 | ||
Gateway | 192.168.56.101 | 10.0.0.1 * | ||
DNS | 192.168.56.101 | |||
rac2-node | Device | eth0 | eth1 | |
IP Address | 192.168.56.112 | 10.0.0.112 | ||
Network mask | 255.255.255.0 | 255.255.255.0 | ||
Gateway | 192.168.56.101 | 10.0.0.1 * | ||
DNS | 192.168.56.101 |
192.168.56.121 192.168.56.122 192.168.56.123
192.168.56.113 192.168.56.114
# mkdir -p /st_nfs0 # mkdir -p /st_nfs1 # mkdir -p /st_nfs2
/etc/fstab
and add entries: storage-server:/mnt/nfs0 /st_nfs0 nfs bg,intr,noac,acregmin=0,acregmax=0,acdirmin=0,acdirmax=0 0 0 storage-server:/mnt/nfs1 /st_nfs1 nfs bg,intr,noac,acregmin=0,acregmax=0,acdirmin=0,acdirmax=0 0 0 storage-server:/mnt/nfs2 /st_nfs2 nfs bg,intr,noac,acregmin=0,acregmax=0,acdirmin=0,acdirmax=0 0 0
Path
variable in the list of system variables. In the future it will be very useful to us.VirtualBox Host-Only Ethernet Adapter
. Using the program menu, create another adapter named VirtualBox Host-Only Ethernet Adapter #2
. VirtualBox Host-Only Ethernet Adapter: IP Address: 192.168.56.1 Mask: 255.255.255.0
VirtualBox Host-Only Ethernet Adapter #2 IP Address: 10.0.0.1 Mask: 255.255.255.0
dns-server.test.com.by
: # service iptables status
# service iptables stop # chkconfig iptables off
# yum install named
named.conf
file: # nano /etc/named.conf
// named.conf logging { channel "xfer" { file "/var/log/named/xfer.log" versions 3 size 10m; print-time yes; print-severity yes; severity info; }; channel "lame" { file "/var/log/named/lamers.log" versions 2 size 10m; print-time yes; print-severity yes; severity info; }; channel "config" { file "/var/log/named/conf.log" versions 3 size 10m; print-time yes; print-severity yes; severity info; }; channel "security" { file "/var/log/named/security.log" versions 3 size 10m; print-time yes; print-severity yes; severity info; }; category "xfer-in" { "xfer"; }; category "xfer-out" { "xfer"; }; category "notify" { "xfer"; }; category "lame-servers" { "lame"; }; category "config" { "config"; }; category "security" { "security"; }; category "default" { "default_syslog"; "default_debug"; }; }; acl "test_net" { localhost; 192.168.56.0/24; }; options { directory "/var/named"; dump-file "/var/named/data/cache_dump.db"; statistics-file "/var/named/data/named_stats.txt"; memstatistics-file "/var/named/data/named_mem_stats.txt"; version "DNS Server"; allow-recursion { test_net; }; allow-query { test_net; }; forwarders { 172.30.1.3; 172.30.1.8; }; forward only; listen-on port 53 { localhost; 192.168.56.101; }; ### Master DNS IP ### dnssec-enable no; dnssec-validation no; dnssec-lookaside auto; /* Path to ISC DLV key */ bindkeys-file "/etc/named.iscdlv.key"; managed-keys-directory "/var/named/dynamic"; }; zone "." IN { type hint; file "named.ca"; }; zone"test.com.by" IN { type master; file "forward.test"; allow-update { none; }; }; zone"56.168.192.in-addr.arpa" IN { type master; file "reverse.test"; allow-update { none; }; }; include "/etc/named.rfc1912.zones"; include "/etc/named.root.key";
# cd /var/named/chroot/var/log/named # touch conf.log # touch lamers.log # touch security.log # touch xfer.log
# cd /var/named/chroot/var/log # chmod 750 -R named # chown -R named:named named
# cd /var/named
forward.test
file: # touch forward.test # chmod 750 forward.test # chown named:named forward.test
$TTL 86400 @ IN SOA dns-server.test.com.by. root.test.com.by. ( 2011071001 ;Serial 3600 ;Refresh 1800 ;Retry 604800 ;Expire 86400 ;Minimum TTL ) @ IN NS dns-server.test.com.by. @ IN A 192.168.56.101 @ IN A 192.168.56.111 @ IN A 192.168.56.112 @ IN A 192.168.56.113 @ IN A 192.168.56.114 dns-server IN A 192.168.56.101 rac1-node IN A 192.168.56.111 rac2-node IN A 192.168.56.112 rac1-node-vip IN A 192.168.56.113 rac2-node-vip IN A 192.168.56.114 rac1-node-priv IN A 10.0.0.111 rac2-node-priv IN A 10.0.0.112 rac-scan IN A 192.168.56.121 rac-scan IN A 192.168.56.122 rac-scan IN A 192.168.56.123
reverse.test
file for the reverse zone. $TTL 86400 @ IN SOA dns-server.test.com.by. root.test.com.by. ( 2011071001 ;Serial 3600 ;Refresh 1800 ;Retry 604800 ;Expire 86400 ;Minimum TTL ) @ IN NS dns-server.test.com.by. @ IN PTR test.com.by. grid-server IN A 192.168.56.101 rac1-node IN A 192.168.56.111 rac2-node IN A 192.168.56.112 rac1-node-vip IN A 192.168.56.113 rac2-node-vip IN A 192.168.56.114 101 IN PTR dns-server.test.com.by. 111 IN PTR rac1-node.test.com.by. 112 IN PTR rac2-node.test.com.by. 113 IN PTR rac1-node-vip.test.com.by. 114 IN PTR rac2-node-vip.test.com.by.
named
daemon to autorun and start: # chkconfig named on # service named start
named: [ OK ]
# ping rac-scan PING rac-scan.test.com.by (192.168.56.121) 56(84) bytes of data. From server-manager (192.168.56.101) icmp_seq=1 Destination Host Unreachable # ping rac-scan PING rac-scan.test.com.by (192.168.56.122) 56(84) bytes of data. From server-manager (192.168.56.101) icmp_seq=1 Destination Host Unreachable # ping rac-scan PING rac-scan.test.com.by (192.168.56.123) 56(84) bytes of data. From server-manager (192.168.56.101) icmp_seq=1 Destination Host Unreachable # ping rac1-node PING rac1-node (192.168.56.111) 56(84) bytes of data. From server-manager (192.168.56.101) icmp_seq=1 Destination Host Unreachable # ping rac2-node PING rac2-node (192.168.56.112) 56(84) bytes of data. From server-manager (192.168.56.101) icmp_seq=2 Destination Host Unreachable # ping habrahabr.ru PING habrahabr.ru (212.24.44.141) 56(84) bytes of data. 64 bytes from habrahabr.ru (212.24.44.141): icmp_seq=1 ttl=128 time=30.95 ms 64 bytes from habrahabr.ru (212.24.44.141): icmp_seq=1 ttl=128 time=28.03 ms 64 bytes from habrahabr.ru (212.24.44.141): icmp_seq=1 ttl=128 time=24.71 ms
rac-scan
, the server returns a new IP address in a circle. This completes the DNS server configuration. More details about setting up BIND can be found here .rac1-node.test.com.by
and proceed to the configuration of network connections:root
:lv_root
, and then increase the size of the lv_swap
due to the free space. It should end up with something like this:grid
. Under it will be the further installation of Oracle GRID:root
!SELINUX=disabled
variable in the /etc/selinux/config
file. # groupadd -g 501 oracle # useradd -g oracle -u 501 -d /home/oracle -p ****** oracle
# groupadd -g 502 dba # groupadd -g 503 asmdba # groupadd -g 504 asmoper # groupadd -g 505 asmadmin
grid
# usermod -g dba grid # usermod -a -G grid grid # usermod -a -G disk grid # usermod -a -G asmdba grid # usermod -a -G asmoper grid # usermod -a -G asmadmin grid
oracle
# usermod -g dba oracle # usermod -a -G oracle oracle # usermod -a -G asmdba oracle # usermod -a -G asmoper oracle # usermod -a -G asmadmin oracle
# mkdir -p /media/ora_linux # mount -t cifs "//192.168.56.1/ora_linux" /media/ora_linux -o username="vasya_pupkin",password="********",iocharset=utf8,file_mode=0777,dir_mode=0777
/media/ora_linux/grid/rpm
and # yum install ./cvuqdisk-1.0.9-1.rpm # yum install bind-utils # yum install compat-libcap1-1.10 # yum install compat-libstdc++-33 # yum install libstdc++-devel # yum install gcc-c++ # yum install ksh-20100621 # yum install libaio-devel # yum install oracleasm # yum install oracleasm-support
# mkdir -p /u01/app/grid # mkdir -p /u01/app/oracle # chown grid:dba /u01/app/grid # chown oracle:dba /u01/app/oracle # mkdir -p /u01/app/11.2.0/grid # chown grid:dba /u01/app/11.2.0 # chown grid:dba /u01/app/11.2.0/grid # mkdir /u01/app/oraInventory # chown grid:dba /u01/app/oraInventory # chmod -R 775 /u01/
# oracleasm configure –i Configuring the Oracle ASM library driver. This will configure the on-boot properties of the Oracle ASM library driver. The following questions will determine whether the driver is loaded on boot and what permissions it will have. The current values will be shown in brackets ('[]'). Hitting <ENTER> without typing an answer will keep that current value. Ctrl-C will abort. Default user to own the driver interface []: grid Default group to own the driver interface []: dba Start Oracle ASM library driver on boot (y/n) [n]: y Scan for Oracle ASM disks on boot (y/n) [y]: y Writing Oracle ASM library driver configuration: done
# oracleasm init Creating /dev/oracleasm mount point: /dev/oracleasm Loading module "oracleasm": oracleasm Configuring "oracleasm" to use device physical block size Mounting ASMlib driver filesystem: /dev/oracleasm
/etc/sysconfig/ntpd
and add the –x
parameter. OPTIONS="-x -u ntp:ntp -p /var/run/ntpd.pid -g"
# service ntpd restart
ASM> VBoxManage createhd --filename ASM_1.vdi --size 10240 --format VDI --variant Fixed ASM> VBoxManage createhd --filename ASM_2.vdi --size 10240 --format VDI --variant Fixed ASM> VBoxManage createhd --filename ASM_3.vdi --size 10240 --format VDI --variant Fixed ASM> VBoxManage createhd --filename ASM_4.vdi --size 10240 --format VDI --variant Fixed ASM> VBoxManage createhd --filename ASM_5.vdi --size 10240 --format VDI --variant Fixed
ASM> VBoxManage storageattach "RAC #1 ORA ASM" --storagectl "SATA" --port 1 --device 0 --type hdd --medium ASM_1.vdi --mtype shareable ASM> VBoxManage storageattach "RAC #1 ORA ASM" --storagectl "SATA" --port 2 --device 0 --type hdd --medium ASM_2.vdi --mtype shareable ASM> VBoxManage storageattach "RAC #1 ORA ASM" --storagectl "SATA" --port 3 --device 0 --type hdd --medium ASM_3.vdi --mtype shareable ASM> VBoxManage storageattach "RAC #1 ORA ASM" --storagectl "SATA" --port 4 --device 0 --type hdd --medium ASM_4.vdi --mtype shareable ASM> VBoxManage storageattach "RAC #1 ORA ASM" --storagectl "SATA" --port 5 --device 0 --type hdd --medium ASM_5.vdi --mtype shareable ASM> VBoxManage storageattach "RAC #2 ORA ASM" --storagectl "SATA" --port 1 --device 0 --type hdd --medium ASM_1.vdi --mtype shareable ASM> VBoxManage storageattach "RAC #2 ORA ASM" --storagectl "SATA" --port 2 --device 0 --type hdd --medium ASM_2.vdi --mtype shareable ASM> VBoxManage storageattach "RAC #2 ORA ASM" --storagectl "SATA" --port 3 --device 0 --type hdd --medium ASM_3.vdi --mtype shareable ASM> VBoxManage storageattach "RAC #2 ORA ASM" --storagectl "SATA" --port 4 --device 0 --type hdd --medium ASM_4.vdi --mtype shareable ASM> VBoxManage storageattach "RAC #2 ORA ASM" --storagectl "SATA" --port 5 --device 0 --type hdd --medium ASM_5.vdi --mtype shareable
grid
. # mount -t cifs "//192.168.56.1/ora_linux" /media/ora_linux -o username="vasya_pupkin",password="********",iocharset=utf8,file_mode=0777,dir_mode=0777
root
on one of the nodes of the cluster! # ls /dev/sd* /dev/sdb /dev/sdc /dev/sdd /dev/sde /dev/sdf
# fdisk /dev/sdb
n p 1 Enter w
# ls /dev/sd* /dev/sdb1 /dev/sdc1 /dev/sdd1 /dev/sde1 /dev/sdf1
# oracleasm createdisk DISK1 /dev/sdb1 # oracleasm createdisk DISK2 /dev/sdc1 # oracleasm createdisk DISK3 /dev/sdd1 # oracleasm createdisk DISK4 /dev/sde1 # oracleasm createdisk DISK5 /dev/sdf1
# oracleasm scandisks Reloading disk partitions: done Cleaning any stale ASM disks... Scanning system for ASM disks... # oracleasm listdisks DISK1 DISK2 DISK3 DISK4 DISK5
grid
. [grid@rac1-node /]$ cd /media/ora_linux/grid [grid@rac1-node /]$ ./runInstaller
Cluster Name: rac-cluster SCAN name: rac scan SCAN Port: 1521
Node | Public Hostname | Virtual hostname |
one | rac1-node.test.com.by | rac1-node-vip.test.com.by |
2 | rac2-node.test.com.by | rac2-node-vip.test.com.by |
grid
user password (that's why all the nodes must have the same users with the same password). Establish a connection by clicking the Setup button: Disk Group Name: DATA Redundancy: Normal AU Size: 2 MB
/dev/oracleasm/disks*
in the Change Disk Discovery Path window: $ su Password: # cd /tmp/CVU_11.2.0.3.0_grid # ./runfixup.sh
root
. Detailed instructions will be presented in the Execute Configuration scripts window: $ su Password: # cd /u01/app/oraInventory # ./orainstRoot.sh # cd /u01/app/11.2.0/grid # ./root.sh
# cd /u01/app/11.2.0/grid/bin # ./crsctl status resource -t -------------------------------------------------------------------------------- NAME TARGET STATE SERVER STATE_DETAILS -------------------------------------------------------------------------------- Local Resources -------------------------------------------------------------------------------- ora.DATA.dg ONLINE ONLINE rac1-node ONLINE ONLINE rac2-node ora.LISTENER.lsnr ONLINE ONLINE rac1-node ONLINE ONLINE rac2-node ora.asm ONLINE ONLINE rac1-node Started ONLINE ONLINE rac2-node Started ora.gsd OFFLINE OFFLINE rac1-node OFFLINE OFFLINE rac2-node ora.net1.network ONLINE ONLINE rac1-node ONLINE ONLINE rac2-node ora.ons ONLINE ONLINE rac1-node ONLINE ONLINE rac2-node -------------------------------------------------------------------------------- Cluster Resources -------------------------------------------------------------------------------- ora.LISTENER_SCAN1.lsnr 1 ONLINE ONLINE rac2-node ora.LISTENER_SCAN2.lsnr 1 ONLINE ONLINE rac1-node ora.LISTENER_SCAN3.lsnr 1 ONLINE ONLINE rac1-node ora.cvu 1 ONLINE ONLINE rac1-node ora.oc4j 1 ONLINE ONLINE rac1-node ora.rac1-node.vip 1 ONLINE ONLINE rac1-node ora.rac2-node.vip 1 ONLINE ONLINE rac2-node ora.scan1.vip 1 ONLINE ONLINE rac2-node ora.scan2.vip 1 ONLINE ONLINE rac1-node ora.scan3.vip 1 ONLINE ONLINE rac1-node ora.wind.db 1 ONLINE ONLINE rac1-node Open 2 ONLINE ONLINE rac2-node Open
oracle
. Mount the ball. Further, as in the case of Oracle GRID , the installation is carried out using a graphical wizard. We start the terminal on behalf of oracle
. [oracle@rac1-node /]$ cd /media/ora_linux/database [oracle@rac1-node /]$ ./runInstaller
oracle
Setup : $ su Password: # cd /tmp/CVU_11.2.0.3.0_oracle # ./runfixup.sh
root
. Execute Configuration scripts : $ su Password: # cd /u01/app/oracle/product/11.2.0/wncdb # ./root.sh
[oracle@rac1-node /]$ cd /u01/app/oracle/product/11.2.0/wncdb/bin [oracle@rac1-node /]$ ./dbca
[oracle@rac1-server /]$ PATH=$PATH:/u01/app/oracle/product/11.2.0/wncdb/bin [oracle@rac1-server /]$ export PATH [oracle@rac1-server /]$ ORACLE_HOME=/u01/app/oracle/product/11.2.0/wncdb [oracle@rac1-server /]$ export ORACLE_HOME [oracle@rac1-server /]$ ORACLE_OWNER=oracle [oracle@rac1-server /]$ export ORACLE_OWNER [oracle@rac1-server /]$ NLS_LANG=AMERICAN_AMERICA.CL8MSWIN1251 [oracle@rac1-server /]$ export NLS_LANG
[oracle@rac1-server /]$ sqlplus SQL*Plus: Release 11.2.0.3.0 Production on Thu Aug 14 11:41:49 2014 Copyright (c) 1982, 2011, Oracle. All rights reserved. Enter user-name: sys@wind as sysdba Enter password: Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP, Data Mining and Real Application Testing options SQL> SELECT inst_name FROM v$active_instances; INST_NAME ------------------------------------------------------------ rac1-node.test.com.by:WIND1 rac2-node.test.com.by:WIND2 SQL> exit Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP, Data Mining and Real Application Testing options [oracle@rac1-server /]$
tnsnames.ora
WIND = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = rac-scan.test.com.by)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = WIND) ) )
Source: https://habr.com/ru/post/233801/
All Articles