Windows server 2012 R2 域安装文章教程:
主域安装:Windows server 2012 R2 双AD域搭建【一】 –【主域、域用户配置】
从域安装:Windows server 2012 R2 双AD域搭建【二】 –【从域配置】
实验环境
数据中心名称:DataCenter
ESXi集群名称:Cluster
域:vsphere6ds.com
业务网网络:10.0.0.0/8,网关:10.0.0.1
iSCSI网络:先期不配置
ESXi主机01:10.10.10.101,主机名:esxi01 ,配置:E5 2630V4双路、64GB内存*4、6T 7200R SAS*4 Raid10
ESXi主机02:10.10.10.102,主机名:esxi02 配置:E5 2630V4双路、64GB内存*4、6T 7200R SAS*4 Raid10
域控服务器01:10.50.100.1,主机名:ad01 配置:1C1G40G磁盘
域控服务器02:10.50.100.2,主机名:ad02 配置:1C1G40G磁盘
vCenter数据库服务器:10.50.100.3,主机名:vcdb 配置:4C8G60G数据磁盘
vCenter服务器:10.50.100.4,主机名:vCenter
iSCSI服务器:
Center数据库服务器采用Windows2012R2操作系统+SQL2008R2数据库,首先安装完操作系统,进行前期配置工作,
进入第一台域控服务器,配置DNS的A记录,将数据库服务器名称vcdb添加进去,如下图
添加A记录,将vcdb.vsphere6ds.com.指向10.50.100.3,如下图
开始配置数据库服务器,配置IP地址和计算机名称然后重启,如下图
Windows PowerShell 版权所有 (C) 2014 Microsoft Corporation。保留所有权利。 PS C:\Windows\system32> $env:computername WIN-740ESNPN3UG PS C:\Windows\system32> Rename-computer -Newname "VCDB" 警告: 所做的更改将在重新启动计算机 WIN-740ESNPN3UG 后生效。 PS C:\Windows\system32> PS C:\Windows\system32> $domain = "vsphere6ds.com" PS C:\Windows\system32> $password = "**************" | ConvertTo-SecureString -asPlainText -Force PS C:\Windows\system32> $username = "$domain\administrator" PS C:\Windows\system32> $credential = New-Object System.Management.Automation.PSCredential( $username , $password ) PS C:\Windows\system32> Add-Computer -DomainName $domain -Credential $credential 警告: 所做的更改将在重新启动计算机 VCDB 后生效。 PS C:\Windows\system32> PS C:\Windows\system32> Get-NetIPConfiguration InterfaceAlias : Ethernet0 InterfaceIndex : 12 InterfaceDescription : vmxnet3 Ethernet Adapter NetProfile.Name : 网络 2 IPv4Address : 10.0.1.172 IPv6DefaultGateway : IPv4DefaultGateway : 10.0.0.1 DNSServer : 10.10.100.100 47.90.33.131 InterfaceAlias : Ethernet1 InterfaceIndex : 13 InterfaceDescription : vmxnet3 Ethernet Adapter #2 NetProfile.Name : 网络 IPv4Address : 172.31.100.213 IPv6DefaultGateway : IPv4DefaultGateway : 172.31.0.1 DNSServer : 47.90.33.131 8.8.8.8 8.8.4.4 PS C:\Windows\system32> Remove-NetIPAddress -InterfaceIndex 12 确认 是否确实要执行此操作? Performing operation "Remove" on Target "NetIPAddress -IPv6Address fe80::a866:6d90:55e8:3d3a%12 -InterfaceIndex 12 -Store Active" [Y] 是(Y) [A] 全是(A) [N] 否(N) [L] 全否(L) [S] 挂起(S) [?] 帮助 (默认值为“Y”):y 确认 是否确实要执行此操作? Performing operation "Remove" on Target "NetIPAddress -IPv4Address 10.0.1.172 -InterfaceIndex 12 -Store Active" [Y] 是(Y) [A] 全是(A) [N] 否(N) [L] 全否(L) [S] 挂起(S) [?] 帮助 (默认值为“Y”):y PS C:\Windows\system32> Remove-NetRoute -Nexthop "10.0.0.1" 确认 是否确实要执行此操作? Performing operation "Remove" on Target "NetRoute -DestinationPrefix 0.0.0.0/0 -InterfaceIndex 12 -NextHop 10.0.0.1 -Store Active" [Y] 是(Y) [A] 全是(A) [N] 否(N) [L] 全否(L) [S] 挂起(S) [?] 帮助 (默认值为“Y”):y PS C:\Windows\system32> PS C:\Windows\system32> New-NetIPAddress -InterfaceIndex 12 -IPAddress 10.50.100.3 -Prefixlength 8 -DefaultGateway 10.0.0.1 IPAddress : 10.50.100.3 InterfaceIndex : 12 InterfaceAlias : Ethernet0 AddressFamily : IPv4 Type : Unicast PrefixLength : 8 PrefixOrigin : Manual SuffixOrigin : Manual AddressState : Tentative ValidLifetime : Infinite ( [TimeSpan] ::MaxValue) PreferredLifetime : Infinite ( [TimeSpan] ::MaxValue) SkipAsSource : False PolicyStore : ActiveStore IPAddress : 10.50.100.3 InterfaceIndex : 12 InterfaceAlias : Ethernet0 AddressFamily : IPv4 Type : Unicast PrefixLength : 8 PrefixOrigin : Manual SuffixOrigin : Manual AddressState : Invalid ValidLifetime : Infinite ( [TimeSpan] ::MaxValue) PreferredLifetime : Infinite ( [TimeSpan] ::MaxValue) SkipAsSource : False PolicyStore : PersistentStore PS C:\Windows\system32> PS C:\Windows\system32> Set-DnsClientServerAddress -InterfaceIndex 12 -ServerAddresses ( "10.50.100.1" , "10.50.100.2" ) PS C:\Windows\system32> Get-NetIPConfiguration InterfaceAlias : Ethernet0 InterfaceIndex : 12 InterfaceDescription : vmxnet3 Ethernet Adapter NetProfile.Name : 网络 2 IPv4Address : 10.50.100.3 IPv6DefaultGateway : IPv4DefaultGateway : 10.0.0.1 DNSServer : 10.50.100.1 10.50.100.2 InterfaceAlias : Ethernet1 InterfaceIndex : 13 InterfaceDescription : vmxnet3 Ethernet Adapter #2 NetProfile.Name : 网络 IPv4Address : 172.31.100.213 IPv6DefaultGateway : IPv4DefaultGateway : 172.31.0.1 DNSServer : 47.90.33.131 8.8.8.8 8.8.4.4 PS C:\Windows\system32> Restart-Computer -Force |
使用域用户登陆系统,开始安装sql2008 r2,首先安装.net3.5,进入服务器添加功能,选择.net3.5,如下图,安装。
我这里使用系统镜像文件来安装.net3.5
Windows PowerShell 版权所有 (C) 2014 Microsoft Corporation。保留所有权利。 PS C:\Windows\system32> Dism /online / enable-feature /featurename:NetFX3 /All /Source:D:\sources\sxs /LimitAccess 部署映像服务和管理工具 版本: 6.3.9600.17031 映像版本: 6.3.9600.17031 启用一个或多个功能 [==========================100.0%==========================] 操作成功完成。 PS C:\Windows\system32> |
PS C:\Users\DTvSphere6> Get-ChildItem 'HKLM:\SOFTWARE\Microsoft\NET Framework Setup\NDP' -recurse | Get-ItemProperty -name Version,Release -EA 0 | Where { $_ .PSChildName -match '^(?!S)\p{L}' } | Select PSChildName, Version, Release PSChildName Version Release ----------- ------- ------- v2.0.50727 2.0.50727.4927 v3.0 3.0.30729.4926 Windows Communication Foundation 3.0.4506.4926 Windows Presentation Foundation 3.0.6920.4902 v3.5 3.5.30729.4926 Client 4.5.51641 378675 Full 4.5.51641 378675 Client 4.0.0.0 PS C:\Users\DTvSphere6> |
安装完成需要重启计算机
去微软官方下载
下载页面https://docs.microsoft.com/en-us/sql/ssms/download-sql-server-management-studio-ssms
中文简体SQL Server Management Studio 17.4下载地址https://download.microsoft.com/download/0/A/E/0AE3B5C9-0D22-4EF3-B48A-73181A7F8EF7/SSMS-Setup-CHS.exe
使用SQL Server Management Studio来安装SQLServer的客户端管理工具
安装结束需要重启
进入程序中心,右键SQL Server Management Studio,选择固定到任务栏
回到桌面,运行任务栏上的SQL Server Management Studio程序,输入登陆信息,如下图
在数据存储盘上新建VCDB的文件夹,再SQL中在数据库中右键选择新建数据库,如下图
数据库名称输入vcdb,路径选择刚才在数据存储盘新建的文件夹vcdb(我这边是D盘),如下图
选择“选项”栏,在恢复模式中选择“简单”,如下图
如果属性SQLserver数据库 我们可以直接使用sql脚本来创建的
CREATE DATABASE [vcdb] CONTAINMENT = NONE ON PRIMARY ( NAME = N 'vcdb' , FILENAME = N 'D:\VCDB\vcdb.mdf' , SIZE = 8192KB , FILEGROWTH = 65536KB ) LOG ON ( NAME = N 'vcdb_log' , FILENAME = N 'D:\VCDB\vcdb_log.ldf' , SIZE = 8192KB , FILEGROWTH = 65536KB ) GO ALTER DATABASE [vcdb] SET COMPATIBILITY_LEVEL = 130 GO ALTER DATABASE [vcdb] SET ANSI_NULL_DEFAULT OFF GO ALTER DATABASE [vcdb] SET ANSI_NULLS OFF GO ALTER DATABASE [vcdb] SET ANSI_PADDING OFF GO ALTER DATABASE [vcdb] SET ANSI_WARNINGS OFF GO ALTER DATABASE [vcdb] SET ARITHABORT OFF GO ALTER DATABASE [vcdb] SET AUTO_CLOSE OFF GO ALTER DATABASE [vcdb] SET AUTO_SHRINK OFF GO ALTER DATABASE [vcdb] SET AUTO_CREATE_STATISTICS ON (INCREMENTAL = OFF ) GO ALTER DATABASE [vcdb] SET AUTO_UPDATE_STATISTICS ON GO ALTER DATABASE [vcdb] SET CURSOR_CLOSE_ON_COMMIT OFF GO ALTER DATABASE [vcdb] SET CURSOR_DEFAULT GLOBAL GO ALTER DATABASE [vcdb] SET CONCAT_NULL_YIELDS_NULL OFF GO ALTER DATABASE [vcdb] SET NUMERIC_ROUNDABORT OFF GO ALTER DATABASE [vcdb] SET QUOTED_IDENTIFIER OFF GO ALTER DATABASE [vcdb] SET RECURSIVE_TRIGGERS OFF GO ALTER DATABASE [vcdb] SET DISABLE_BROKER GO ALTER DATABASE [vcdb] SET AUTO_UPDATE_STATISTICS_ASYNC OFF GO ALTER DATABASE [vcdb] SET DATE_CORRELATION_OPTIMIZATION OFF GO ALTER DATABASE [vcdb] SET PARAMETERIZATION SIMPLE GO ALTER DATABASE [vcdb] SET READ_COMMITTED_SNAPSHOT OFF GO ALTER DATABASE [vcdb] SET READ_WRITE GO ALTER DATABASE [vcdb] SET RECOVERY SIMPLE GO ALTER DATABASE [vcdb] SET MULTI_USER GO ALTER DATABASE [vcdb] SET PAGE_VERIFY CHECKSUM GO ALTER DATABASE [vcdb] SET TARGET_RECOVERY_TIME = 60 SECONDS GO ALTER DATABASE [vcdb] SET DELAYED_DURABILITY = DISABLED GO USE [vcdb] GO ALTER DATABASE SCOPED CONFIGURATION SET LEGACY_CARDINALITY_ESTIMATION = Off ; GO ALTER DATABASE SCOPED CONFIGURATION FOR SECONDARY SET LEGACY_CARDINALITY_ESTIMATION = Primary ; GO ALTER DATABASE SCOPED CONFIGURATION SET MAXDOP = 0; GO ALTER DATABASE SCOPED CONFIGURATION FOR SECONDARY SET MAXDOP = PRIMARY ; GO ALTER DATABASE SCOPED CONFIGURATION SET PARAMETER_SNIFFING = On ; GO ALTER DATABASE SCOPED CONFIGURATION FOR SECONDARY SET PARAMETER_SNIFFING = Primary ; GO ALTER DATABASE SCOPED CONFIGURATION SET QUERY_OPTIMIZER_HOTFIXES = Off ; GO ALTER DATABASE SCOPED CONFIGURATION FOR SECONDARY SET QUERY_OPTIMIZER_HOTFIXES = Primary ; GO USE [vcdb] GO IF NOT EXISTS ( SELECT name FROM sys.filegroups WHERE is_default=1 AND name = N 'PRIMARY' ) ALTER DATABASE [vcdb] MODIFY FILEGROUP [ PRIMARY ] DEFAULT GO |
如果环境允许可以将节点做下更新