怎么安装always on集群

53次阅读
没有评论

共计 1991 个字符,预计需要花费 5 分钟才能阅读完成。

这篇文章主要介绍“怎么安装 always on 集群”,在日常操作中,相信很多人在怎么安装 always on 集群问题上存在疑惑,丸趣 TV 小编查阅了各式资料,整理出简单好用的操作方法,希望对大家解答”怎么安装 always on 集群”的疑惑有所帮助!接下来,请跟着丸趣 TV 小编一起来学习吧!

准备工作

1、  四台已安装 windows server 2008 r2 系统的虚拟机,配置如下:

CPU : 1 核

MEMORY : 2GB

DISK : 40GB(未分区)

NetAdapter : 2 块

2、  网卡设置:

本地连接:外网 IP(由于虚拟机本身处于内网网段,192.168.1.2-192.168.1.255,在此我们把当前内网视为外网公开的 IP)。

PC01:192.168.1.241 (域主机)

PC02:192.168.1.242 (集群主节点)

PC03:192.168.1.243 (集群辅助节点)

PC04:192.168.1.244 (集群辅助节点)

本地连接 2:域内网 IP。这里设置为 192.168.10.1

PC01:192.168.10.1 (域主机)

PC02:192.168.10.2 (集群主节点)

PC03:192.168.10.3 (集群辅助节点)

PC04:192.168.10.4 (集群辅助节点)

3、  虚拟机默认安装只有一块网卡,以下演示添加网卡:

注意:此时两块网卡都处于 NAT 模式,在此我将第一个网络适配器的网络连接模式改为桥连接,目的是为了与我物理机所处的内网电脑进行交互。

安装域控制器和配置域安装域控制器

在 IP:192.168.1.241 这台虚拟机上建立域控制器

注意:在未配置固定 IP 时,无法安装有效的域控制器

此时我们设置虚拟机的固定外网 IP(注意:这里没有配置 DNS 服务器地址,所以无法在虚拟机上面连接到真实外网,在正式环境中,需要配置 DNS 服务器地址):

内网 IP:

怎么安装 always on 集群

再次来安装域控制器:

怎么安装 always on 集群

怎么安装 always on 集群

怎么安装 always on 集群

怎么安装 always on 集群

怎么安装 always on 集群

怎么安装 always on 集群

域控制器安装完成

安装域服务和配置域

怎么安装 always on 集群

怎么安装 always on 集群

怎么安装 always on 集群

怎么安装 always on 集群

怎么安装 always on 集群

怎么安装 always on 集群

怎么安装 always on 集群

怎么安装 always on 集群

怎么安装 always on 集群

怎么安装 always on 集群

怎么安装 always on 集群

怎么安装 always on 集群

怎么安装 always on 集群

怎么安装 always on 集群

怎么安装 always on 集群

域配置完成后,会提示重启虚拟机,请立即重启!

将其它几台虚拟机加入域

先将其它几台虚拟机的第二块网卡,也就是本地连接 2 的 IP 地址改为准备工作中的 IP 地址,

同时,DNS 服务器指向内网 IP 为 192.168.10.1 的虚拟机,这个是必须的,否则无法加入新建的域。

怎么安装 always on 集群

怎么安装 always on 集群

怎么安装 always on 集群

怎么安装 always on 集群

怎么安装 always on 集群

怎么安装 always on 集群

怎么安装 always on 集群

怎么安装 always on 集群

怎么安装 always on 集群

加入域成功,立即重启虚拟机!

安装和配置 windows server 故障转移集群先安装.net framework 3.5

怎么安装 always on 集群

怎么安装 always on 集群

怎么安装 always on 集群

怎么安装 always on 集群

怎么安装 always on 集群

怎么安装 always on 集群

怎么安装 always on 集群

怎么安装 always on 集群

怎么安装 always on 集群

安装完成!

安装故障转移功能

怎么安装 always on 集群

怎么安装 always on 集群

怎么安装 always on 集群

怎么安装 always on 集群

怎么安装 always on 集群

配置故障转移集群

使用 NewCluster\administrator 账户登录除域主机外的所有虚拟机,

注意:域管理员账户才能配置故障转移集群

怎么安装 always on 集群

怎么安装 always on 集群

怎么安装 always on 集群

怎么安装 always on 集群

创建一个故障转移集群

怎么安装 always on 集群

怎么安装 always on 集群

怎么安装 always on 集群

怎么安装 always on 集群

怎么安装 always on 集群

怎么安装 always on 集群

怎么安装 always on 集群

怎么安装 always on 集群

检查防火墙,将域防火墙关闭

怎么安装 always on 集群

怎么安装 always on 集群

怎么安装 always on 集群

怎么安装 always on 集群

