以CentOS 6.8系统为例部署Oracle 11g RAC和DNS配置

在virtual box创建虚拟机时,网卡1为桥接网卡,网卡二为仅主机模式

以CentOS 6.8系统为例部署Oracle 11g RAC和DNS配置

以CentOS 6.8系统为例部署Oracle 11g RAC和DNS配置

创建两块磁盘,模式设置为可共享,都添加到两个虚拟机中

以CentOS 6.8系统为例部署Oracle 11g RAC和DNS配置

在虚拟介质管理中进行设置

以CentOS 6.8系统为例部署Oracle 11g RAC和DNS配置

以CentOS 6.8系统为例部署Oracle 11g RAC和DNS配置

虚拟机的创建明细如下

以CentOS 6.8系统为例部署Oracle 11g RAC和DNS配置

在两个系统安装完成后,进入network connection配置

把动态地址改为静态地址,手动输入地址、子网掩码及网关

将两个节点的公共网卡地址写入DNS server

以CentOS 6.8系统为例部署Oracle 11g RAC和DNS配置

以CentOS 6.8系统为例部署Oracle 11g RAC和DNS配置

以CentOS 6.8系统为例部署Oracle 11g RAC和DNS配置

以CentOS 6.8系统为例部署Oracle 11g RAC和DNS配置

进入 /etc/hosts 写入两个节点的网卡信息

[root@rac01 ~]# vi /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6

192.168.56.101 rac01

192.168.56.102 rac02

192.168.56.111 rac01-vip

192.168.56.112 rac02-vip

192.168.1.142 rac01-priv

192.168.1.109 rac02-priv

192.168.56.156 cluster-scan

配置本地Yum源

[root@rac01 Packages]# cd /etc/yum.repos.d/
[root@rac01 yum.repos.d]# ls
CentOS-Base.repo CentOS-Debuginfo.repo CentOS-fasttrack.repo CentOS-Media.repo CentOS-Vault.repo
[root@rac01 yum.repos.d]# rm -rf *

[root@rac01 yum.repos.d]# vi local.repo
[kingsql]
name=This is kingsql repo
baseurl=file:///rpm/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
[root@rac01 yum.repos.d]# mkdir -p /rpm
[root@rac01 yum.repos.d]# cd /rpm

[root@rac01 rpm]cp /root/Packages/* /rpm/

rpm -ivh vsftpd-2.2.2-12.el6_5.1.x86_64.rpm
rpm -ivh deltarpm-3.5-0.5.20090913git.el6.x86_64.rpm
rpm -ivh Python-deltarpm-3.5-0.5.20090913git.el6.x86_64.rpm
rpm -ivh libxml2-2.7.6-14.el6_5.2.x86_64.rpm
rpm -ivh libxml2-python-2.7.6-14.el6_5.2.x86_64.rpm
rpm -ivh createrepo-0.9.9-22.el6.noarch.rpm

[root@rac01 rpm]# createrepo ./
[root@rac01 rpm]# yum clean all
[root@rac01 rpm]# yum makecache

[root@rac01 rpm]#yum install -y libXp* xterm* unixODBC* sysstat* make* libstdc++* libgomp* libgcc* libaio* kernel-headers* glibc* gcc* elfutils* binutils* bind bind-devel bind-chroot caching-nameserver compat-libcap1* compat-libstdc++-33* openssh* xdpyinfo vi unzip

进行DNS配置

vi /etc/named.conf

options {
listen-on port 53 { any; };
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";
allow-query { any; };
recursion yes;

dnssec-enable yes;
dnssec-validation yes;

/* Path to ISC DLV key */
bindkeys-file "/etc/named.iscdlv.key";

managed-keys-directory "/var/named/dynamic";
};

logging {
channel default_debug {
file "data/named.run";
severity dynamic;
};
};

zone "." IN {
type hint;
file "/dev/null";
};

zone "kingsql.org" IN {
type master;
file "kingsql.org.zone";
};

zone "56.168.192.in-addr.arpa" {
type master;
file "192.168.56.rev";
};

[root@rac01 named]# cd /var/named
[root@rac01 named]# pwd
/var/named
[root@rac01 named]# vi kingsql.org.zone
$TTL 1D
@ IN SOA kingsql.org. hostmaster.kingsql.org. (
0 ; serial
1D ; refresh
1H ; retry
1W ; expire
3H ) ; minimum
@ IN NS ns1.kingsql.org.
ns1 IN A 192.168.56.101

ns2 IN A 192.168.56.102
cluster-scan IN A 192.168.56.156
cluster-scan IN A 192.168.56.157
cluster-scan IN A 192.168.56.158
--------------------------------------------------------------------------------------------
[root@rac01 named]# vi 192.168.56.rev
$TTL 1D
@ IN SOA kingsql.org. hostmaster.kingsql.org. (
0 ; serial
1D ; refresh
1H ; retry
1W ; expire
3H ) ; minimum
@ IN NS ns1.kingsql.org.
ns1 IN A 192.168.56.101

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/88c5b1d7010c900a4af23396e8f5440d.html