但依旧有问题,这时我发现 PC03 和 PC04 两台虚拟机的外网 IP 是自动获取,于是将其分别修改:

怎么安装 always on 集群

怎么安装 always on 集群

然后再添加节点:

怎么安装 always on 集群

怎么安装 always on 集群

怎么安装 always on 集群

怎么安装 always on 集群

怎么安装 always on 集群

怎么安装 always on 集群

怎么安装 always on 集群

怎么安装 always on 集群

怎么安装 always on 集群

怎么安装 always on 集群

怎么安装 always on 集群

怎么安装 always on 集群

怎么安装 always on 集群

集群配置完成。

安装和配置 sqlserver 2012 always on 集群安装 sqlserver 2012

在集群的每一台虚拟机上安装 sqlserver2012

怎么安装 always on 集群

怎么安装 always on 集群

怎么安装 always on 集群

怎么安装 always on 集群

怎么安装 always on 集群

怎么安装 always on 集群

怎么安装 always on 集群

怎么安装 always on 集群

怎么安装 always on 集群

怎么安装 always on 集群

怎么安装 always on 集群

选择安装账户,这里选择是域管理员账户

怎么安装 always on 集群

怎么安装 always on 集群

怎么安装 always on 集群

怎么安装 always on 集群

怎么安装 always on 集群

怎么安装 always on 集群

怎么安装 always on 集群

怎么安装 always on 集群

重启计算机,完成 sqlserver2012 的安装!

配置 sqlserver 2012 为每个节点的虚拟机的 sqlserver 服务开启 alwayson 功能

怎么安装 always on 集群

怎么安装 always on 集群

怎么安装 always on 集群

怎么安装 always on 集群

配置别名 IP:192.168.10.2

怎么安装 always on 集群

怎么安装 always on 集群

怎么安装 always on 集群

同样在 32 位的客户端也添加上同样的别名

怎么安装 always on 集群

打开 32 位和 64 位客户端协议中的命名协议

怎么安装 always on 集群

IP:192.168.10.3(操作步骤跟上面相同)

怎么安装 always on 集群

怎么安装 always on 集群

IP:192.168.10.4

怎么安装 always on 集群

怎么安装 always on 集群

使用别名测试登录

怎么安装 always on 集群

怎么安装 always on 集群

怎么安装 always on 集群

注意:如果安装时未使用域管理员账户,并且未将与管理员账户加入 sqlserver 管理员账户组中,将无法采取 windows 验证模式使用域管理员账户免密码登录 sqlserver

配置 always on 准备工作

1、  创建文件夹用于存储数据库备份。

怎么安装 always on 集群

2、  创建一个测试数据库,并备份数据库。如果已有数据库,只需备份数据库。

怎么安装 always on 集群

3、  将备份路径共享

怎么安装 always on 集群

怎么安装 always on 集群

怎么安装 always on 集群

怎么安装 always on 集群

创建 alwayson 高可用性组

只需要在 IP:192.168.10.2 上创建即可

怎么安装 always on 集群

怎么安装 always on 集群

怎么安装 always on 集群

怎么安装 always on 集群

注意:一定要先修改数据库恢复模式为完整恢复模式,并完整备份数据库。否则这里的状态会显示为不满足先决条件。

怎么安装 always on 集群

怎么安装 always on 集群

怎么安装 always on 集群

怎么安装 always on 集群

怎么安装 always on 集群

怎么安装 always on 集群

怎么安装 always on 集群

添加侦听器

怎么安装 always on 集群

怎么安装 always on 集群

到此 alwayson 集群完成:

怎么安装 always on 集群

测试集群:

在主节点 IP:192.168.10.2 上创建一个表,并插入一条数据

怎么安装 always on 集群

在辅助节点 IP:192.168.10.3 上查看表和数据

怎么安装 always on 集群

在辅助节点 IP:192.168.10.4 上查看表和数据

怎么安装 always on 集群

测试成功!

关于应用程序连接集群问题,应该是连接集群的虚拟 IP,也可以用 SSMS 直接连接虚拟 IP,此时,sa 账户的密码一定要在集群所有节点上配置一样。否则集群切换后,使用 sa 的账户连接会出现密码错误问题。

到此,关于“怎么安装 always on 集群”的学习就结束了,希望能够解决大家的疑惑。理论与实践的搭配能更好的帮助大家学习,快去试试吧!若想继续学习更多相关知识,请继续关注丸趣 TV 网站,丸趣 TV 小编会继续努力为大家带来更多实用的文章!

正文完
 
丸趣
版权声明:本站原创文章,由 丸趣 2023-07-24发表,共计1991字。
转载说明:除特殊说明外本站除技术相关以外文章皆由网络搜集发布,转载请注明出处。
评论(没有评论)